# DeepAgents Code — GLM-5.2 on OpenRouter

> A ready-to-run DeepAgents Code (dcode) coding agent pre-wired to GLM-5.2 on OpenRouter. Bring your OpenRouter key and code with an open-weight model for cents — shell tool enabled, GLM-5.2 set as the default model.

- Agent: DeepAgents Code
- Plan: Pro (2 vCPU, 6 GiB RAM, 50 GiB disk)
- Forks: 0 · Stars: 0
- Creator: https://www.jurniti.com/creator-ca0ff2
- Tags: dcode, deepagents, glm, model-agnostic, openrouter
- Requires config (you provide): OPENROUTER_API_KEY

**To fork:** open https://www.jurniti.com/templates/deepagents-code-glm-5-2-on-openrouter and use the Fork action — it starts a Stripe Checkout for a new VM seeded with this template's persist disk (same flat plan price, no fork fee).

## README

# 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)

1. **Add your OpenRouter key** — BYOK, never snapshotted (it lives in
   `~/.deepagents/.env`, which the template scrub drops):
   ```bash
   mkdir -p ~/.deepagents
   printf 'OPENROUTER_API_KEY=%s\n' "sk-or-v1-YOUR_KEY_HERE" > ~/.deepagents/.env
   chmod 600 ~/.deepagents/.env
   ```
   Get a key at https://openrouter.ai/keys.

2. **Run the agent** — GLM-5.2 is already the default model (wired in
   `~/.deepagents/config.toml`), so just:
   ```bash
   dcode
   ```
   One-shot headless task:
   ```bash
   dcode -n "create a FastAPI hello-world app and run it"
   ```
   Explicit model form (equivalent to the default):
   ```bash
   dcode --model openrouter:z-ai/glm-5.2
   ```

## Optional

- **Web search:** set `TAVILY_API_KEY` in `~/.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.
