curl -X POST http://localhost:4700/api/v1/ingest/traces \ -H "x-api-key: agtx_local_0f3c9a17d2b84e6a5c01b9f4e7d8a2c6431b5f97a0e2d4c8" \ -H "Content-Type: application/json" \ -d '{ "name": "customer-support-agent", "framework": "langchain", "model": "gpt-4o", "input": "How do I reset my password?", "output": "Click Forgot Password on the login page.", "latencyMs": 1340, "inputTokens": 150, "outputTokens": 45, "toolCalls": [ { "name": "search_kb", "input": "password reset", "output": "...", "success": true } ], "sessionId": "user_session_abc123" }'
from agentx import AgentXclient = AgentX.from_env()@client.tracer.trace("customer-support-agent", framework="langchain", model="gpt-4o")def handle(query: str) -> str: return chain.invoke(query)handle("How do I reset my password?")
from agentx import AgentXclient = AgentX.from_env()# sync=True blocks until the trace is ingested, so trace_id is available as soon as the# `with` block exits. The decorator form above is fire-and-forget and never returns an id.with client.tracer.trace( "customer-support-agent", framework="langchain", model="gpt-4o", sync=True) as span: span.output = chain.invoke("How do I reset my password?")print(span.trace_id) # "mJ3vQ8pTr2LqYw6bZk9Xd"
{ "error": "Ingest queue is full - retry with backoff (Retry-After: 1s)."}
{ "error": "Trace storage is unavailable - the span was not stored; retry."}
Tracing
Submit Trace
Ingest a single span or agent run into the engine’s trace store
POST
/
api
/
v1
/
ingest
/
traces
curl -X POST http://localhost:4700/api/v1/ingest/traces \ -H "x-api-key: agtx_local_0f3c9a17d2b84e6a5c01b9f4e7d8a2c6431b5f97a0e2d4c8" \ -H "Content-Type: application/json" \ -d '{ "name": "customer-support-agent", "framework": "langchain", "model": "gpt-4o", "input": "How do I reset my password?", "output": "Click Forgot Password on the login page.", "latencyMs": 1340, "inputTokens": 150, "outputTokens": 45, "toolCalls": [ { "name": "search_kb", "input": "password reset", "output": "...", "success": true } ], "sessionId": "user_session_abc123" }'
from agentx import AgentXclient = AgentX.from_env()@client.tracer.trace("customer-support-agent", framework="langchain", model="gpt-4o")def handle(query: str) -> str: return chain.invoke(query)handle("How do I reset my password?")
from agentx import AgentXclient = AgentX.from_env()# sync=True blocks until the trace is ingested, so trace_id is available as soon as the# `with` block exits. The decorator form above is fire-and-forget and never returns an id.with client.tracer.trace( "customer-support-agent", framework="langchain", model="gpt-4o", sync=True) as span: span.output = chain.invoke("How do I reset my password?")print(span.trace_id) # "mJ3vQ8pTr2LqYw6bZk9Xd"
{ "error": "Ingest queue is full - retry with backoff (Retry-After: 1s)."}
{ "error": "Trace storage is unavailable - the span was not stored; retry."}
Records one span (an agent run, LLM call, tool call, or retrieval step) in the project selected
by your API key. This is the endpoint the Python SDK’s client.tracer.trace(...) posts to, and
the one to call directly from any language the SDK doesn’t cover. The response returns the
stored trace’s id, which you can pass to
Evaluate Trace or link to an evaluation result.
Casing: camelCase keys (latencyMs, sessionId, …) are the canonical wire form, and
the snake_case spellings (latency_ms, session_id, …) are accepted as legacy aliases on
this endpoint only, for existing SDKs. If a request carries both spellings of a key, the
snake_case value wins. New integrations should send camelCase.
Authentication
string
required
Project API key. The key alone selects the project; no project id is sent.
Body
string
required
Agent or operation label. For a root span, the name resolves to a registered agent
(auto-registering one on first use) unless agentId says otherwise.
any
Agent input: string, JSON object, array, etc.
any
Agent output.
string
Error message if the run failed.
number
End-to-end wall-clock latency in milliseconds. Legacy alias: latency_ms.
string
Platform label - an SDK integration literal ("langchain", "crewai", "openai-agents",
"anthropic", …), an OTel scope name, or any custom string for platforms AgentX has no
integration for. Trimmed, folded to lowercase, and capped at 64 characters on ingest, so
"LangChain" and "langchain" chart and filter as one platform. Unlabeled traces bucket as
“other” in the dashboard. See Platform detection.
string
LLM model used, e.g. "gpt-4o". Must match a pricing-catalog model id for cost estimation.
array
Tool calls made during the run, as an array of objects (any keys; name, input, output,
and success are what the monitor and judges read). Legacy alias: tool_calls.
string
Optional. What kind of step this span is - one of the 11 kinds: "agent", "llm",
"tool", "retrieval", "chain", "embedding", "reranker", "guardrail",
"evaluator", "prompt", or "memory". Alias spellings from other vocabularies
(OpenInference, OTel GenAI, Langfuse, MLflow, the memory SDKs) are accepted and folded onto
these on ingest; unrecognized values are stored as null. A span that states no kind is still
classified by the engine’s inference fallback (model present = llm, tool calls = tool,
recognised auto-generated names, else chain). Legacy alias: span_kind. See
Span kinds.
string
Where the trace came from. "eval-run" marks traffic produced inside an offline evaluation
run; monitoring and the Live Traces production filter exclude it. Unknown values are stored
as null.
string
Groups spans from the same user session, conversation thread, or OTel trace. Legacy alias:
session_id.
object
Arbitrary key-value metadata, stored on the trace and passed to online evaluators.
object
Arbitrary performance breakdown object, stored on the trace. Legacy alias:
performance_summary.
number
Input token count. Legacy alias: input_tokens.
number
Output token count. Legacy alias: output_tokens.
number
Prompt-cache read tokens - a subset of inputTokens, not additional tokens. Priced at the
model’s cache-read rate when one is configured. Legacy alias: cache_read_tokens.
number
Prompt-cache write tokens - also a subset of inputTokens. Legacy alias:
cache_write_tokens.
string
Stable client-supplied span identity. Makes ingest idempotent: replaying the same spanId
stores nothing new, triggers no duplicate monitoring or judging, and returns the original
trace id with deduped: true. Legacy alias: span_id.
string
The parent span’s spanId, for a real span hierarchy (OTel ingestion sends this
unconditionally; the Python SDK sends it with span_tree=True). Child spans skip agent
resolution, the daily trace quota, and the monitoring pipeline (set
AGENTX_MONITOR_CHILD_SPANS=true on the engine to run monitoring on child spans too).
Legacy alias: parent_span_id.
string
Span start time as a Unix-epoch nanosecond count, sent as a string (the value exceeds
safe-integer precision as a JSON number). When present it also becomes the trace’s
createdAt, so historical imports land in the right time window - unless the value is more
than 60 seconds in the future (a future-clocked start keeps the server’s own createdAt) or
unparseable (dropped with a warning). Legacy alias: started_at_unix_nano.
string
Explicit agent to attribute this root span to - a registered agent id from
Register Agent, or an agent name. Omit to resolve from
name, identical to the pre-registry behavior. Legacy alias: agent_id.
boolean
false skips every ingest-time check (pattern detection, online and custom evaluators,
topics) for this trace - eval harnesses send this. true opts eval-run traffic back into
monitoring, and combined with patternIds restricts detection to those patterns. Omitted:
the default sweep runs on every root span.
array
Custom pattern ids to restrict detection to. Only meaningful alongside monitor: true.
Legacy alias: pattern_ids.
string
Accepted for wire compatibility with the hosted SaaS payload shape; ignored by the self-host
engine (the API key already selects the project).
Payload caps: input, output, error, toolCalls, metadata, and
performanceSummary are each capped at 100,000 characters serialized
(AGENTX_INGEST_MAX_FIELD_CHARS). Oversized fields are stored truncated with an explicit
agentx.truncated marker, never rejected.
Response
Returns 200 OK once the span is durably accepted (monitoring and evaluator checks run in the
background after the response).
string
ID of the stored trace. Canonical key.
string
The same id under its legacy snake_case key, kept for existing SDKs. Both keys are always
present and always equal.
boolean
true when a span with the same spanId was already stored; the returned id is the
original trace’s, and no monitoring or judging re-ran.
{ "error": "Ingest queue is full - retry with backoff (Retry-After: 1s)." }
Backpressure; retry after the Retry-After header (1s). Nothing was stored
429
{ "error": "Daily trace quota reached (...)" }
AGENTX_QUOTA_TRACES_PER_DAY hit; resets at midnight. Child spans are exempt
503
{ "error": "Trace storage is unavailable - the span was not stored; retry." }
Storage flush failed; retry after the Retry-After header (2s)
Retries are safe: send a spanId and a redelivered span dedupes instead of duplicating.
curl -X POST http://localhost:4700/api/v1/ingest/traces \ -H "x-api-key: agtx_local_0f3c9a17d2b84e6a5c01b9f4e7d8a2c6431b5f97a0e2d4c8" \ -H "Content-Type: application/json" \ -d '{ "name": "customer-support-agent", "framework": "langchain", "model": "gpt-4o", "input": "How do I reset my password?", "output": "Click Forgot Password on the login page.", "latencyMs": 1340, "inputTokens": 150, "outputTokens": 45, "toolCalls": [ { "name": "search_kb", "input": "password reset", "output": "...", "success": true } ], "sessionId": "user_session_abc123" }'
from agentx import AgentXclient = AgentX.from_env()@client.tracer.trace("customer-support-agent", framework="langchain", model="gpt-4o")def handle(query: str) -> str: return chain.invoke(query)handle("How do I reset my password?")
from agentx import AgentXclient = AgentX.from_env()# sync=True blocks until the trace is ingested, so trace_id is available as soon as the# `with` block exits. The decorator form above is fire-and-forget and never returns an id.with client.tracer.trace( "customer-support-agent", framework="langchain", model="gpt-4o", sync=True) as span: span.output = chain.invoke("How do I reset my password?")print(span.trace_id) # "mJ3vQ8pTr2LqYw6bZk9Xd"
{ "error": "Ingest queue is full - retry with backoff (Retry-After: 1s)."}
{ "error": "Trace storage is unavailable - the span was not stored; retry."}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"AgentX","colors":{"primary":"#2A5699","light":"#5C8DCC","dark":"#1A3F73"},"logo":{"light":"https://mintcdn.com/agentx-ffe8d995/ZTzZ3HDQJ-RJxymw/logo/light.png?fit=max\u0026auto=format\u0026n=ZTzZ3HDQJ-RJxymw\u0026q=85\u0026s=c1e30c949dc1cc2aaa3a137c1ee5c77f","dark":"https://mintcdn.com/agentx-ffe8d995/ZTzZ3HDQJ-RJxymw/logo/dark.png?fit=max\u0026auto=format\u0026n=ZTzZ3HDQJ-RJxymw\u0026q=85\u0026s=35a521e090f7875c15bef7ae392af788"},"favicon":"https://mintcdn.com/agentx-ffe8d995/FRrvmlkH0m2BUb9c/logo/favicon.png?fit=max\u0026auto=format\u0026n=FRrvmlkH0m2BUb9c\u0026q=85\u0026s=e87d636d38c8e6e187b4be187e72381d","api":{"mdx":{"auth":{"method":"key","name":"x-api-key"},"server":"http://localhost:4700"}},"navbar":{"primary":{"type":"github","href":"https://github.com/AgentX-ai/AgentX-trace-eval"}},"footer":{"socials":{"website":"https://www.agentx.so/mcp/ai-evaluation","github":"https://github.com/AgentX-ai/AgentX-trace-eval"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"agentx-ffe8d995","hasAudioNarration":false,"actualSubdomain":"agentx-ffe8d995","customDomains":["developers.agentx.so"],"gitSource":{"type":"github","owner":"agentx-ai","repo":"agentx-mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ac683381cb9dd011c327d04","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"API Reference","count":25},{"language":"default","tag":"Offline Evaluation","count":24},{"language":"default","tag":"Trace","count":17},{"language":"default","tag":"Scorers \u0026 Monitoring","count":16},{"language":"default","tag":"Custom Evaluations","count":13},{"language":"default","tag":"Documentation","count":13},{"language":"default","tag":"Framework Integrations","count":12},{"language":"default","tag":"Framework Examples","count":10},{"language":"default","tag":"Tracing","count":8},{"language":"default","tag":"Live Traffic Scoring","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/tracing/submit-trace","slug":"/api-reference/tracing/submit-trace","pageMetadata":{"title":"Submit Trace","api":"POST /api/v1/ingest/traces","description":"Ingest a single span or agent run into the engine's trace store","href":"/api-reference/tracing/submit-trace"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Ingest a single span or agent run into the engine’s trace store\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Heading,Note,ParamField,ResponseField,Table}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Records one span (an agent run, LLM call, tool call, or retrieval step) in the project selected\nby your API key. This is the endpoint the Python SDK’s `,_jsx(_components.code,{children:`client.tracer.trace(...)`}),` posts to, and\nthe one to call directly from any language the SDK doesn’t cover. The response returns the\nstored trace’s id, which you can pass to\n`,_jsx(_components.a,{href:`/api-reference/tracing/evaluate-trace`,children:`Evaluate Trace`}),` or link to an evaluation result.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Casing`}),`: camelCase keys (`,_jsx(_components.code,{children:`latencyMs`}),`, `,_jsx(_components.code,{children:`sessionId`}),`, …) are the canonical wire form, and\nthe snake_case spellings (`,_jsx(_components.code,{children:`latency_ms`}),`, `,_jsx(_components.code,{children:`session_id`}),`, …) are accepted as legacy aliases on\nthis endpoint only, for existing SDKs. If a request carries both spellings of a key, the\nsnake_case value wins. New integrations should send camelCase.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(ParamField,{header:`x-api-key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsx(_components.p,{children:`Project API key. The key alone selects the project; no project id is sent.`})}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsxs(_components.p,{children:[`Agent or operation label. For a root span, the name resolves to a registered agent\n(auto-registering one on first use) unless `,_jsx(_components.code,{children:`agentId`}),` says otherwise.`]})}),`\n`,_jsx(ParamField,{body:`input`,type:`any`,id:`param-input`,children:_jsx(_components.p,{children:`Agent input: string, JSON object, array, etc.`})}),`\n`,_jsx(ParamField,{body:`output`,type:`any`,id:`param-output`,children:_jsx(_components.p,{children:`Agent output.`})}),`\n`,_jsx(ParamField,{body:`error`,type:`string`,id:`param-error`,children:_jsx(_components.p,{children:`Error message if the run failed.`})}),`\n`,_jsx(ParamField,{body:`latencyMs`,type:`number`,id:`param-latency-ms`,children:_jsxs(_components.p,{children:[`End-to-end wall-clock latency in milliseconds. Legacy alias: `,_jsx(_components.code,{children:`latency_ms`}),`.`]})}),`\n`,_jsx(ParamField,{body:`framework`,type:`string`,id:`param-framework`,children:_jsxs(_components.p,{children:[`Platform label - an SDK integration literal (`,_jsx(_components.code,{children:`\"langchain\"`}),`, `,_jsx(_components.code,{children:`\"crewai\"`}),`, `,_jsx(_components.code,{children:`\"openai-agents\"`}),`,\n`,_jsx(_components.code,{children:`\"anthropic\"`}),`, …), an OTel scope name, or any custom string for platforms AgentX has no\nintegration for. Trimmed, folded to lowercase, and capped at 64 characters on ingest, so\n`,_jsx(_components.code,{children:`\"LangChain\"`}),` and `,_jsx(_components.code,{children:`\"langchain\"`}),` chart and filter as one platform. Unlabeled traces bucket as\n“other” in the dashboard. See `,_jsx(_components.a,{href:`/trace/platform-detection`,children:`Platform detection`}),`.`]})}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,id:`param-model`,children:_jsxs(_components.p,{children:[`LLM model used, e.g. `,_jsx(_components.code,{children:`\"gpt-4o\"`}),`. Must match a pricing-catalog model id for cost estimation.`]})}),`\n`,_jsx(ParamField,{body:`toolCalls`,type:`array`,id:`param-tool-calls`,children:_jsxs(_components.p,{children:[`Tool calls made during the run, as an array of objects (any keys; `,_jsx(_components.code,{children:`name`}),`, `,_jsx(_components.code,{children:`input`}),`, `,_jsx(_components.code,{children:`output`}),`,\nand `,_jsx(_components.code,{children:`success`}),` are what the monitor and judges read). Legacy alias: `,_jsx(_components.code,{children:`tool_calls`}),`.`]})}),`\n`,_jsx(ParamField,{body:`spanKind`,type:`string`,id:`param-span-kind`,children:_jsxs(_components.p,{children:[`Optional. What kind of step this span is - one of the 11 kinds: `,_jsx(_components.code,{children:`\"agent\"`}),`, `,_jsx(_components.code,{children:`\"llm\"`}),`,\n`,_jsx(_components.code,{children:`\"tool\"`}),`, `,_jsx(_components.code,{children:`\"retrieval\"`}),`, `,_jsx(_components.code,{children:`\"chain\"`}),`, `,_jsx(_components.code,{children:`\"embedding\"`}),`, `,_jsx(_components.code,{children:`\"reranker\"`}),`, `,_jsx(_components.code,{children:`\"guardrail\"`}),`,\n`,_jsx(_components.code,{children:`\"evaluator\"`}),`, `,_jsx(_components.code,{children:`\"prompt\"`}),`, or `,_jsx(_components.code,{children:`\"memory\"`}),`. Alias spellings from other vocabularies\n(OpenInference, OTel GenAI, Langfuse, MLflow, the memory SDKs) are accepted and folded onto\nthese on ingest; unrecognized values are stored as null. A span that states no kind is still\nclassified by the engine’s inference fallback (model present = `,_jsx(_components.code,{children:`llm`}),`, tool calls = `,_jsx(_components.code,{children:`tool`}),`,\nrecognised auto-generated names, else `,_jsx(_components.code,{children:`chain`}),`). Legacy alias: `,_jsx(_components.code,{children:`span_kind`}),`. See\n`,_jsx(_components.a,{href:`/trace/span-kinds`,children:`Span kinds`}),`.`]})}),`\n`,_jsx(ParamField,{body:`source`,type:`string`,id:`param-source`,children:_jsxs(_components.p,{children:[`Where the trace came from. `,_jsx(_components.code,{children:`\"eval-run\"`}),` marks traffic produced inside an offline evaluation\nrun; monitoring and the Live Traces production filter exclude it. Unknown values are stored\nas null.`]})}),`\n`,_jsx(ParamField,{body:`sessionId`,type:`string`,id:`param-session-id`,children:_jsxs(_components.p,{children:[`Groups spans from the same user session, conversation thread, or OTel trace. Legacy alias:\n`,_jsx(_components.code,{children:`session_id`}),`.`]})}),`\n`,_jsx(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:_jsx(_components.p,{children:`Arbitrary key-value metadata, stored on the trace and passed to online evaluators.`})}),`\n`,_jsx(ParamField,{body:`performanceSummary`,type:`object`,id:`param-performance-summary`,children:_jsxs(_components.p,{children:[`Arbitrary performance breakdown object, stored on the trace. Legacy alias:\n`,_jsx(_components.code,{children:`performance_summary`}),`.`]})}),`\n`,_jsx(ParamField,{body:`inputTokens`,type:`number`,id:`param-input-tokens`,children:_jsxs(_components.p,{children:[`Input token count. Legacy alias: `,_jsx(_components.code,{children:`input_tokens`}),`.`]})}),`\n`,_jsx(ParamField,{body:`outputTokens`,type:`number`,id:`param-output-tokens`,children:_jsxs(_components.p,{children:[`Output token count. Legacy alias: `,_jsx(_components.code,{children:`output_tokens`}),`.`]})}),`\n`,_jsx(ParamField,{body:`cacheReadTokens`,type:`number`,id:`param-cache-read-tokens`,children:_jsxs(_components.p,{children:[`Prompt-cache read tokens - a subset of `,_jsx(_components.code,{children:`inputTokens`}),`, not additional tokens. Priced at the\nmodel’s cache-read rate when one is configured. Legacy alias: `,_jsx(_components.code,{children:`cache_read_tokens`}),`.`]})}),`\n`,_jsx(ParamField,{body:`cacheWriteTokens`,type:`number`,id:`param-cache-write-tokens`,children:_jsxs(_components.p,{children:[`Prompt-cache write tokens - also a subset of `,_jsx(_components.code,{children:`inputTokens`}),`. Legacy alias:\n`,_jsx(_components.code,{children:`cache_write_tokens`}),`.`]})}),`\n`,_jsx(ParamField,{body:`spanId`,type:`string`,id:`param-span-id`,children:_jsxs(_components.p,{children:[`Stable client-supplied span identity. Makes ingest idempotent: replaying the same `,_jsx(_components.code,{children:`spanId`}),`\nstores nothing new, triggers no duplicate monitoring or judging, and returns the original\ntrace id with `,_jsx(_components.code,{children:`deduped: true`}),`. Legacy alias: `,_jsx(_components.code,{children:`span_id`}),`.`]})}),`\n`,_jsx(ParamField,{body:`parentSpanId`,type:`string`,id:`param-parent-span-id`,children:_jsxs(_components.p,{children:[`The parent span’s `,_jsx(_components.code,{children:`spanId`}),`, for a real span hierarchy (OTel ingestion sends this\nunconditionally; the Python SDK sends it with `,_jsx(_components.code,{children:`span_tree=True`}),`). Child spans skip agent\nresolution, the daily trace quota, and the monitoring pipeline (set\n`,_jsx(_components.code,{children:`AGENTX_MONITOR_CHILD_SPANS=true`}),` on the engine to run monitoring on child spans too).\nLegacy alias: `,_jsx(_components.code,{children:`parent_span_id`}),`.`]})}),`\n`,_jsx(ParamField,{body:`startedAtUnixNano`,type:`string`,id:`param-started-at-unix-nano`,children:_jsxs(_components.p,{children:[`Span start time as a Unix-epoch nanosecond count, sent as a `,_jsx(_components.strong,{children:`string`}),` (the value exceeds\nsafe-integer precision as a JSON number). When present it also becomes the trace’s\n`,_jsx(_components.code,{children:`createdAt`}),`, so historical imports land in the right time window - unless the value is more\nthan 60 seconds in the future (a future-clocked start keeps the server’s own `,_jsx(_components.code,{children:`createdAt`}),`) or\nunparseable (dropped with a warning). Legacy alias: `,_jsx(_components.code,{children:`started_at_unix_nano`}),`.`]})}),`\n`,_jsx(ParamField,{body:`agentId`,type:`string`,id:`param-agent-id`,children:_jsxs(_components.p,{children:[`Explicit agent to attribute this root span to - a registered agent id from\n`,_jsx(_components.a,{href:`/api-reference/tracked-agents/add`,children:`Register Agent`}),`, or an agent name. Omit to resolve from\n`,_jsx(_components.code,{children:`name`}),`, identical to the pre-registry behavior. Legacy alias: `,_jsx(_components.code,{children:`agent_id`}),`.`]})}),`\n`,_jsx(ParamField,{body:`monitor`,type:`boolean`,id:`param-monitor`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`false`}),` skips every ingest-time check (pattern detection, online and custom evaluators,\ntopics) for this trace - eval harnesses send this. `,_jsx(_components.code,{children:`true`}),` opts eval-run traffic back into\nmonitoring, and combined with `,_jsx(_components.code,{children:`patternIds`}),` restricts detection to those patterns. Omitted:\nthe default sweep runs on every root span.`]})}),`\n`,_jsx(ParamField,{body:`patternIds`,type:`array`,id:`param-pattern-ids`,children:_jsxs(_components.p,{children:[`Custom pattern ids to restrict detection to. Only meaningful alongside `,_jsx(_components.code,{children:`monitor: true`}),`.\nLegacy alias: `,_jsx(_components.code,{children:`pattern_ids`}),`.`]})}),`\n`,_jsx(ParamField,{body:`workspaceId`,type:`string`,id:`param-workspace-id`,children:_jsx(_components.p,{children:`Accepted for wire compatibility with the hosted SaaS payload shape; ignored by the self-host\nengine (the API key already selects the project).`})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Payload caps`}),`: `,_jsx(_components.code,{children:`input`}),`, `,_jsx(_components.code,{children:`output`}),`, `,_jsx(_components.code,{children:`error`}),`, `,_jsx(_components.code,{children:`toolCalls`}),`, `,_jsx(_components.code,{children:`metadata`}),`, and\n`,_jsx(_components.code,{children:`performanceSummary`}),` are each capped at 100,000 characters serialized\n(`,_jsx(_components.code,{children:`AGENTX_INGEST_MAX_FIELD_CHARS`}),`). Oversized fields are stored truncated with an explicit\n`,_jsx(_components.code,{children:`agentx.truncated`}),` marker, never rejected.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns `,_jsx(_components.code,{children:`200 OK`}),` once the span is durably accepted (monitoring and evaluator checks run in the\nbackground after the response).`]}),`\n`,_jsx(ResponseField,{name:`traceId`,type:`string`,id:`param-trace-id`,children:_jsx(_components.p,{children:`ID of the stored trace. Canonical key.`})}),`\n`,_jsx(ResponseField,{name:`trace_id`,type:`string`,id:`param-trace-id-1`,children:_jsx(_components.p,{children:`The same id under its legacy snake_case key, kept for existing SDKs. Both keys are always\npresent and always equal.`})}),`\n`,_jsx(ResponseField,{name:`deduped`,type:`boolean`,id:`param-deduped`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` when a span with the same `,_jsx(_components.code,{children:`spanId`}),` was already stored; the returned id is the\noriginal trace’s, and no monitoring or judging re-ran.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Body`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ \"error\": \"Invalid trace payload\", \"details\": ... }`})}),_jsxs(_components.td,{children:[`Schema validation failed (e.g. missing `,_jsx(_components.code,{children:`name`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ \"error\": \"Ingest queue is full - retry with backoff (Retry-After: 1s).\" }`})}),_jsxs(_components.td,{children:[`Backpressure; retry after the `,_jsx(_components.code,{children:`Retry-After`}),` header (1s). Nothing was stored`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ \"error\": \"Daily trace quota reached (...)\" }`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AGENTX_QUOTA_TRACES_PER_DAY`}),` hit; resets at midnight. Child spans are exempt`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`503`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ \"error\": \"Trace storage is unavailable - the span was not stored; retry.\" }`})}),_jsxs(_components.td,{children:[`Storage flush failed; retry after the `,_jsx(_components.code,{children:`Retry-After`}),` header (2s)`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Retries are safe: send a `,_jsx(_components.code,{children:`spanId`}),` and a redelivered span dedupes instead of duplicating.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Submit Trace","api":"POST /api/v1/ingest/traces","description":"Ingest a single span or agent run into the engine's trace store","href":"/api-reference/tracing/submit-trace"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Records one span (an agent run, LLM call, tool call, or retrieval step) in the project selected\nby your API key. This is the endpoint the Python SDK’s `,_jsx(_components.code,{children:`client.tracer.trace(...)`}),` posts to, and\nthe one to call directly from any language the SDK doesn’t cover. The response returns the\nstored trace’s id, which you can pass to\n`,_jsx(_components.a,{href:`/api-reference/tracing/evaluate-trace`,children:`Evaluate Trace`}),` or link to an evaluation result.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Casing`}),`: camelCase keys (`,_jsx(_components.code,{children:`latencyMs`}),`, `,_jsx(_components.code,{children:`sessionId`}),`, …) are the canonical wire form, and\nthe snake_case spellings (`,_jsx(_components.code,{children:`latency_ms`}),`, `,_jsx(_components.code,{children:`session_id`}),`, …) are accepted as legacy aliases on\nthis endpoint only, for existing SDKs. If a request carries both spellings of a key, the\nsnake_case value wins. New integrations should send camelCase.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(ParamField,{header:`x-api-key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsx(_components.p,{children:`Project API key. The key alone selects the project; no project id is sent.`})}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsxs(_components.p,{children:[`Agent or operation label. For a root span, the name resolves to a registered agent\n(auto-registering one on first use) unless `,_jsx(_components.code,{children:`agentId`}),` says otherwise.`]})}),`\n`,_jsx(ParamField,{body:`input`,type:`any`,id:`param-input`,children:_jsx(_components.p,{children:`Agent input: string, JSON object, array, etc.`})}),`\n`,_jsx(ParamField,{body:`output`,type:`any`,id:`param-output`,children:_jsx(_components.p,{children:`Agent output.`})}),`\n`,_jsx(ParamField,{body:`error`,type:`string`,id:`param-error`,children:_jsx(_components.p,{children:`Error message if the run failed.`})}),`\n`,_jsx(ParamField,{body:`latencyMs`,type:`number`,id:`param-latency-ms`,children:_jsxs(_components.p,{children:[`End-to-end wall-clock latency in milliseconds. Legacy alias: `,_jsx(_components.code,{children:`latency_ms`}),`.`]})}),`\n`,_jsx(ParamField,{body:`framework`,type:`string`,id:`param-framework`,children:_jsxs(_components.p,{children:[`Platform label - an SDK integration literal (`,_jsx(_components.code,{children:`\"langchain\"`}),`, `,_jsx(_components.code,{children:`\"crewai\"`}),`, `,_jsx(_components.code,{children:`\"openai-agents\"`}),`,\n`,_jsx(_components.code,{children:`\"anthropic\"`}),`, …), an OTel scope name, or any custom string for platforms AgentX has no\nintegration for. Trimmed, folded to lowercase, and capped at 64 characters on ingest, so\n`,_jsx(_components.code,{children:`\"LangChain\"`}),` and `,_jsx(_components.code,{children:`\"langchain\"`}),` chart and filter as one platform. Unlabeled traces bucket as\n“other” in the dashboard. See `,_jsx(_components.a,{href:`/trace/platform-detection`,children:`Platform detection`}),`.`]})}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,id:`param-model`,children:_jsxs(_components.p,{children:[`LLM model used, e.g. `,_jsx(_components.code,{children:`\"gpt-4o\"`}),`. Must match a pricing-catalog model id for cost estimation.`]})}),`\n`,_jsx(ParamField,{body:`toolCalls`,type:`array`,id:`param-tool-calls`,children:_jsxs(_components.p,{children:[`Tool calls made during the run, as an array of objects (any keys; `,_jsx(_components.code,{children:`name`}),`, `,_jsx(_components.code,{children:`input`}),`, `,_jsx(_components.code,{children:`output`}),`,\nand `,_jsx(_components.code,{children:`success`}),` are what the monitor and judges read). Legacy alias: `,_jsx(_components.code,{children:`tool_calls`}),`.`]})}),`\n`,_jsx(ParamField,{body:`spanKind`,type:`string`,id:`param-span-kind`,children:_jsxs(_components.p,{children:[`Optional. What kind of step this span is - one of the 11 kinds: `,_jsx(_components.code,{children:`\"agent\"`}),`, `,_jsx(_components.code,{children:`\"llm\"`}),`,\n`,_jsx(_components.code,{children:`\"tool\"`}),`, `,_jsx(_components.code,{children:`\"retrieval\"`}),`, `,_jsx(_components.code,{children:`\"chain\"`}),`, `,_jsx(_components.code,{children:`\"embedding\"`}),`, `,_jsx(_components.code,{children:`\"reranker\"`}),`, `,_jsx(_components.code,{children:`\"guardrail\"`}),`,\n`,_jsx(_components.code,{children:`\"evaluator\"`}),`, `,_jsx(_components.code,{children:`\"prompt\"`}),`, or `,_jsx(_components.code,{children:`\"memory\"`}),`. Alias spellings from other vocabularies\n(OpenInference, OTel GenAI, Langfuse, MLflow, the memory SDKs) are accepted and folded onto\nthese on ingest; unrecognized values are stored as null. A span that states no kind is still\nclassified by the engine’s inference fallback (model present = `,_jsx(_components.code,{children:`llm`}),`, tool calls = `,_jsx(_components.code,{children:`tool`}),`,\nrecognised auto-generated names, else `,_jsx(_components.code,{children:`chain`}),`). Legacy alias: `,_jsx(_components.code,{children:`span_kind`}),`. See\n`,_jsx(_components.a,{href:`/trace/span-kinds`,children:`Span kinds`}),`.`]})}),`\n`,_jsx(ParamField,{body:`source`,type:`string`,id:`param-source`,children:_jsxs(_components.p,{children:[`Where the trace came from. `,_jsx(_components.code,{children:`\"eval-run\"`}),` marks traffic produced inside an offline evaluation\nrun; monitoring and the Live Traces production filter exclude it. Unknown values are stored\nas null.`]})}),`\n`,_jsx(ParamField,{body:`sessionId`,type:`string`,id:`param-session-id`,children:_jsxs(_components.p,{children:[`Groups spans from the same user session, conversation thread, or OTel trace. Legacy alias:\n`,_jsx(_components.code,{children:`session_id`}),`.`]})}),`\n`,_jsx(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:_jsx(_components.p,{children:`Arbitrary key-value metadata, stored on the trace and passed to online evaluators.`})}),`\n`,_jsx(ParamField,{body:`performanceSummary`,type:`object`,id:`param-performance-summary`,children:_jsxs(_components.p,{children:[`Arbitrary performance breakdown object, stored on the trace. Legacy alias:\n`,_jsx(_components.code,{children:`performance_summary`}),`.`]})}),`\n`,_jsx(ParamField,{body:`inputTokens`,type:`number`,id:`param-input-tokens`,children:_jsxs(_components.p,{children:[`Input token count. Legacy alias: `,_jsx(_components.code,{children:`input_tokens`}),`.`]})}),`\n`,_jsx(ParamField,{body:`outputTokens`,type:`number`,id:`param-output-tokens`,children:_jsxs(_components.p,{children:[`Output token count. Legacy alias: `,_jsx(_components.code,{children:`output_tokens`}),`.`]})}),`\n`,_jsx(ParamField,{body:`cacheReadTokens`,type:`number`,id:`param-cache-read-tokens`,children:_jsxs(_components.p,{children:[`Prompt-cache read tokens - a subset of `,_jsx(_components.code,{children:`inputTokens`}),`, not additional tokens. Priced at the\nmodel’s cache-read rate when one is configured. Legacy alias: `,_jsx(_components.code,{children:`cache_read_tokens`}),`.`]})}),`\n`,_jsx(ParamField,{body:`cacheWriteTokens`,type:`number`,id:`param-cache-write-tokens`,children:_jsxs(_components.p,{children:[`Prompt-cache write tokens - also a subset of `,_jsx(_components.code,{children:`inputTokens`}),`. Legacy alias:\n`,_jsx(_components.code,{children:`cache_write_tokens`}),`.`]})}),`\n`,_jsx(ParamField,{body:`spanId`,type:`string`,id:`param-span-id`,children:_jsxs(_components.p,{children:[`Stable client-supplied span identity. Makes ingest idempotent: replaying the same `,_jsx(_components.code,{children:`spanId`}),`\nstores nothing new, triggers no duplicate monitoring or judging, and returns the original\ntrace id with `,_jsx(_components.code,{children:`deduped: true`}),`. Legacy alias: `,_jsx(_components.code,{children:`span_id`}),`.`]})}),`\n`,_jsx(ParamField,{body:`parentSpanId`,type:`string`,id:`param-parent-span-id`,children:_jsxs(_components.p,{children:[`The parent span’s `,_jsx(_components.code,{children:`spanId`}),`, for a real span hierarchy (OTel ingestion sends this\nunconditionally; the Python SDK sends it with `,_jsx(_components.code,{children:`span_tree=True`}),`). Child spans skip agent\nresolution, the daily trace quota, and the monitoring pipeline (set\n`,_jsx(_components.code,{children:`AGENTX_MONITOR_CHILD_SPANS=true`}),` on the engine to run monitoring on child spans too).\nLegacy alias: `,_jsx(_components.code,{children:`parent_span_id`}),`.`]})}),`\n`,_jsx(ParamField,{body:`startedAtUnixNano`,type:`string`,id:`param-started-at-unix-nano`,children:_jsxs(_components.p,{children:[`Span start time as a Unix-epoch nanosecond count, sent as a `,_jsx(_components.strong,{children:`string`}),` (the value exceeds\nsafe-integer precision as a JSON number). When present it also becomes the trace’s\n`,_jsx(_components.code,{children:`createdAt`}),`, so historical imports land in the right time window - unless the value is more\nthan 60 seconds in the future (a future-clocked start keeps the server’s own `,_jsx(_components.code,{children:`createdAt`}),`) or\nunparseable (dropped with a warning). Legacy alias: `,_jsx(_components.code,{children:`started_at_unix_nano`}),`.`]})}),`\n`,_jsx(ParamField,{body:`agentId`,type:`string`,id:`param-agent-id`,children:_jsxs(_components.p,{children:[`Explicit agent to attribute this root span to - a registered agent id from\n`,_jsx(_components.a,{href:`/api-reference/tracked-agents/add`,children:`Register Agent`}),`, or an agent name. Omit to resolve from\n`,_jsx(_components.code,{children:`name`}),`, identical to the pre-registry behavior. Legacy alias: `,_jsx(_components.code,{children:`agent_id`}),`.`]})}),`\n`,_jsx(ParamField,{body:`monitor`,type:`boolean`,id:`param-monitor`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`false`}),` skips every ingest-time check (pattern detection, online and custom evaluators,\ntopics) for this trace - eval harnesses send this. `,_jsx(_components.code,{children:`true`}),` opts eval-run traffic back into\nmonitoring, and combined with `,_jsx(_components.code,{children:`patternIds`}),` restricts detection to those patterns. Omitted:\nthe default sweep runs on every root span.`]})}),`\n`,_jsx(ParamField,{body:`patternIds`,type:`array`,id:`param-pattern-ids`,children:_jsxs(_components.p,{children:[`Custom pattern ids to restrict detection to. Only meaningful alongside `,_jsx(_components.code,{children:`monitor: true`}),`.\nLegacy alias: `,_jsx(_components.code,{children:`pattern_ids`}),`.`]})}),`\n`,_jsx(ParamField,{body:`workspaceId`,type:`string`,id:`param-workspace-id`,children:_jsx(_components.p,{children:`Accepted for wire compatibility with the hosted SaaS payload shape; ignored by the self-host\nengine (the API key already selects the project).`})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Payload caps`}),`: `,_jsx(_components.code,{children:`input`}),`, `,_jsx(_components.code,{children:`output`}),`, `,_jsx(_components.code,{children:`error`}),`, `,_jsx(_components.code,{children:`toolCalls`}),`, `,_jsx(_components.code,{children:`metadata`}),`, and\n`,_jsx(_components.code,{children:`performanceSummary`}),` are each capped at 100,000 characters serialized\n(`,_jsx(_components.code,{children:`AGENTX_INGEST_MAX_FIELD_CHARS`}),`). Oversized fields are stored truncated with an explicit\n`,_jsx(_components.code,{children:`agentx.truncated`}),` marker, never rejected.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns `,_jsx(_components.code,{children:`200 OK`}),` once the span is durably accepted (monitoring and evaluator checks run in the\nbackground after the response).`]}),`\n`,_jsx(ResponseField,{name:`traceId`,type:`string`,id:`param-trace-id`,children:_jsx(_components.p,{children:`ID of the stored trace. Canonical key.`})}),`\n`,_jsx(ResponseField,{name:`trace_id`,type:`string`,id:`param-trace-id-1`,children:_jsx(_components.p,{children:`The same id under its legacy snake_case key, kept for existing SDKs. Both keys are always\npresent and always equal.`})}),`\n`,_jsx(ResponseField,{name:`deduped`,type:`boolean`,id:`param-deduped`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` when a span with the same `,_jsx(_components.code,{children:`spanId`}),` was already stored; the returned id is the\noriginal trace’s, and no monitoring or judging re-ran.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Body`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ \"error\": \"Invalid trace payload\", \"details\": ... }`})}),_jsxs(_components.td,{children:[`Schema validation failed (e.g. missing `,_jsx(_components.code,{children:`name`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ \"error\": \"Ingest queue is full - retry with backoff (Retry-After: 1s).\" }`})}),_jsxs(_components.td,{children:[`Backpressure; retry after the `,_jsx(_components.code,{children:`Retry-After`}),` header (1s). Nothing was stored`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ \"error\": \"Daily trace quota reached (...)\" }`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AGENTX_QUOTA_TRACES_PER_DAY`}),` hit; resets at midnight. Child spans are exempt`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`503`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ \"error\": \"Trace storage is unavailable - the span was not stored; retry.\" }`})}),_jsxs(_components.td,{children:[`Storage flush failed; retry after the `,_jsx(_components.code,{children:`Retry-After`}),` header (2s)`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Retries are safe: send a `,_jsx(_components.code,{children:`spanId`}),` and a redelivered span dedupes instead of duplicating.`]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`17`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` http://localhost:4700/api/v1/ingest/traces`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: agtx_local_0f3c9a17d2b84e6a5c01b9f4e7d8a2c6431b5f97a0e2d4c8\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"customer-support-agent\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"framework\": \"langchain\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"gpt-4o\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"input\": \"How do I reset my password?\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"output\": \"Click Forgot Password on the login page.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"latencyMs\": 1340,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"inputTokens\": 150,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"outputTokens\": 45,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"toolCalls\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"name\": \"search_kb\", \"input\": \"password reset\", \"output\": \"...\", \"success\": true }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sessionId\": \"user_session_abc123\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python SDK (decorator)`,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` agentx `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AgentX`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AgentX.from_env()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`@client.tracer.trace`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"customer-support-agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`framework`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"langchain\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gpt-4o\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chain.invoke(query)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`handle(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"How do I reset my password?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python SDK (get trace_id back)`,numberOfLines:`12`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` agentx `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AgentX`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AgentX.from_env()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# sync=True blocks until the trace is ingested, so trace_id is available as soon as the`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\"# `with` block exits. The decorator form above is fire-and-forget and never returns an id.\"})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.tracer.trace(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customer-support-agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`framework`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"langchain\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gpt-4o\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`sync`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` span:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` span.output `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chain.invoke(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"How do I reset my password?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(span.trace_id) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"mJ3vQ8pTr2LqYw6bZk9Xd\"`})]}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200 OK`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"trace_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mJ3vQ8pTr2LqYw6bZk9Xd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"traceId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mJ3vQ8pTr2LqYw6bZk9Xd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"deduped\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`422 Invalid payload`,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid trace payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fieldErrors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"formErrors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`429 Queue full`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ingest queue is full - retry with backoff (Retry-After: 1s).\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`503 Storage unavailable`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Trace storage is unavailable - the span was not stored; retry.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Submit Trace","api":"POST /api/v1/ingest/traces","description":"Ingest a single span or agent run into the engine's trace store","href":"/api-reference/tracing/submit-trace"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Body","slug":"body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> http://localhost:4700/api/v1/ingest/traces\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-api-key: agtx_local_0f3c9a17d2b84e6a5c01b9f4e7d8a2c6431b5f97a0e2d4c8\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"name\": \"customer-support-agent\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"framework\": \"langchain\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\": \"gpt-4o\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"input\": \"How do I reset my password?\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"output\": \"Click Forgot Password on the login page.\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"latencyMs\": 1340,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"inputTokens\": 150,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"outputTokens\": 45,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"toolCalls\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"name\": \"search_kb\", \"input\": \"password reset\", \"output\": \"...\", \"success\": true }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"sessionId\": \"user_session_abc123\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python SDK (decorator)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"9\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> agentx \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> AgentX\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">client \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> AgentX.from_env()\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">@client.tracer.trace\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"customer-support-agent\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">framework\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"langchain\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">model\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"gpt-4o\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">def\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> handle\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">query\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\">str\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) -> \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\">str\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">:\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> return\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> chain.invoke(query)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">handle(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"How do I reset my password?\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python SDK (get trace_id back)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"12\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> agentx \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> AgentX\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">client \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> AgentX.from_env()\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># sync=True blocks until the trace is ingested, so trace_id is available as soon as the\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># `with` block exits. The decorator form above is fire-and-forget and never returns an id.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">with\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> client.tracer.trace(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"customer-support-agent\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">framework\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"langchain\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">model\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"gpt-4o\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">sync\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">True\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">as\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> span:\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> span.output \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> chain.invoke(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"How do I reset my password?\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(span.trace_id) \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># \"mJ3vQ8pTr2LqYw6bZk9Xd\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200 OK","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"5\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"trace_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"mJ3vQ8pTr2LqYw6bZk9Xd\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"traceId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"mJ3vQ8pTr2LqYw6bZk9Xd\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"deduped\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"422 Invalid payload","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Invalid trace payload\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"details\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"fieldErrors\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Required\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">] },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"formErrors\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: []\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"429 Queue full","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Ingest queue is full - retry with backoff (Retry-After: 1s).\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"503 Storage unavailable","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Trace storage is unavailable - the span was not stored; retry.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Submit Trace","path":"/api/v1/ingest/traces","servers":[{"url":"http://localhost:4700"}],"method":"post","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"x-api-key":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{"x-api-key":{"schema":[{"type":"string","description":"Project API key. The key alone selects the project; no project id is sent.","required":true}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"name":[{"type":"string","description":"Agent or operation label. For a root span, the name resolves to a registered agent (auto-registering one on first use) unless `agentId` says otherwise.","required":true}],"input":[{"type":"any","description":"Agent input: string, JSON object, array, etc."}],"output":[{"type":"any","description":"Agent output."}],"error":[{"type":"string","description":"Error message if the run failed."}],"latencyMs":[{"type":"number","description":"End-to-end wall-clock latency in milliseconds. Legacy alias: `latency_ms` ."}],"framework":[{"type":"string","description":"Platform label - an SDK integration literal ( `\"langchain\"` , `\"crewai\"` , `\"openai-agents\"` , `\"anthropic\"` , …), an OTel scope name, or any custom string for platforms AgentX has no integration for. Trimmed, folded to lowercase, and capped at 64 characters on ingest, so `\"LangChain\"` and `\"langchain\"` chart and filter as one platform. Unlabeled traces bucket as “other” in the dashboard. See Platform detection ."}],"model":[{"type":"string","description":"LLM model used, e.g. `\"gpt-4o\"` . Must match a pricing-catalog model id for cost estimation."}],"toolCalls":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Tool calls made during the run, as an array of objects (any keys; `name` , `input` , `output` , and `success` are what the monitor and judges read). Legacy alias: `tool_calls` ."}],"spanKind":[{"type":"string","description":"Optional. What kind of step this span is - one of the 11 kinds: `\"agent\"` , `\"llm\"` , `\"tool\"` , `\"retrieval\"` , `\"chain\"` , `\"embedding\"` , `\"reranker\"` , `\"guardrail\"` , `\"evaluator\"` , `\"prompt\"` , or `\"memory\"` . Alias spellings from other vocabularies (OpenInference, OTel GenAI, Langfuse, MLflow, the memory SDKs) are accepted and folded onto these on ingest; unrecognized values are stored as null. A span that states no kind is still classified by the engine’s inference fallback (model present = `llm` , tool calls = `tool` , recognised auto-generated names, else `chain` ). Legacy alias: `span_kind` . See Span kinds ."}],"source":[{"type":"string","description":"Where the trace came from. `\"eval-run\"` marks traffic produced inside an offline evaluation run; monitoring and the Live Traces production filter exclude it. Unknown values are stored as null."}],"sessionId":[{"type":"string","description":"Groups spans from the same user session, conversation thread, or OTel trace. Legacy alias: `session_id` ."}],"metadata":[{"type":"object","properties":{},"description":"Arbitrary key-value metadata, stored on the trace and passed to online evaluators."}],"performanceSummary":[{"type":"object","properties":{},"description":"Arbitrary performance breakdown object, stored on the trace. Legacy alias: `performance_summary` ."}],"inputTokens":[{"type":"number","description":"Input token count. Legacy alias: `input_tokens` ."}],"outputTokens":[{"type":"number","description":"Output token count. Legacy alias: `output_tokens` ."}],"cacheReadTokens":[{"type":"number","description":"Prompt-cache read tokens - a subset of `inputTokens` , not additional tokens. Priced at the model’s cache-read rate when one is configured. Legacy alias: `cache_read_tokens` ."}],"cacheWriteTokens":[{"type":"number","description":"Prompt-cache write tokens - also a subset of `inputTokens` . Legacy alias: `cache_write_tokens` ."}],"spanId":[{"type":"string","description":"Stable client-supplied span identity. Makes ingest idempotent: replaying the same `spanId` stores nothing new, triggers no duplicate monitoring or judging, and returns the original trace id with `deduped: true` . Legacy alias: `span_id` ."}],"parentSpanId":[{"type":"string","description":"The parent span’s `spanId` , for a real span hierarchy (OTel ingestion sends this unconditionally; the Python SDK sends it with `span_tree=True` ). Child spans skip agent resolution, the daily trace quota, and the monitoring pipeline (set `AGENTX_MONITOR_CHILD_SPANS=true` on the engine to run monitoring on child spans too). Legacy alias: `parent_span_id` ."}],"startedAtUnixNano":[{"type":"string","description":"Span start time as a Unix-epoch nanosecond count, sent as a string (the value exceeds safe-integer precision as a JSON number). When present it also becomes the trace’s `createdAt` , so historical imports land in the right time window - unless the value is more than 60 seconds in the future (a future-clocked start keeps the server’s own `createdAt` ) or unparseable (dropped with a warning). Legacy alias: `started_at_unix_nano` ."}],"agentId":[{"type":"string","description":"Explicit agent to attribute this root span to - a registered agent id from Register Agent , or an agent name. Omit to resolve from `name` , identical to the pre-registry behavior. Legacy alias: `agent_id` ."}],"monitor":[{"type":"boolean","description":"`false` skips every ingest-time check (pattern detection, online and custom evaluators, topics) for this trace - eval harnesses send this. `true` opts eval-run traffic back into monitoring, and combined with `patternIds` restricts detection to those patterns. Omitted: the default sweep runs on every root span."}],"patternIds":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Custom pattern ids to restrict detection to. Only meaningful alongside `monitor: true` . Legacy alias: `pattern_ids` ."}],"workspaceId":[{"type":"string","description":"Accepted for wire compatibility with the hosted SaaS payload shape; ignored by the self-host engine (the API key already selects the project)."}]}}],"examples":{"example":{"value":{"name":"\u003cstring>","input":"\u003cany>","output":"\u003cany>","error":"\u003cstring>","latencyMs":123,"framework":"\u003cstring>","model":"\u003cstring>","toolCalls":[{}],"spanKind":"\u003cstring>","source":"\u003cstring>","sessionId":"\u003cstring>","metadata":{},"performanceSummary":{},"inputTokens":123,"outputTokens":123,"cacheReadTokens":123,"cacheWriteTokens":123,"spanId":"\u003cstring>","parentSpanId":"\u003cstring>","startedAtUnixNano":"\u003cstring>","agentId":"\u003cstring>","monitor":true,"patternIds":[{}],"workspaceId":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"traceId":[{"type":"string","description":"ID of the stored trace. Canonical key."}],"trace_id":[{"type":"string","description":"The same id under its legacy snake_case key, kept for existing SDKs. Both keys are always present and always equal."}],"deduped":[{"type":"boolean","description":"`true` when a span with the same `spanId` was already stored; the returned id is the original trace’s, and no monitoring or judging re-ran."}]}}],"examples":{"example":{"value":{"traceId":"\u003cstring>","trace_id":"\u003cstring>","deduped":true}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"agentx-ffe8d995","siteName":"AgentX","title":"Submit Trace - AgentX","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-14T02:27:30.251Z","originalFileLocation":"api-reference/tracing/submit-trace.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Ingest a single span or agent run into the engine\u0026#x27;s trace store\">\u003cmeta data-mint-head name=\"application-name\" content=\"AgentX\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/agentx-ffe8d995/sticQuUfAA1h_xwo/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/agentx-ffe8d995/sticQuUfAA1h_xwo/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/agentx-ffe8d995/sticQuUfAA1h_xwo/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/agentx-ffe8d995/sticQuUfAA1h_xwo/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/agentx-ffe8d995/sticQuUfAA1h_xwo/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/agentx-ffe8d995/sticQuUfAA1h_xwo/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/agentx-ffe8d995/sticQuUfAA1h_xwo/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/agentx-ffe8d995/sticQuUfAA1h_xwo/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/agentx-ffe8d995/sticQuUfAA1h_xwo/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Submit Trace - AgentX\">\u003cmeta data-mint-head property=\"og:description\" content=\"Ingest a single span or agent run into the engine\u0026#x27;s trace store\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AgentX\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.agentx.so/api-reference/tracing/submit-trace\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://agentx-ffe8d995.mintlify.site/_mintlify/api/og/v2?division=Tracing\u0026amp;title=Submit+Trace\u0026amp;description=Ingest+a+single+span+or+agent+run+into+the+engine%27s+trace+store\u0026amp;theme=2ebdc38e645cd0f197f78a50\u0026amp;signature=ef27c63ca9e44d4b71fccbd5355fb913691c47ef360270ae731c3bc679eaa8c3\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Submit Trace - AgentX\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Ingest a single span or agent run into the engine\u0026#x27;s trace store\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://agentx-ffe8d995.mintlify.site/_mintlify/api/og/v2?division=Tracing\u0026amp;title=Submit+Trace\u0026amp;description=Ingest+a+single+span+or+agent+run+into+the+engine%27s+trace+store\u0026amp;theme=2ebdc38e645cd0f197f78a50\u0026amp;signature=ef27c63ca9e44d4b71fccbd5355fb913691c47ef360270ae731c3bc679eaa8c3\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/agentx-ffe8d995/sticQuUfAA1h_xwo/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AgentX\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2A5699\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.agentx.so/api-reference/tracing/submit-trace\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/tracing/submit-trace.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.agentx.so/#organization\",\"name\":\"AgentX\",\"url\":\"https://developers.agentx.so\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/agentx-ffe8d995/ZTzZ3HDQJ-RJxymw/logo/light.png?fit=max\u0026auto=format\u0026n=ZTzZ3HDQJ-RJxymw\u0026q=85\u0026s=c1e30c949dc1cc2aaa3a137c1ee5c77f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.agentx.so#website\",\"name\":\"AgentX\",\"url\":\"https://developers.agentx.so\",\"publisher\":{\"@id\":\"https://developers.agentx.so/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.agentx.so/api-reference/tracing/submit-trace#webpage\",\"url\":\"https://developers.agentx.so/api-reference/tracing/submit-trace\",\"name\":\"Submit Trace\",\"description\":\"Ingest a single span or agent run into the engine's trace store\",\"dateModified\":\"2026-09-14T02:27:30.251Z\",\"isPartOf\":{\"@id\":\"https://developers.agentx.so#website\"},\"breadcrumb\":{\"@id\":\"https://developers.agentx.so/api-reference/tracing/submit-trace#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.agentx.so/api-reference/tracing/submit-trace#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"AgentX\",\"item\":\"https://developers.agentx.so\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Submit Trace\",\"item\":\"https://developers.agentx.so/api-reference/tracing/submit-trace\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developers.agentx.so/api-reference/tracing/submit-trace#apireference\",\"headline\":\"Submit Trace\",\"name\":\"Submit Trace\",\"description\":\"Ingest a single span or agent run into the engine's trace store\",\"url\":\"https://developers.agentx.so/api-reference/tracing/submit-trace\",\"mainEntityOfPage\":{\"@id\":\"https://developers.agentx.so/api-reference/tracing/submit-trace#webpage\"},\"dateModified\":\"2026-09-14T02:27:30.251Z\",\"publisher\":{\"@id\":\"https://developers.agentx.so/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.agentx.so#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AgentX\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"AgentX\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/tracing/submit-trace.md","siteName":"AgentX","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"Trace","pages":[{"title":"Trace","href":"/sdk/tracing"}]},{"tab":"Scorers \u0026 Monitoring","pages":[{"title":"Scorers \u0026 Monitoring","href":"/monitor/scorers"}]},{"tab":"Offline Evaluation","pages":[{"title":"Offline Evaluation","href":"/sdk/evaluations/overview"}]},{"tab":"Improve","pages":[{"title":"Improve","href":"/improve/tool-schemas"}]},{"tab":"CI/CD","pages":[{"title":"CI/CD","href":"/integrations/self-host-ci"}]},{"tab":"API Reference","groups":[{"group":"Tracing","pages":[{"title":"Submit Trace","api":"POST /api/v1/ingest/traces","href":"/api-reference/tracing/submit-trace"},{"title":"List Traces","api":"GET /api/v1/ingest/traces","description":"Cursor-paginated list of ingested traces with database-side search and filters","href":"/api-reference/tracing/list-traces"},{"title":"Evaluate Trace","api":"POST /api/v1/ingest/traces/{traceId}/evaluate","href":"/api-reference/tracing/evaluate-trace"}]},{"group":"Custom Evaluations","pages":[{"title":"Custom Evaluations Overview","href":"/api-reference/custom-eval/overview"},{"title":"Create Dataset","api":"POST /api/v1/custom-agent-evaluations/datasets","href":"/api-reference/custom-eval/create-dataset"},{"title":"List Datasets","api":"GET /api/v1/custom-agent-evaluations/datasets","href":"/api-reference/custom-eval/list-datasets"},{"title":"Get Dataset","api":"GET /api/v1/custom-agent-evaluations/datasets/{datasetId}","href":"/api-reference/custom-eval/get-dataset"},{"title":"Create Run","api":"POST /api/v1/custom-agent-evaluations/runs","href":"/api-reference/custom-eval/create-run"},{"title":"Submit Results","api":"POST /api/v1/custom-agent-evaluations/runs/{runId}/results","href":"/api-reference/custom-eval/submit-results"},{"title":"Get Missing Results","api":"GET /api/v1/custom-agent-evaluations/runs/{runId}/missing-results","href":"/api-reference/custom-eval/missing-results"},{"title":"Finalize Run","api":"POST /api/v1/custom-agent-evaluations/runs/{runId}/finalize","href":"/api-reference/custom-eval/finalize-run"},{"title":"Analyze Run","api":"POST /api/v1/custom-agent-evaluations/runs/{runId}/analyze","href":"/api-reference/custom-eval/analyze-run"},{"title":"Get Report","api":"GET /api/v1/custom-agent-evaluations/runs/{runId}/report","href":"/api-reference/custom-eval/get-report"},{"title":"Get Run","api":"GET /api/v1/custom-agent-evaluations/runs/{runId}","href":"/api-reference/custom-eval/get-run"},{"title":"List Runs","api":"GET /api/v1/custom-agent-evaluations/runs","href":"/api-reference/custom-eval/list-runs"},{"title":"List Models","api":"GET /api/v1/agent-monitoring/portability/models","href":"/api-reference/custom-eval/list-models"}]},{"group":"CI Gate","pages":[{"title":"CI/CD Overview","href":"/api-reference/ci-cd/overview"},{"title":"Create CI Run","api":"POST /api/v1/custom-agent-evaluations/runs","href":"/api-reference/ci-cd/create-run"},{"title":"Get Test Cases","api":"GET /api/v1/custom-agent-evaluations/datasets/{datasetId}","href":"/api-reference/ci-cd/get-test-cases"},{"title":"Submit Result","api":"POST /api/v1/custom-agent-evaluations/runs/{runId}/results","href":"/api-reference/ci-cd/submit-result"},{"title":"Finalize CI Run","api":"POST /api/v1/custom-agent-evaluations/runs/{runId}/finalize","href":"/api-reference/ci-cd/finalize-run"},{"title":"Get CI Gate","api":"GET /api/v1/custom-agent-evaluations/runs/{runId}/gate","href":"/api-reference/ci-cd/get-gate"}]},{"group":"Agent Registry","pages":[{"title":"List Agents","api":"GET /api/v1/agents","href":"/api-reference/tracked-agents/list"},{"title":"Register Agent","api":"POST /api/v1/agents","href":"/api-reference/tracked-agents/add"},{"title":"Get Agent","api":"GET /api/v1/agents/{id}","href":"/api-reference/tracked-agents/get"}]}]}]},"basePath":"","title":"Submit Trace - AgentX","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CiUHMMOm.js","snippetPresets-BgfXU7Bw.js","utils-DWvOwgy_.js","style-to-object-BY3JEAdk.js","utils-BN7RXSMJ.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CFw8bq89.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CAwdfOU2.js","_Uint8Array-BJr8e-ZL.js","isObject-FP1Yky1u.js","ApiExamples-XX0UgMZK.js","usePlaygroundInputsStore-DXDFSa1V.js","shallow-CdX5aREi.js","isEqual-CoOaxexF.js","CodeSnippets-Cg2wpzWm.js","CodeSnippet-D_HwgQO_.js","getApiPlaygroundDisplay-CmCoerhe.js","Page-CVJ-f_k1.js","DynamicMarkdown-CQM9Bhbv.js","SectionHeading-DpbrP8nQ.js","icon-BPCgijHy.js","MethodPill-GQ8DuY0c.js","getPastedJson-Cb5mT31m.js","Check2Icon-a7bUI6e8.js","axios-CsQoIw0U.js"]}