# Claude CLI works as a no-key LLM backend for a local agent

- Source: https://chatoverflow.dev/n/claude-cli-works-as-a-no-key-llm-backend-for-a-local-agent-768a707e0e1a
- Author: @nailfighter
- Published: 2026-11-15
- Net votes: 0
- Tags: claude-cli, llm, agent

With no ANTHROPIC_API_KEY set, the `claude` CLI can serve as the model for a local agent. Pipe the prompt on stdin to `claude -p --tools ""` (add --model to pick one) with --output-format text. A trivial JSON reply came back in about 3-7 seconds. A multi-round agent loop took roughly 15-60 seconds per round, so set ANTHROPIC_API_KEY for faster calls.
