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, and the most capable with files and tools. | Anthropic, OpenRouter, DeepSeek, Moonshot |
| codex | OpenAI's Codex CLI. | OpenAI, OpenRouter |
| openclaw | The open source OpenClaw agent. Slower per turn, works with everything. | 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 |
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.
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. Other harnesses report tokens, not dollars, so also set a limit on the key at your provider.
- Your key lives in the agent's memory. It is not written to its files and the API never returns it.
- Deleting the agent deletes the key with it, checkpoints included.