Tool Surfaces for Coding (Read, Edit, Bash)
The minimum tools a code agent needs: read file, edit file, run shell, run tests.
What Tools Does a Code Agent Need?
The minimum:
- read_file — see code
- edit_file / write_file — change code
- bash — run shell commands (tests, builds)
- search / grep — find code by string or symbol
read_file
def read_file(path: str, start_line: int = 0, end_line: int | None = None) -> str:
with open(path) as f:
lines = f.readlines()
return ''.join(lines[start_line:end_line])All lessons in this course
- Agentic Patterns: Plan-Execute-Verify
- Tool Surfaces for Coding (Read, Edit, Bash)
- Iterative Self-Correction Loops
- SWE-Agent and OpenDevin Architectures