Three parts. One account. Point your OTel traces at us, open a dashboard, and connect the agent itself to the same data via MCP + skill — so it can propose, benchmark and apply its own cost reductions.
Your agent's OTel spans flow in. Vendor-neutral, EU-hosted, no proxy latency. One env var to turn on.
You (the human) see spend-per-day, per-model, per-project, per-user, plus concrete recommendations.
The agent connects to the same data via MCP tools and a markdown skill. It can inspect, benchmark, and reduce its own cost — with you in the loop.
Point your existing OpenTelemetry pipeline at us. Works with Claude Code (the CLI), LangChain, LlamaIndex, CrewAI, Mastra, Vercel AI SDK, Vertex AI, Bedrock, or any custom code that uses an OTel-instrumented OpenAI / Anthropic / Google SDK.
Claude Code v2.1+ emits OpenTelemetry metrics for every LLM call out of the box. Export these env vars (easiest: put them in a claude shell wrapper or a per-project .envrc) and your spend starts flowing in on the next session:
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_EXPORTER_OTLP_ENDPOINT=https://adapterly.ai/ingest
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_METRICS_EXPORTER=otlp
export OTEL_LOGS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_HEADERS="X-API-Key=adk_your_key_here"
No forwarder, no proxy, no code changes. We parse Claude Code's native claude_code.token.usage + claude_code.cost.usage metrics and fold them into the same dashboard as all other sources. Backfill of past sessions is optional — see the forwarder script.
For code that already uses the OTel SDK (LangChain, OpenAI SDK + openinference, custom instrumentation), point traces at us:
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://adapterly.ai/ingest/v1/traces
OTEL_EXPORTER_OTLP_TRACES_HEADERS=X-API-Key=adk_your_key_here
We accept both OTLP protocols — http/protobuf (the OTel SDK default) and http/json. No protocol override needed.
If you don't yet have an OTel SDK wired up, one package + three lines gets you going:
# Python example — same pattern for OpenAI / Anthropic / LangChain
pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http \
openinference-instrumentation-openai
# in your app startup:
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from openinference.instrumentation.openai import OpenAIInstrumentor
trace.set_tracer_provider(TracerProvider())
trace.get_tracer_provider().add_span_processor(
BatchSpanProcessor(OTLPSpanExporter()) # reads OTEL_* env vars
)
OpenAIInstrumentor().instrument()
# ...your existing OpenAI client code, unchanged...
Spend-per-day chart, top models / projects / users, cache-read ratio, and rule-based recommendations. API key stays in your browser (localStorage) — nothing is sent anywhere except to this dashboard's backend.
This is the part that makes Adapterly different. The same data your dashboard shows, the agent can read itself through four MCP tools:
my_spend_today() — quick status checkmy_spend_window(days=N) — trend + monthly projectionmy_breakdown(by='model'|'project'|'user') — find the cost driversmy_recommendations() — concrete reduction ideas with impact estimatesclaude mcp add --transport http adapterly-ingest \
https://adapterly.ai/ingest/mcp/ \
--header "X-API-Key: adk_your_key_here"
{
"mcpServers": {
"adapterly-ingest": {
"url": "https://adapterly.ai/ingest/mcp/",
"headers": {"X-API-Key": "adk_your_key_here"}
}
}
}
The skill tells the agent when to call which tool and how to interpret the result. For Claude Code, drop it under ~/.claude/skills/:
mkdir -p ~/.claude/skills
curl -o ~/.claude/skills/adapterly-cost-aware.md \
https://adapterly.ai/ingest/skill.md
Other clients: paste the skill markdown as a system prompt or custom instruction.
The agent treated the recommendation as a hypothesis, pulled context from its own session, and asked you before changing anything — following the skill guide. That's the loop.
Free during our beta. Terms: honest feedback and, if the data is useful, permission for an anonymized case study.
Post-beta plans (indicative):
Request a pilot API key, point your OTel pipeline at us, connect the MCP + skill to your agent, and watch it propose reductions in your own chat.
Request pilot access