How does a coding agent (SWE-agent, Aider, Cursor) actually work?
hardAnswer
- (1) Repository indexing: chunked embeddings + symbol maps + git blame for the codebase.
- (2) Task decomposition: LLM parses the user goal, identifies affected files.
- (3) Tool set: , , , , .
- (4) Iteration loop: LLM proposes edits, runs tests, reads errors, refines.
- (5) Guardrails: cap edits per turn, require confirmation for destructive ops, sandbox execution.
- Best-in-class: Cursor Agent, Devin, SWE-agent, Aider, Claude Code.
- Evaluated on SWE-bench Verified (~50-70% for top systems in 2026).
Check yourself — multiple choice
- Just prompt-based
- Repo indexing + file/tests/git tools + iterative edit-run-refine loop + guardrails — SWE-bench ~50-70% for frontier
- Same as chat
- Impossible
Coding agent: repo index + file/tests/git tools + edit-run-refine loop + guardrails.
#agents#tools
Practise LLMs & GenAI
214 interview questions in this topic.
Related questions
- How does function calling / tool use work in modern LLMs?
- Describe a basic ReAct / agent loop.
- How should you write tool descriptions for reliable agent tool selection?
- How do you scale to hundreds of tools without overwhelming the LLM?
- What does an ideal function-calling schema look like?
- What is the Model Context Protocol (MCP)?