AI Coding Agent
An autonomous coding agent that reads codebases, plans changes, writes code, runs tests, and self-corrects.
Project walkthrough
AI Coding Agent
Project Goal
Autonomous agent that plans, codes, tests, and opens PRs.
- →Explore codebases with read/search tools
- →Multi-step planning with human approval
- →Apply patches and run tests in Docker sandbox
- →Self-correct on test failures, then open PR
Use ← → arrow keys or buttons to navigate the walkthrough
Time breakdown (40h)
Each phase maps to the estimated hours — follow in order for a realistic build schedule.
Repo indexer & tools
8h- •Tree walk with file size and language detection
- •read_file, search_repo (ripgrep), list_dir tools
- •Path allowlist and .env blocklist guardrails
Planner agent
8h- •Decompose task into ordered file-level steps
- •Human approval gate for plans >5 files
- •Persist plan in LangGraph checkpoint
Coder & patch apply
10h- •Unified diff generation via apply_patch tool
- •Max 20 files per task enforcement
- •Structured output for patch format validation
Docker sandbox & tests
8h- •Clone repo, apply diff, run pytest + ruff
- •Capture stderr for debugger node input
- •Max 3 retry loops on test failure
PR integration & eval
6h- •GitHub API: create branch, commit, open PR
- •LangSmith traces for every agent step
- •Eval on 10 SWE-bench-lite tasks, track pass rate
Architecture
A LangGraph orchestrator receives tasks via CLI or webhook, builds a repo map, and routes through planner → coder → sandbox test nodes. Failed tests trigger a debugger node that reads stderr and retries with capped attempts before opening a PR for human review.
Scroll inside the frame to explore · use + / − to zoom up to 200%
Prerequisites
- Strong Python and Git fundamentals
- LangGraph state machines and checkpointing
- Docker for sandboxed test execution
- Understanding of ReAct / tool-calling agent patterns
- Experience reading and modifying medium-sized codebases
Setup steps
- Clone a small open-source Python repo (e.g., FastAPI tutorial app)
- Scaffold LangGraph orchestrator with AgentState TypedDict
- Build tools: read_file, search_repo, apply_patch, run_terminal
- Create Docker sandbox image with pytest and ruff pre-installed
- Configure OpenAI function calling for planner and coder nodes
- Seed 5 small bug-fix tasks from SWE-bench-lite for eval
Features to build
- Codebase analysis
- Multi-step planning
- Test execution
- Self-correction loop
Expected result
Give the agent a GitHub issue like 'Add rate limiting to POST /login', watch it plan, patch, pass tests in Docker, and open a PR with a summary — demonstrating the full plan→code→test→review loop.
Resume bullet points
- →Built autonomous coding agent with ReAct loop and self-correction
- →Integrated tool calling for file I/O, terminal, and git operations
