Ampcode — A Better Architecture for Coding Agents

October 25, 2025

After trying almost all the coding agents out there, I've found Ampcode to consistently get the work done with fewer back and forths with the model. So I decided to spend some time reverse engineering it.

OrchestratorLibrarianAdvisorsSearchTask Runnerlibrarianchat_llmfinderTask

Three Key Architectural Choices

Specialized sub-agents, not generalists

Librarian

Search Agent

Task Runner

Most agents are overloaded with tools. AMPcode does the opposite: it composes a few specialists with deliberately limited toolsets.

  • Librarian — Reads and searches files only. No execution, no writing. Pure information retrieval with laser focus.
  • Search Agent — Finds patterns in code with several focused variants. Each optimized for different search strategies.
  • Task Runner — Executes and coordinates results. Takes the findings from other agents and makes changes happen.

This constraint eliminates decision paralysis. Instead of "which of these 40 tools should I use?", each specialist only sees what's relevant and gets to work—faster and more accurately.

A unified tool interface across environments

read_github
search_github
commit_search
list_directory_github
list_repositories
glob_github
diff
chat_llm
finder
fast_finder
xai_finder
kimiK2_finder
gossip_finder
sonoma_finder
Bash
run_javascript
get_diagnostics
edit_file
create_file
format_file
undo_edit
Read
Grep
glob
Check
code_review

Ampcode provides consistent tools that work across different contexts—whether you're working with local files or remote repositories.

The same read_file() command works regardless of where your code lives:

  • Local filesystem — Direct file access for local development
  • Remote repositories — Seamless integration via APIs

One consistent interface. The agent uses the same tools without switching contexts.

# Local file
content = read_file("src/main.py")

# Remote repository file
content = read_file("README.md")  # Works the same way

Multi-model collaboration

Ampcode uses multiple specialized models working together, each focused on specific tasks rather than one model handling everything.

They combine multiple models work in parallel and combine their strengths.

Example

  • You describe a bug. The Search Squadron locates relevant functions and call sites.
  • The Librarian fetches the exact files and diffs.
  • The Task Runner applies the minimal edit and validates with targeted checks.
  • Specialized models coordinate to handle edge cases before changes land.

Key lessons

  • Constraints create clarity — Limited toolsets force better decisions
  • Abstract away complexity — Unified interfaces hide implementation details
  • Treat models as teammates, not competitors — Collaboration beats solo performance

Thank you to Quinn (CEO of Sourcegraph) for providing feedback and confirming I'm on the right path — not chasing rabbitholes.