About this template
DeepAgents Code + GLM-5.2 (OpenRouter)
A ready-to-run DeepAgents Code (dcode) coding agent, pre-wired to
GLM-5.2 on OpenRouter — an open-weight model that reads files, edits code,
and runs shell commands for a fraction of a frontier-lab subscription. The
shell tool is enabled out of the box; the only thing you bring is your key.
Quick start (after forking)
-
Add your OpenRouter key — BYOK, never snapshotted (it lives in
~/.deepagents/.env, which the template scrub drops):mkdir -p ~/.deepagents printf 'OPENROUTER_API_KEY=%s\n' "sk-or-v1-YOUR_KEY_HERE" > ~/.deepagents/.env chmod 600 ~/.deepagents/.envGet a key at https://openrouter.ai/keys.
-
Run the agent — GLM-5.2 is already the default model (wired in
~/.deepagents/config.toml), so just:dcodeOne-shot headless task:
dcode -n "create a FastAPI hello-world app and run it"Explicit model form (equivalent to the default):
dcode --model openrouter:z-ai/glm-5.2
Optional
- Web search: set
TAVILY_API_KEYin~/.deepagents/.env(https://tavily.com) to enable it. Without it, search is simply disabled — everything else works.
dcode is model-agnostic: swap --model for any OpenRouter / Anthropic / OpenAI
/ Fireworks / Baseten / local model you prefer.