Skip to main content
Traces are the primary unit of observability in AgentVista. Each trace represents a single agent run and contains one or more spans that record the operations that happened during that run.

Ingest a batch of traces

POST /traces/batch Accepts a batch of traces and their spans from the SDK. Requires an API key with write scope. The endpoint is idempotent: duplicate trace_id or span_id values are silently accepted. Agent records are auto-created on first trace for a new agent name.
The batch accepts up to 100 total spans across all traces in a single request. Exceeding your monthly event limit returns 429.

Request body

object[]
required
Array of trace objects to ingest. Each object contains a trace header and its spans.

Response — 200

number
Number of traces successfully ingested.
number
Number of traces that failed validation or ingestion.
object[]
Per-trace error details for any rejected traces.
Example response

Get trace detail

GET /dashboard/traces/{trace_id} Returns a single trace with all its spans ordered by started_at ascending for waterfall rendering. Returns 404 for traces not owned by the authenticated user.

Path parameters

string
required
The trace_id UUID of the trace to retrieve.

Response — 200

string
The trace UUID.
string
Name of the agent that produced this trace.
string
Trace status: running, completed, failed, or timed_out.
string
ISO 8601 timestamp.
string | null
ISO 8601 timestamp or null.
number | null
Total duration in milliseconds.
boolean | null
Outcome signal. Null if not yet set.
string | null
Free-text outcome description.
string | null
Error description if the trace failed.
number | null
Total tokens consumed across all LLM spans.
number | null
Total LLM cost in USD.
object | null
Arbitrary metadata attached at ingestion time.
object[]
All spans ordered by started_at ASC. Use parent_span_id to build the waterfall tree.

Compare two agents

GET /dashboard/traces/compare-agents Returns side-by-side aggregated stats for two agents. Both agents must belong to the authenticated user, otherwise 404 is returned.

Query parameters

string
required
UUID of the first agent to compare.
string
required
UUID of the second agent to compare.

Response — 200

object[]
Array of exactly two agent stat objects, one per requested agent.

Set trace outcome

PATCH /dashboard/traces/{trace_id}/outcome Sets the success and outcome fields on a trace. Use this to attach human or programmatic feedback to a completed trace. Returns 404 for traces not owned by the authenticated user.

Path parameters

string
required
UUID of the trace to update.

Request body

boolean
required
Whether this trace is considered a success.
string
Free-text description of the outcome (e.g. "qualified", "rejected", "escalated").

Response — 200

string
UUID of the updated trace.
boolean
The updated success value.
string | null
The updated outcome value.