A workshop that teaches you how to build your own coding agent. Similar to Roo code, Cline, Amp, Cursor, Windsurf or OpenCode.
# π§ Build Your Own Coding Agent via a Step-by-Step Workshop
Welcome! π This workshop will guide you through building your own **AI-powered coding assistant** β starting from a basic chatbot, and adding powerful tools like file reading, shell command execution, and code searching.
You donβt need to be an AI expert. Just follow along and build step-by-step!
π **Want a detailed overview?** Check out the blog post: [ghuntley.com/agent](https://ghuntley.com/agent/)
---
## π― What You'll Learn
By the end of this workshop, youβll understand how to:
- β
Connect to the Anthropic Claude API
- β
Build a simple AI chatbot
- β
Add tools like reading files, editing code, and running commands
- β
Handle tool requests and errors
- β
Build an agent that gets smarter with each step
---
## π οΈ What We're Building
Youβll build 6 versions of a coding assistant.
Each version adds more features:
1. **Basic Chat** β talk to Cursor
2. **File Reader** β read code files
3. **File Explorer** β list files in folders
4. **Command Runner** β run shell commands
5. **File Editor** β modify files
6. **Code Search** β search your codebase with patterns
```mermaid
graph LR
subgraph "Application Progression"
A[chat.go<br/>Basic Chat] --> B[read.go<br/>+ File Reading]
B --> C[list_files.go<br/>+ Directory Listing]
C --> D[bash_tool.go<br/>+ Shell Commands]
D --> E[edit_tool.go<br/>+ File Editing]
E --> F[code_search_tool.go<br/>+ Code Search]
end
subgraph "Tool Capabilities"
G[No Tools] --> H[read_file]
H --> I[read_file<br/>list_files]
I --> J[read_file<br/>list_files<br/>bash]
J --> K[read_file<br/>list_files<br/>bash<br/>edit_file]
K --> L[read_file<br/>list_files<br/>bash<br/>code_search]
end
A -.-> G
B -.-> H
C -.-> I
D -.-> J
E -.-> K
F -.-> L
```
At the end, youβll end up with a powerful local developer assistant!
---
## π§± How It Works (ArchitectAgent that generates comprehensive documentation, API references, architecture diagrams, and developer onboarding guides from existing code.
Agent configuration for systematic bug investigation that traces issues from error logs through the codebase to root cause with suggested fixes.
Agent for integrating third-party APIs including SDK setup, type generation, error handling, retry logic, and rate limit management.
Cursor's built-in autonomous coding agent that can make multi-file edits, run terminal commands, search the codebase, and iteratively build features with minimal human intervention.
Cloud-based autonomous coding agent that runs in the background on remote sandboxed environments, handling complex multi-step tasks while you continue working.
Cursor's multi-file editing agent within Composer mode that can create, edit, and delete files across your entire project in a single conversation.