Agent Frameworks
How to connect AtlasBurn to the common agent frameworks. Every setup on this page was run with real model calls on 15 November 2026, and the tokens AtlasBurn recorded were compared with the usage the framework itself reported.
Which path to use
- JavaScript or TypeScript agents running in your own Node process: use the SDK. Start it before you create any AI client; nothing else changes.
- Python agents, and agents that run as a separate program (the Claude Agent SDK, Hermes Agent): use the Edge Proxy. You change the base URL and add one header.
Use SDK 1.11.5 or later
npm install @atlasburn/sdk@latest.What was tested
| Framework | Version | Path | Result |
|---|---|---|---|
| OpenAI Agents SDK (TypeScript) | 0.22 | SDK | Exact match, streamed and not, with a tool loop |
| LangChain (JavaScript) | @langchain/anthropic 1.6 | SDK | Exact match, streamed and not |
| Vercel AI SDK | ai 7.0 | SDK | Exact match, streamed and not |
| Anthropic TypeScript SDK (your own agent loop) | 1.8 | SDK | Exact match across 976 calls |
| Claude Agent SDK | 0.3 | Proxy | Exact match, prompt caching included |
| OpenAI Agents SDK (Python) | 0.24 | Proxy | Exact match; streamed runs need include_usage (below) |
| LangChain (Python) | langchain-anthropic 1.7 | Proxy | Exact match, streamed and not |
| Anthropic and OpenAI Python clients | atlasburn 0.1.1 | Proxy | Exact match, streamed and not |
| Hermes Agent | 0.19.0 | Proxy | Exact match with the config below |
All of these ran against Claude models. The OpenAI Agents SDK was also run in its default Responses mode against a test server that replays OpenAI's documented response format; a full run against the live OpenAI API is still pending.
OpenAI Agents SDK (TypeScript)
Start AtlasBurn first. The Agents SDK then works unchanged, in both Responses and Chat Completions mode.
import { initAtlasBurnAuto } from "@atlasburn/sdk";
initAtlasBurnAuto({ apiKey: process.env.ATLASBURN_KEY, metadata: { featureId: "support-agent" } });
import { Agent, run } from "@openai/agents";
const agent = new Agent({ name: "Support", instructions: "Help the customer.", model: "gpt-4.1-mini" });
const result = await run(agent, "Where is my order?");metadata.featureId labels every call from this process. See SDK Integration for tagging single calls.
OpenAI Agents SDK (Python)
Give the Agents SDK a client that points at the proxy. The atlasburn package builds the base URL and headers.
pip install openai-agents atlasburnimport atlasburn
from openai import AsyncOpenAI
from agents import Agent, Runner, ModelSettings, set_default_openai_client
# Reads ATLASBURN_KEY from the environment. Your OpenAI key stays in OPENAI_API_KEY.
client = AsyncOpenAI(**atlasburn.openai_config(feature="support-agent"))
set_default_openai_client(client, use_for_tracing=False)
agent = Agent(name="Support", instructions="Help the customer.", model="gpt-4.1-mini")
result = Runner.run_sync(agent, "Where is my order?")use_for_tracing=Falsekeeps the Agents SDK's own trace upload going straight to OpenAI.- Other providers in Chat Completions mode (
set_default_openai_api("chat_completions")withatlasburn.openai_config("groq"),"deepseek"and so on): addmodel_settings=ModelSettings(include_usage=True)to the agent. Without it, streamed runs carry no token counts, and AtlasBurn can only estimate them.
Claude Agent SDK
The Claude Agent SDK runs Claude Code as a separate program, so the Node SDK cannot see its calls. Use the proxy by setting two environment variables. This was tested with the TypeScript Agent SDK; the Python Agent SDK and Claude Code itself run the same program and read the same variables.
ANTHROPIC_BASE_URL=https://proxy.atlasburn.com/anthropic
ANTHROPIC_CUSTOM_HEADERS="AtlasBurn-API-Key: abn_xxxxxxxxxxxxxxxxxxxx
x-atlasburn-feature: coding-agent"Or pass them when you start the agent:
import { query } from "@anthropic-ai/claude-agent-sdk";
for await (const message of query({
prompt: "Summarise the open issues.",
options: {
env: {
...process.env,
ANTHROPIC_BASE_URL: "https://proxy.atlasburn.com/anthropic",
ANTHROPIC_CUSTOM_HEADERS: `AtlasBurn-API-Key: ${process.env.ATLASBURN_KEY}\nx-atlasburn-feature: coding-agent`,
},
},
})) {
// handle messages
}- Put each header on its own line, as
Name: Value. - AtlasBurn records every call the agent makes, including small background calls that the Agent SDK leaves out of its own usage total. Expect AtlasBurn's number to be slightly higher, and closer to your invoice.
LangChain and the Vercel AI SDK
JavaScript: start the SDK at the top of your entry file, as in the OpenAI Agents example above. LangChain, LangGraph and the Vercel AI SDK need no other change.
Python: pass the proxy settings to the chat model.
import atlasburn
from langchain_anthropic import ChatAnthropic
cfg = atlasburn.anthropic_config(feature="research-chain")
llm = ChatAnthropic(model="claude-haiku-4-5", base_url=cfg["base_url"], default_headers=cfg["default_headers"])Hermes Agent
Add AtlasBurn as a provider in Hermes Agent's config.yaml. Hermes sends the AtlasBurn key through extra_headers.
model:
provider: atlasburn
default: claude-haiku-4-5
api_mode: chat_completions
max_tokens: 2048
providers:
atlasburn:
name: AtlasBurn proxy
api: https://proxy.atlasburn.com/anthropic/v1
key_env: ANTHROPIC_API_KEY
extra_headers:
AtlasBurn-API-Key: "abn_xxxxxxxxxxxxxxxxxxxx"
x-atlasburn-feature: hermesThree details matter in Hermes Agent 0.19.0:
- End the address with
/v1. Hermes treats an address ending in/anthropicas Anthropic's native API and does not send extra headers there, so the proxy answers “Missing AtlasBurn-API-Key header”. - Set
api_mode: chat_completionsso Hermes uses the OpenAI-compatible route. - Set
max_tokens. Hermes's default is higher than some Claude models accept, and the provider rejects the call.
For another provider, change api to that provider's proxy address (for example https://proxy.atlasburn.com/openrouter/v1) and key_env to its key.
Limits
- Streaming through the proxy on non-OpenAI routes: the client must ask for usage (
stream_options.include_usage). Most frameworks do. If one does not, AtlasBurn records an estimate. - Realtime and voice agents use WebSockets, which neither the SDK nor the proxy captures yet.
- Bedrock, Vertex AI and Azure OpenAI cannot go through the proxy. See the Provider Matrix.
- One feature label per process unless your framework lets you set headers on single calls. Guardrails act per feature, so give each agent its own label where you can.
Next Steps
- Proxy Quickstart — base URLs for every provider
- SDK Integration — options and feature tagging
- Guardrails — what happens when an agent loops