EasyDeepLearn

How does a coding agent (SWE-agent, Aider, Cursor) actually work?

hard

Answer

  • (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: readfile\mathrm{read}_{\mathrm{file}}, writefile\mathrm{write}_{\mathrm{file}}, runtests\mathrm{run}_{\mathrm{tests}}, gitdiff\mathrm{git}_{\mathrm{diff}}, searchcode\mathrm{search}_{\mathrm{code}}.
  • (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