SYSTEM R AI

Audit Trail

Every billing event is logged. Query your audit trail and run compliance checks.

Overview

System R maintains a complete audit trail of every billable event for each agent. Every deposit, tool call, and deduction is recorded with a timestamp, operation type, amount, and resulting balance.

Get audit trail

GET /v1/audit/trail

Parameters

ParameterTypeRequiredDescription
from_datestringNoISO date start (e.g. "2026-01-01").
to_datestringNoISO date end (e.g. "2026-12-31").
limitintNoMax entries (1 to 1000, default 200).

Example

curl "https://agents.systemr.ai/v1/audit/trail?from_date=2026-03-01&to_date=2026-03-31&limit=50" \
  -H "X-API-Key: sr_agent_..."

Response

{
  "agent_id": "agt_a1b2c3d4",
  "from_date": "2026-03-01T00:00:00",
  "to_date": "2026-03-31T23:59:59",
  "total_calls": 142,
  "total_spend": "3.47",
  "entries": [
    {
      "timestamp": "2026-03-25T14:30:00",
      "action": "consumption",
      "operation": "pre_trade_gate",
      "amount": "0.01",
      "balance_after": "39.03"
    },
    {
      "timestamp": "2026-03-25T14:29:55",
      "action": "consumption",
      "operation": "calculate_position_size",
      "amount": "0.003",
      "balance_after": "39.04"
    },
    {
      "timestamp": "2026-03-25T10:00:00",
      "action": "deposit",
      "operation": null,
      "amount": "50.00",
      "balance_after": "42.50"
    }
  ],
  "entry_count": 3
}

Entry fields

FieldDescription
timestampISO timestamp of the event.
actionEvent type: deposit, consumption, withdrawal, credit.
operationTool or operation name (null for deposits).
amountDollar amount of the event.
balance_afterAgent balance after this event.

Compliance check

GET /v1/audit/compliance-check

Runs a compliance analysis on the agent's audit trail. Returns any flags found.

Example

curl https://agents.systemr.ai/v1/audit/compliance-check \
  -H "X-API-Key: sr_agent_..."

Response

{
  "agent_id": "agt_a1b2c3d4",
  "is_clean": true,
  "total_calls": 142,
  "total_spend": "3.47",
  "flags": [],
  "flag_count": 0
}

If issues are detected:

{
  "agent_id": "agt_a1b2c3d4",
  "is_clean": false,
  "total_calls": 5420,
  "total_spend": "312.50",
  "flags": [
    {
      "severity": "warning",
      "description": "High call volume in short period (>1000 calls/hour)",
      "timestamp": "2026-03-25T14:00:00"
    }
  ],
  "flag_count": 1
}

Flag severities

SeverityMeaning
infoInformational observation. No action needed.
warningUnusual pattern detected. Review recommended.
criticalPotential issue requiring immediate attention.
System R AI
Python SDKpip install systemr
MCP Serveragents.systemr.ai/mcp/sse
OpenAPI Specagents.systemr.ai/openapi.json
Machine Docsagents.systemr.ai/llms.txt
GitHubSystem-R-AI
X@Systemrai
YouTube@systemr_ai
Emailhello@systemr.ai
Phone628 333 6693
Address7901 4TH ST N, STE 28529, ST PETERSBURG, FL 33702
TermsTerms of Service
PrivacyPrivacy Policy
SecuritySecurity Policy
© 2026 System R AI. Software platform. Not financial advice.

On this page