Models and keys
An agent on Waken is a harness (the program that runs the agent loop) calling a model with your own API key. You pay your model provider directly. Waken takes no cut and never sees your tokens bill.
Harnesses
| Harness | What it is | Works with |
|---|---|---|
| claude-code | Anthropic's coding agent. The default. | Anthropic (key or Claude subscription), OpenRouter, DeepSeek, Moonshot |
| codex | OpenAI's Codex CLI. | OpenAI, OpenRouter |
| openclaw | The open source OpenClaw agent. Takes longer per message than the others. | Anthropic, OpenAI, Google, DeepSeek, Moonshot, OpenRouter |
| cursor | The Cursor agent, in script mode. Needs a Cursor API key from your Cursor subscription. | Cursor |
| hermes | The open source Hermes agent by Nous Research. | OpenRouter, Anthropic, OpenAI, Google, DeepSeek, Moonshot |
| zeroclaw | The open source ZeroClaw agent, a small and fast runtime with its own memory. | OpenRouter, Anthropic, OpenAI, Google, DeepSeek, Moonshot |
You can change the model or the harness of a running agent. Its files stay, the new harness receives the recent conversation, and a checkpoint is taken first so a rewind undoes the switch.
Getting a key
| Provider | Where | Environment variable |
|---|---|---|
| Anthropic | console.anthropic.com, Settings, API keys | ANTHROPIC_API_KEY |
| OpenAI | platform.openai.com, API keys | OPENAI_API_KEY |
| OpenRouter | openrouter.ai, Keys | OPENROUTER_API_KEY |
| aistudio.google.com, Get API key | GEMINI_API_KEY | |
| DeepSeek | platform.deepseek.com, API keys | DEEPSEEK_API_KEY |
| Cursor | cursor.com, Dashboard, Integrations | CURSOR_API_KEY |
| Moonshot (Kimi) | platform.moonshot.ai, API keys | MOONSHOT_API_KEY |
Most providers need a payment method or some credit before a key works. Give the agent its own key, with a spending limit at the provider if they offer one: you can then revoke it without touching anything else.
Using your Claude subscription
With Claude Code, an agent can run on your Claude Pro or Max subscription instead of an API key. Deploy it with auth: subscription and no key, then sign in once from the agent's Terminal tab: run claude, choose your Claude account, open the link it prints and paste the code back. The agent starts as soon as you are signed in, and its spend counter stays at zero.
# CLIwaken deploy --subscription# APIcurl -X POST https://api.waken.sh/agents \-H "Authorization: Bearer $WAKEN_API_KEY" -H "Content-Type: application/json" \-d '{"name": "my-agent", "model": {"provider": "anthropic", "auth": "subscription"}}'
- You sign in inside Claude Code itself, through Anthropic's own flow. Waken never sees, stores or relays your Claude login: it lives in your agent's machine, encrypted at rest like everything else.
- Your plan's limits apply: a session allowance that resets every five hours, and a weekly one. When the agent reaches them it pauses until the reset. Anthropic's advertised limits assume ordinary individual use, so an agent working all day will hit them.
- This follows Anthropic's published conditions for hosting Claude Code. If they change, this option may change with them.
- The Terminal tab works for every agent: a shell on the machine, as root, in its work folder. Your model key is never in that shell.
Choosing at deploy time
# Claude Code on Anthropic (the default when ANTHROPIC_API_KEY is set)waken deploy# Codex on OpenAIwaken deploy --harness codex --provider openai# Any harness on any OpenRouter modelexport OPENROUTER_API_KEY=sk-or-...waken deploy --harness claude-code --provider openrouter --model deepseek/deepseek-v3.2
With the API, pass a model object. The key travels in the request body and goes straight to the agent.
{"name": "bookkeeper","harness": "claude-code","model": { "provider": "openrouter", "name": "deepseek/deepseek-v3.2", "api_key": "sk-or-..." }}
Spend caps
Every agent has a spend cap, 5 dollars by default (spend_cap_usd). At the cap the agent stops cleanly and tells you. The cap is exact with Claude Code, which reports its cost. The other harnesses report tokens (or we estimate them), turned into dollars with an indicative price grid per model: a good guardrail, not an invoice, so also keep a limit on the key at your provider. GET /agents/{id}/usage shows the spend, the tokens, and whether it is estimated.
- Your key lives in the agent's memory, never in our database, and the API never returns it. The volume that holds agent disks and checkpoints is encrypted at rest.
- Deleting the agent deletes the key with it, checkpoints included.