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

HarnessWhat it isWorks with
claude-codeAnthropic's coding agent. The default, and the most capable with files and tools.Anthropic, OpenRouter, DeepSeek, Moonshot
codexOpenAI's Codex CLI.OpenAI, OpenRouter
openclawThe open source OpenClaw agent. Slower per turn, works with everything.Anthropic, OpenAI, Google, DeepSeek, Moonshot, OpenRouter
cursorThe Cursor agent, in script mode. Needs a Cursor API key from your Cursor subscription.Cursor
hermesThe 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.

OpenRouter is the simplest way to try many models with one key: every harness supports it. We have run Claude Code, Codex, OpenClaw and Hermes against it with DeepSeek, Kimi, Gemini and GPT models. Direct connections to DeepSeek, Moonshot, Google and OpenAI are wired but less tested.

Getting a key

ProviderWhereEnvironment variable
Anthropicconsole.anthropic.com, Settings, API keysANTHROPIC_API_KEY
OpenAIplatform.openai.com, API keysOPENAI_API_KEY
OpenRouteropenrouter.ai, KeysOPENROUTER_API_KEY
Googleaistudio.google.com, Get API keyGEMINI_API_KEY
DeepSeekplatform.deepseek.com, API keysDEEPSEEK_API_KEY
Cursorcursor.com, Dashboard, IntegrationsCURSOR_API_KEY
Moonshot (Kimi)platform.moonshot.ai, API keysMOONSHOT_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

Terminal
# Claude Code on Anthropic (the default when ANTHROPIC_API_KEY is set)
waken deploy
# Codex on OpenAI
waken deploy --harness codex --provider openai
# Any harness on any OpenRouter model
export 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.

POST /agents
{
"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.
Next: plans and limits