GETTING STARTED
Quick Start
Get Keel running in under 5 minutes. Install the SDK, wrap your Anthropic client, and start tracking costs automatically.
1
Install the SDK
Terminal
pip install keel-sdk2
Wrap your Anthropic client
agent.py
import anthropic
import keel
client = keel.wrap(
anthropic.Anthropic(api_key="sk-ant-..."),
agent="my-agent",
api_url="http://localhost:8000",
api_key="your-keel-key",
)
# Use exactly like the normal Anthropic client, nothing else changes
response = client.messages.create(
model="claude-haiku-4-5-20251001",
max_tokens=100,
messages=[{"role": "user", "content": "Hello"}],
)
print(response.content[0].text)Every call automatically captures token usage and cost in a background thread. Your agent is never blocked.
3
Verify spend was tracked
Terminal
curl http://localhost:8000/api/spend/summary \
-H "X-API-Key: your-keel-key"Agent
my-agent
Cost
$0.000026
Calls
1
