0PricingLogin
AI Agents · Lesson

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:

  1. read_file — see code
  2. edit_file / write_file — change code
  3. bash — run shell commands (tests, builds)
  4. 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

  1. Agentic Patterns: Plan-Execute-Verify
  2. Tool Surfaces for Coding (Read, Edit, Bash)
  3. Iterative Self-Correction Loops
  4. SWE-Agent and OpenDevin Architectures
← Back to AI Agents