Cheap Agent
Your frontier model is a principal engineer. Stop paying it to type.
Same feature. Same prompt. 63% fewer Opus tokens.
Your Claude or ChatGPT plan lasts longer. Your code still ships with tests.
⭐ Star it, and click Watch → Custom → Releases to hear when new versions ship.
💬 Questions, ideas and setups: r/CheapAgent
Install
Works in Claude Code and Codex. One login covers both.
Let agent install
Copy this into Claude Code or Codex and let the agent take it from there. It asks what you want, sets things up, and gives you one command to run yourself, where you type your API key.
Set up Cheap Agent (npm: cheap-agent) for me.
1. Ask me which provider (OpenCode Go, OpenRouter recommended for a hosted one, DeepSeek,
Ollama for a local model with no key, Command Code, OpenCode Zen, or Custom endpoint for any OpenAI-compatible API)
and which models (balanced is the default; cheapest, strongest, or my own provider/model).
2. Check that node is 20+, and whether I use Claude Code (claude CLI), Codex (codex CLI) or both.
3. If I picked my own model, save {"models":{"implement":"<model>"}} in
~/.config/cheapag/config.json, keeping what else is there.
4. Give me the command to run in my terminal: npx cheap-agent login --preset <my choice, or custom>,
and which provider to pick with the arrow keys or its number (1 OpenCode Go, 2 OpenRouter,
3 DeepSeek, 4 Ollama, 5 Command Code, 6 OpenCode Zen, 7 Custom endpoint). If I picked Ollama Cloud, tell me to
export OLLAMA_API_KEY before running it. If I don't use Claude Code, tell me
to say no when it offers to add itself there. I run it and type my API key there. Never ask for my key.
5. When I say done: for Claude Code, check `claude mcp list` shows cheapag. For Codex, run
`codex plugin marketplace add muaaz9329/cheap-ag` and `codex plugin add cheapag@cheap-agent`.
6. Tell me to open a new session in my project and run /cheapag:allow in Claude Code, or
$cheapag:allow in Codex (trusting the 3 cheapag hooks when it asks).
Claude Code
npx cheap-agent
Pick a provider (OpenRouter if unsure), press Enter for the recommended models, paste your API key. It checks the key works, then adds itself to Claude Code for every project.
Then, in each project, once:
/cheapag:allow
That's it. Ask Claude for changes like you always do.
Codex
Log in (say no when it offers to add itself to Claude Code, if you don't use Claude):
npx cheap-agent
Add the plugin:
codex plugin marketplace add muaaz9329/cheap-ag
codex plugin add cheapag@cheap-agent
Start codex in your project and trust the 3 cheapag hooks when it asks. Then, in each project, once:
$cheapag:allow
That's it. Ask Codex for changes like you always do.
You need
It runs on macOS, Linux and Windows.