Skip to main content
AgentMark ingests traces over OpenTelemetry. Anything that exports OTLP — the AgentMark SDK, a framework instrumentor, or a raw OpenTelemetry setup — can send spans to AgentMark by pointing its exporter at one endpoint. There is no AgentMark-specific exporter to install. This page covers the endpoint and authentication. If you’re using a framework, start with the ecosystem that instruments it:

OpenInference

LangChain, LlamaIndex, OpenAI Agents SDK, CrewAI, DSPy, Haystack, and more

OpenLLMetry

Traceloop and OpenLIT instrumentors — AutoGen, Semantic Kernel, Agno, and more

Endpoint

AgentMark accepts OTLP over HTTP at:
https://api.agentmark.co/v1/traces
Every request needs two headers:
HeaderValueRequired
AuthorizationYour AgentMark API key, sent as the raw value (no Bearer prefix)Yes — missing returns 401
X-Agentmark-App-IdThe app the traces belong toYes — missing returns 400
Find both in your project settings. The API key authenticates the request; the app id routes the spans to the right app.

Point an exporter at AgentMark

Most OpenTelemetry SDKs and instrumentors read the standard OTLP environment variables, so no code change is needed:
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="https://api.agentmark.co/v1/traces"
OTEL_EXPORTER_OTLP_TRACES_HEADERS="Authorization=<YOUR_API_KEY>,X-Agentmark-App-Id=<YOUR_APP_ID>"
To configure the exporter in code instead:
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";

const exporter = new OTLPTraceExporter({
  url: "https://api.agentmark.co/v1/traces",
  headers: {
    Authorization: process.env.AGENTMARK_API_KEY!, // raw key, no "Bearer" prefix
    "X-Agentmark-App-Id": process.env.AGENTMARK_APP_ID!,
  },
});
For local development, npx @agentmark-ai/cli dev accepts the same OTLP format at http://localhost:9418/v1/traces, so you can point any instrumentor at your dev server before sending to the cloud.

Supported semantic conventions

AgentMark reads several attribute conventions and normalizes them into one trace model — model, token usage, input and output messages, tool calls, and span kind — so cost and latency are computed the same way regardless of which library produced the span.
ConventionRecognized byNotes
OpenTelemetry GenAI (gen_ai.*)The official gen_ai semantic conventionsThe default. Spec-compliant emitters (including Pydantic AI via Logfire) work with no extra mapping
OpenInferenceopeninference.span.kind and llm.* attributesThe Arize instrumentor ecosystem — see OpenInference
OpenLLMetry / Tracelooptraceloop.* and indexed gen_ai.prompt.* / gen_ai.completion.* attributesTraceloop and OpenLIT instrumentors — see OpenLLMetry
Spans that match none of these are still stored with their attributes intact; only the normalized fields (model, tokens, I/O) depend on a recognized convention.

What AgentMark does with a span

Once a span arrives, AgentMark:
  • Classifies it as a model call (GENERATION) or another operation (SPAN), and resolves a span kindllm, tool, agent, retrieval, embedding, or guardrail.
  • Extracts the model, token counts, input and output, tool calls, and settings.
  • Computes cost from the model and token counts using its pricing model.
No span kind or attribute mapping is required from you — AgentMark infers it from the convention the instrumentor used.

Next steps

OpenInference

Trace LangChain, LlamaIndex, CrewAI, and the rest of the OpenInference ecosystem

OpenLLMetry

Trace AutoGen, Semantic Kernel, Agno, and other Traceloop/OpenLIT-instrumented frameworks

AgentMark SDK tracing

Instrument your own code directly with the AgentMark SDK

Traces and logs

Explore the traces once they arrive

Have questions?

Reach out any time: