What ingest is for
If your agent framework is not one of the built-in sources (OpenClaw, Hermes, Claude Code, Cursor CSV), you can still audit it. Export your usage as a Xerg event payload — a small, versioned JSON format — and run:--compare, and --push all work the same way they do for built-in sources.
The event payload format
idmust be a stable, unique string per event. Xerg uses it for deterministic deduplication, so re-exporting the same history does not double-count.runIdgroups events into runs (a trace, session, or task execution).- Four event types are accepted:
model-call,agent-invocation,tool-execution, anddelegation. Orchestration events are first-class — they are preserved in run structure (agent lists, tool attribution, delegation counts) and never filtered. - Version 2 adds optional
modelCallIdandtoolCallIdfields.modelCallIdmust reference a model-call event in the same payload andrunId; Xerg uses it before chronological association. Version 1 remains accepted. - On
model-callevents, passcostUsdwhen your platform reports billed cost (it becomes observed spend). Without it, Xerg estimates from local model pricing; models it cannot price stay visible asunpricedrather than being silently zeroed. - Numeric fields are validated strictly:
inputTokens,outputTokens,retries,attempt, anditerationmust be nonnegative integers;costUsdandlatencyMsmust be nonnegative finite numbers. Negative or fractional token/count values reject the payload. - An optional
outcome: { "status": "success" | "failure" | "partial" | "unknown" }marker can be attached to any event. It is carried through to run tags for future cost-per-outcome analysis.
Options
--json, --markdown, --db, --no-db, --compare, --push, --dry-run, and --verbose.
Invalid payloads fail with per-event error messages (bad timestamps, unknown event types, duplicate IDs) instead of partial results.