POST. There is no CorePillar SDK package to install. The snippets on this page are ordinary HTTP calls you can copy into any language.
If your agent already emits OpenTelemetry spans (for example through OpenLLMetry, OpenInference or the standard OTel SDKs), you can skip the JSON format entirely and point your exporter at AgentHub. See OpenTelemetry (OTLP).
What you need
- An AgentHub project. Every trace belongs to exactly one project, chosen by the key you send it with.
- A tracing key for that project. Creating one needs the
manage_org_settingspermission, which the Owner and Admin roles have. See Roles and permissions. - Anything that can make an HTTPS request:
curl, Python, Node.js, or your agent’s own HTTP client.
Steps
1
Create a tracing key
In AgentHub, open Settings and choose Tracing keys.
- Pick the Project the traces should land in.
- Pick an Environment: Live creates a
tk_live_key, Test creates atk_test_key. Both work the same way for ingestion; the prefix just helps you keep production and test credentials apart. - Click + New live key (or + New test key).
- Copy the key from the banner with Copy key.
tk_live_ or tk_test_ followed by 48 lowercase hex characters. Full details, including revoking, are in Tracing keys.2
Store the key outside your code
Treat the key like a password. Put it in an environment variable or your secret manager, never in source control.The variable name is up to you. The examples below read
COREPILLAR_TRACING_KEY.3
Send your first trace
POST a JSON trace to the ingest endpoint:agent_run span and a child model call.fetch and crypto.randomUUID), Deno, Bun, or in an edge runtime. Don’t call the ingest endpoint from a browser: that would expose your tracing key to anyone who opens developer tools.4
Check the response
A successful ingest returns
202 Accepted:span_count and status describe the batch you just sent. The trace is stored by the time you get this response, so you can open it straight away.If something is wrong you get an error envelope instead, for example 401 UNAUTHORIZED for a bad key or 400 VALIDATION_ERROR for a malformed payload. See Errors.5
Find it in Traces
In AgentHub, open the project the key belongs to and click Traces in the sidebar. Your trace appears at the top of the list, newest first, under its
root_name. You can also search by trace_id.Open it to see each span with its kind, model, tokens, cost, latency, input and output. The Traces guide walks through the trace view.Common first-trace problems
Next steps
Trace format
Every field, type, default and limit in the ingest payload.
Idempotency and retries
Retry safely, send a trace in several batches, and handle errors.
OpenTelemetry (OTLP)
Send spans from an existing OpenTelemetry setup with no code changes.
Ingest endpoint reference
The full API reference, including authentication and errors.