Trace ingestion
Sikaru has two ways to get execution evidence. Submitted traces come from an agent you run elsewhere. Managed run trajectories come from runs Sikaru executes. They are separate entry points and separate views.
In short: submit traces from your own agent; managed runs need no upload and appear in their own history.
These examples use the authenticated client and project from the Quickstart.
Trajectory format: Harbor ATIF
Sikaru records every trajectory in the Agent Trajectory Interchange Format (ATIF) from Harbor. An ATIF document is one JSON object holding an agent’s full interaction: user and system messages, agent replies, reasoning, tool calls, tool results, and metrics. One open format means the same trajectory works for inspection, evaluation, and improvement, wherever it came from.
Read the ATIF specification for every field.
Bring traces from LangSmith, Braintrust, Raindrop, and others
Historical traces become trajectories once they are in ATIF. Export them from your current tool, convert each trace to one ATIF document, and submit it.
Export your traces
Use your tool’s export feature or API. For each trace, build one list of OpenAI-style chat messages (role, content, tool_calls, tool_call_id). In most exports, the last model call’s input messages plus its output message hold the whole conversation.
The service validates each document and rejects invalid ones. Fix the converter, then resubmit with the same idempotency key.
Submit traces
The generated trace method accepts declared wire formats directly. It does not provide a local Experience builder, vendor converter, trajectory class, or agent facade. Normalize source data in your application before you send it. Server-side normalization stays part of the private service.
Reuse trace idempotency keys only for identical batches.
A trace ingest acknowledgement does not prove that downstream evaluation or improvement completed.
Read a managed run’s trajectory
Use a project API key with runs:read to read retained execution structure and measured token usage:
The response includes runId, harnessVersionId, status, and an ATIF 1.8 trajectory.
- Private messages, reasoning, tool payloads, and provider metadata are omitted and marked in
trajectory.extra. - Embedded subagent trajectories keep their own token totals. Root totals exclude those children.
- Missing metrics mean unknown usage, not zero.
- This export does not include model pricing.
The endpoint reads a committed snapshot. Active or interrupted runs may have partial evidence.
The Python method requires a client generated from the updated API contract and a service that supports this endpoint.
Find runs in the platform
Open your project and go to Conversations. Managed runs appear in their own history. Open a run to inspect its retained trajectory and measured usage. Use Show older managed runs to continue through earlier runs. Agent pages also scope managed history to that agent.
Managed history and submitted traces are separate views:
- A managed run does not need to be uploaded again to appear in managed history.
- Submitted-trace counts can be zero while managed runs exist.
- Do not add their totals together as a unique-run count.
A visible run confirms that work was admitted, not that a complete trajectory was retained. Run status, trajectory availability, and measurement completeness are separate. Refresh active runs to read newer retained evidence. Never read an unavailable trajectory or failed read as zero steps or zero usage.
