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.
Upload a Langfuse, LangSmith or Braintrust export
Export your traces and upload the file unchanged. Sikaru converts each trace into a trajectory:
Sikaru rebuilds the conversation from the trace’s model calls (Langfuse generations, LangSmith llm runs, Braintrust llm spans). Each assistant turn keeps its tool calls, tool results, model, token counts and timestamp. OpenAI chat messages and LangChain messages are both understood. A trace with no model calls becomes one exchange of its root’s input and output.
For Langfuse, a run that names a metadata.parent_agent_run_id in the same file is nested under that run as a sub-agent. A model call outside any run becomes a one-turn trajectory, named after its metadata.operation or its observation name.
The CLI sends large exports in batches and never splits a trace across them, because Sikaru rebuilds a trace only from the rows in one request. From the SDK, submit the rows yourself and keep each trace’s rows in the same request:
Upload an export once. A retry of an identical batch is recognized, but re-uploading a changed export into the same project stores its traces again.
Bring traces from other tools
For any other tool, historical traces become trajectories once they are in ATIF. Export them, 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.
