โ—† Vibe EngineeringSMIT ยท AI Agentic Engineering
Class 6 ยท 6.4

AMP, OpenRouter & Ollama: more ways to run agents

Three more routes to (nearly) free frontier coding โ€” AMP's ad-supported credits, Claude Code pointed at OpenRouter, and models running locally with Ollama.

๐ŸŽฏ Goal: run agents on any providerโฑ Read: 10 min๐Ÿงญ Type: tools

01AMP Code โ€” frontier performance, ad-supported

AMP is a bit like OpenCode: not affiliated with any single provider. It's an agentic coder that can attach to multiple providers and run different analyses. It's most famous as a terminal tool, but also ships as an extension for VS Code, Cursor or Windsurf (all basically the same thing anyway).

"AMP Free" = $10 a day for watching ads

At first glance AMP Free looks like it costs $10/day โ€” but it's the opposite. You get $10 of model credit per day in exchange for looking at ads. The tech community loves to get up in arms about ads, but this is a genuinely good deal: if the ads are inoffensive (maybe even useful), earning $10/day of frontier-level usage is hard to argue with.

Install and launch

Paste AMP's install command in the VS Code terminal, then type amp.

Log in / sign up

First launch opens a browser to log in. No account yet? Sign up with email/password or Google auth โ€” then you're straight back in the terminal.

Notice the ad

An ad is served at the top โ€” that's how you pay for the $10/day of free usage.

Pick a thinking mode, not a model

Ctrl+S toggles smart โ†’ deep โ†’ rush. AMP chooses the underlying model for you; you trust it to serve the best for the task.

Running the same code-review prompt in deep mode, AMP found a critical issue โ€” the hard-coded credentials again โ€” and offered to fix it. The context readout suggests a high-end OpenAI-class model behind the scenes. This run cost about 42ยข of the daily $10. On ampcode.com โ†’ settings you can see your plan, remaining balance, buy credits, set auto-top-up, and connect GitHub.

Cross-provider, Claude-Code-like

AMP gives you an easy path to free, frontier-level performance via the daily ad-supported allotment. The experience is quite similar to Claude Code โ€” though in practice Claude Code still has the edge.

02Claude Code, pointed at OpenRouter (Kimi K2)

You can also make Claude Code itself call a different provider. We'll point it at OpenRouter running Kimi K2.5 โ€” perhaps the strongest open-source model right now, from Moonshot AI.

Not Anthropic's recommended path

Claude Code is designed and optimised to run with Claude's models. Redirecting it elsewhere is a janky experience โ€” even configuring it is fiddly. Unless you specifically want to experiment, watch rather than follow along; for open-source work, prefer OpenCode or AMP.

