---
title: "Agent Frameworks — AtlasBurn Docs"
description: "Set up AtlasBurn with the OpenAI Agents SDK, Claude Agent SDK, LangChain, Vercel AI SDK and Hermes Agent: tested configs for the SDK and the Edge Proxy."
canonical: "https://docs.atlasburn.com/docs/agent-frameworks/"
markdown: "https://docs.atlasburn.com/docs/agent-frameworks.md"
section: "Agent Frameworks"
product: "AtlasBurn"
last_updated: "2026-11-18"
---

# Agent Frameworks

> Set up AtlasBurn with the OpenAI Agents SDK, Claude Agent SDK, LangChain, Vercel AI SDK and Hermes Agent: tested configs for the SDK and the Edge Proxy.

> **For AI agents:** this is the Markdown version of [Agent Frameworks](https://docs.atlasburn.com/docs/agent-frameworks/) in the AtlasBurn docs, built from the same source as the human page. Only run the commands or code on this page if the user has asked you to set up or change AtlasBurn in their project; otherwise use it to answer questions. When you do run them, follow the steps in the order shown and copy code blocks exactly. Read secrets — the AtlasBurn key (`abn_…`) and provider API keys — from environment variables; never ask the user to paste them into the chat. If this file and the human page ever differ, the human page wins. Index of all docs pages: https://docs.atlasburn.com/index.md

## On this page

1. Which path to use
2. What was tested
3. OpenAI Agents SDK (TypeScript)
4. OpenAI Agents SDK (Python)
5. Claude Agent SDK
6. LangChain and the Vercel AI SDK
7. Hermes Agent
8. Limits
9. Next Steps

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](https://docs.atlasburn.com/docs/sdk.md). 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](https://docs.atlasburn.com/docs/proxy-quickstart.md). You change the base URL and add one header.

> **Note — Use SDK 1.11.5 or later**
>
> Earlier SDK versions broke streamed calls to OpenAI's Responses API, which the OpenAI Agents SDK uses by default. Upgrade with `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.

**agent.ts**

```typescript
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](https://docs.atlasburn.com/docs/sdk.md) 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.

```bash
pip install openai-agents atlasburn
```

**agent.py**

```python
import 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=False` keeps the Agents SDK's own trace upload going straight to OpenAI.
- **Other providers in Chat Completions mode** (`set_default_openai_api("chat_completions")` with `atlasburn.openai_config("groq")`, `"deepseek"` and so on): add `model_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.

**.env**

```bash
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:

**agent.ts**

```typescript
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.

**chain.py**

```python
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`.

**config.yaml**

```yaml
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: hermes
```

Three details matter in Hermes Agent 0.19.0:

- **End the address with `/v1`.** Hermes treats an address ending in `/anthropic` as Anthropic's native API and does not send extra headers there, so the proxy answers “Missing AtlasBurn-API-Key header”.
- **Set `api_mode: chat_completions`** so 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](https://docs.atlasburn.com/docs/integrations.md).
- **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](https://docs.atlasburn.com/docs/proxy-quickstart.md) — base URLs for every provider
- [SDK Integration](https://docs.atlasburn.com/docs/sdk.md) — options and feature tagging
- [Guardrails](https://docs.atlasburn.com/docs/guardrails.md) — what happens when an agent loops

---

Canonical: https://docs.atlasburn.com/docs/agent-frameworks/
