Data export
How audit logs and traces leave the gateway — JSON/CSV today, S3/GCS/Azure on the roadmap.
Data export
Three things customers ask for: a copy of their audit log, a copy of their raw traces, and a webhook stream to their own warehouse. v0.1 covers the first two via API; the third lands in 8b. Bulk delivery to S3/GCS/Azure is planned, not v0.1.
Audit log
Every dashboard mutation writes a row to the org's audit table. The exporter route returns those rows in either JSON or CSV.
# JSON
curl -X POST https://gateway.agentronics.dev/v1/audit/export \
-H 'authorization: Bearer agtx_sk_...' \
-H 'content-type: application/json' \
-d '{}'
# CSV (browser will download attachment)
curl -X POST https://gateway.agentronics.dev/v1/audit/export \
-H 'authorization: Bearer agtx_sk_...' \
-H 'content-type: application/json' \
-d '{ "format": "csv" }' > audit.csv
The endpoint is scoped to the calling org — there is no admin-level "export everything" path. CSV columns are stable: id, orgId, actor, action, target, metadata, occurredAt.
Traces
GET /v1/traces paginates by cursor, filters by class/type/time:
curl 'https://gateway.agentronics.dev/v1/traces?limit=200&type=tool.executed&since=2026-05-01T00:00:00Z' \
-H 'authorization: Bearer agtx_sk_...'
Response: { events: TraceEvent[], nextCursor: string | null }. Pass nextCursor back as ?cursor= to page.
Use GET /v1/metrics?since=... for pre-aggregated counts (per type, per outcome, per hour). The SDK already hourly-rolls up the trace stream so analytics queries don't pay the raw cost.
Webhooks
Schedule a delivery from your dashboard or via API:
curl -X POST https://gateway.agentronics.dev/v1/webhooks/test \
-H 'authorization: Bearer agtx_sk_...' \
-H 'content-type: application/json' \
-d '{ "url": "https://your-host.example.com/agentronics", "payload": { "ping": true } }'
The cron-driven dispatcher drains the pending queue every minute. Failed deliveries retry up to 3 times with backoff before being dead-lettered. Dead-lettered deliveries stay queryable via GET /v1/webhooks so you can inspect what didn't make it.
Roadmap (post-v0.1)
| Channel | Status | Notes |
|---|---|---|
POST /v1/audit/export (JSON / CSV) | ✅ v0.1 | This page. |
GET /v1/traces (paginated) | ✅ v0.1 | Cursor-based, 200 max per page. |
POST /v1/webhooks/test + cron drain | ✅ v0.1 | 3 retries → dead-letter. |
| Bulk S3 delivery | 🚧 Planned | Per-org S3 bucket, gateway writes daily Parquet/JSON dumps. |
| GCS / Azure | 🚧 Planned | Same shape as S3 once it ships. |
| Snowflake / BigQuery direct share | 🤔 Considering | Driven by demand. |
If you need bulk delivery sooner than the roadmap promises, talk to Support — single-tenant deployments can wire it now.