Aider
Type: full-code · Vendor: Paul Gauthier / Aider-AI community · Language: Python · License: Apache-2.0 · Status: active · Status in practice: mature · First released: 2023-05-09
Open-source terminal-native AI pair-programmer that edits files in a git repo through diff-formatted edits, auto-commits each change, and works with almost any LLM provider.
Description. Aider runs in the terminal, takes natural-language requests, and applies them as diffs to files in your git repo. Every edit is auto-committed with a descriptive message so you can review via standard git tools and use /undo to roll back. A concise repo map of classes/functions is sent with each request so the model has whole-codebase awareness. Aider supports cloud and local models, prompt caching on supported providers, voice input, image input, automatic lint+test loops, and an 'architect' mode that splits planning from editing across two models.
Agent loop shape. Single-agent loop built around git as substrate. User types a request → Aider consults the repo-map → selects an edit format (whole-file, diff, udiff, search-replace) appropriate to the model → emits edits → applies them to files → optionally runs --lint-cmd and --test-cmd → tries to fix any non-zero exit → commits to git. /undo rewinds the last commit. Architect mode runs a planning model first, then hands the proposal to a faster editor model.
Primary use cases
- terminal-native AI pair-programming in a git repo
- diff-formatted edits with auto-commit and /undo
- architect+editor multi-model splits
- auto-lint and auto-test feedback loops
Key concepts
- Edit formats (docs) — Model emits diffs (whole-file / diff / udiff / search-replace) Aider parses and applies.
- Repo-map → agentic-rag (docs) — Graph-optimised concise map of the whole repo sent to the LLM.
- Git as memory → replay-time-travel (docs) — Every edit is a commit; /undo is git revert.
- Modes (code/ask/architect/help) → multi-model-routing (docs) — Architect+editor split is the multi-model loop.
- Prompt caching → prompt-caching (docs) — Caches system prompt, read-only files, repo map, editable files.
- Auto lint + auto test → code-execution (docs) — Automatic feedback loop after every edit.
Patterns this full-code implements —
- ★Agent-Computer Interface
Terminal-native ACI; also IDE-aware via comment-driven prompts.
- ★Code-as-Action Agent
Edits are the action; every edit auto-commits to git.
- ★★Code Execution
Auto-lint + auto-test feedback loop; non-zero exits drive retry.
- ★★Multi-Model Routing
/model switches in-chat; architect+editor mode is a two-model split.
- ★★Prompt Caching
Caches system prompt, read-only files, repo map, editable files.
- ★★Replay / Time-Travel
/undo rewinds the last commit; standard git tools work.
- ★Repo Map
Aider's signature feature: a PageRank-ranked tree-sitter map of the repo sent with each change request.
- ★Behavior-Pinning Test Before Agent Edit
Aider can run a configured test suite automatically after every edit and treat a non-zero exit as a failure to fix, supplying the regression-gate half of the pattern (the user still authors the pre-e…
- ★★Agentic RAG
Repo-map is graph-based retrieval (not vector RAG); concise map of classes/functions sent with each request.
- ★★Plan-and-Execute
Architect+editor split is a one-step plan, not multi-step plan-and-execute.
- ★★ReAct
Honest downgrade — Aider's loop is respond+apply+optionally retry on lint/test feedback, not a full ReAct trace; no upstream text names ReAct.
- ★★Step Budget
Soft token-budget knob (--max-chat-history-tokens) triggers summarization; --map-tokens caps repo-map size. No documented step-count cap, so honest 'limited'.
- ★★Tool Use
Aider predates modern tool-calling — its tools are slash commands the user/model invoke: /run, /test, /commit, /undo, /add — not LLM tool-calls.
- ★Dry-Run Harness
Aider exposes a --dry-run flag that runs the edit loop without modifying files, letting the planned changes be inspected before any are committed.
Neighbourhood
Click any neighbour to follow the lineage. Scroll to zoom, drag to pan.