The trick is a set of environment variables that tell the Anthropic tooling to call OpenRouter instead of Claude in the cloud. You set the default Haiku/Sonnet/Opus models all to your chosen model (otherwise it flips back to Claude's), point ANTHROPIC_BASE_URL at OpenRouter, use your OpenRouter key as the auth token, and blank out the real API key. Then launch with --model.

Kimi K2.5 via OpenRouter ยท macOS / Linux
export ANTHROPIC_DEFAULT_HAIKU_MODEL="moonshotai/kimi-k2.5"
export ANTHROPIC_DEFAULT_SONNET_MODEL="moonshotai/kimi-k2.5"
export ANTHROPIC_DEFAULT_OPUS_MODEL="moonshotai/kimi-k2.5"
export ANTHROPIC_BASE_URL="https://openrouter.ai/api"
export ANTHROPIC_AUTH_TOKEN="<PUT YOUR OPENROUTER KEY HERE>"
export ANTHROPIC_API_KEY=""
claude --model moonshotai/kimi-k2.5

Launch, run /model, and you'll see Moonshot AI Kimi K2 as the model โ€” it thinks it has the other models too, but we've mapped them all to Kimi K2. Ask it something simple ("describe the purpose of this project") and it answers correctly, using the same Claude Code tooling. Confirm on your OpenRouter activity page that the recent calls really went to Kimi K2.

Experiment โ€” and a rate-limit pro tip

With open-source models, some things work and some don't; things change fast (people like the fast Grok variants too). If free OpenRouter models rate-limit you, set the model to openrouter/free to be routed automatically to a working free model.

03Running locally with Ollama (GPT-OSS)

Last, we point Claude Code at a model running locally on your own machine via Ollama. Same idea โ€” but ANTHROPIC_BASE_URL now points at your computer at http://localhost:11434 (Ollama's default port).

GPT-OSS via Ollama ยท macOS / Linux
export ANTHROPIC_DEFAULT_HAIKU_MODEL="gpt-oss"
export ANTHROPIC_DEFAULT_SONNET_MODEL="gpt-oss"
export ANTHROPIC_DEFAULT_OPUS_MODEL="gpt-oss"
export ANTHROPIC_BASE_URL="http://localhost:11434"
export ANTHROPIC_AUTH_TOKEN="ollama"
export ANTHROPIC_API_KEY=""
ollama pull gpt-oss
claude --model gpt-oss

Ask it to summarise the project and โ€” with a big enough machine โ€” it works: it correctly identified a local-only project-management MVP, spotted the hard-coded password, and knew how to run it. You can literally watch the GPU go flat out, proving it ran locally. It needs a beefy computer, though.

Local is cool, but usually not the smart choice

For serious power, running models locally is rarely the best route โ€” OpenRouter can serve far stronger models incredibly cheaply. Renting a cloud GPU is an option, but for most people OpenRouter wins on both cost and capability.

Getting back to normal

These environment variables only live in the current terminal. Close those terminals, open a fresh one, and your environment resets โ€” you're back to Claude Code with Claude, which is where you want to be for tomorrow.

04Config recipes (reference)

The full set of copy-paste recipes. Replace the key placeholder with your own OpenRouter key โ€” never commit a real key to a repo.

Kimi K2.5 via OpenRouter ยท Windows PowerShell
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL="moonshotai/kimi-k2.5"
$env:ANTHROPIC_DEFAULT_SONNET_MODEL="moonshotai/kimi-k2.5"
$env:ANTHROPIC_DEFAULT_OPUS_MODEL="moonshotai/kimi-k2.5"
$env:ANTHROPIC_BASE_URL="https://openrouter.ai/api"
$env:ANTHROPIC_AUTH_TOKEN="<PUT YOUR OPENROUTER KEY HERE>"
$env:ANTHROPIC_API_KEY=""
claude --model moonshotai/kimi-k2.5
GPT-OSS via Ollama ยท Windows PowerShell
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL="gpt-oss"
$env:ANTHROPIC_DEFAULT_SONNET_MODEL="gpt-oss"
$env:ANTHROPIC_DEFAULT_OPUS_MODEL="gpt-oss"
$env:ANTHROPIC_BASE_URL="http://localhost:11434"
$env:ANTHROPIC_AUTH_TOKEN="ollama"
$env:ANTHROPIC_API_KEY=""
ollama pull gpt-oss
claude --model gpt-oss
Links

OpenCode: opencode.ai  ยท  AMP: ampcode.com  ยท  OpenRouter: openrouter.ai

๐ŸŽ‰ 40% of the way there

That's enough messing around with platforms for today. You've seen Claude Code, OpenCode and AMP Code, and run Claude Code against OpenRouter and Ollama. Reset your terminals and you're back to Claude Code with Claude โ€” where we need to be for tomorrow, as we dig deep and become advanced users. You're now 40% of the way through the program to becoming an expert agentic engineer.

โœ“ Key takeaways

  • AMP Free gives $10/day of frontier-level credit in exchange for ads; it picks the model for you (Ctrl+S = smart/deep/rush).
  • Claude Code can be redirected to OpenRouter via environment variables โ€” janky and not recommended, but it works (Kimi K2.5).
  • Ollama runs models locally (GPT-OSS) if your machine is beefy enough โ€” but OpenRouter is usually cheaper and stronger.
  • Always use a placeholder for your OpenRouter key, and never commit a real key.
  • Open a fresh terminal to clear the env vars and return to standard Claude Code with Claude.