how-to-build-a-coding-agent

A workshop that teaches you how to build your own coding agent. Similar to Roo code, Cline, Amp, Cursor, Windsurf or OpenCode.

What is how-to-build-a-coding-agent?

A workshop that teaches you how to build your own coding agent. Similar to Roo code, Cline, Amp, Cursor, Windsurf or OpenCode.

Overview of how-to-build-a-coding-agent

What it is

This is a workshop that teaches you how to build your own AI-powered coding assistant. It is similar to tools like Roo code, Cline, Amp, Cursor, Windsurf or OpenCode. The workshop guides you through building six versions of a coding assistant, starting from a basic chatbot and adding tools such as file reading, shell command execution, and code searching. You do not need to be an AI expert to follow along.

Key features

  • Build 6 versions of a coding assistant: Basic Chat, File Reader, File Explorer, Command Runner, File Editor, and Code Search.
  • Connect to the Anthropic Claude API.
  • Add tools like reading files, editing code, and running shell commands.
  • Handle tool requests and errors.
  • Build an agent that gets smarter with each step.
  • Uses an event loop architecture: the agent waits for input, sends it to Claude, executes tools if requested, and returns results.

Use cases

  • Learning how to build AI-powered developer assistants.
  • Understanding agent architecture and tool integration.
  • Practicing using Claude and Go together.
  • Creating a local developer assistant that can read, edit, and search code, as well as run commands.

Getting started

Prerequisites: Go 1.24.2+ or devenv (recommended for easy setup), and an Anthropic API Key.Set up your environment:bash# Option 1: Recommended (using devenv)devenv shell # Loads everything you need``````bash# Option 2: Manual setup# Make sure Go is installedgo mod tidyAdd your API key:bashexport ANTHROPIC_API_KEY='your-api-key-here'Start with the basics:bashgo run chat.go

License and pricing

The license is not stated. The project is listed as open source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/ghuntleyhow-to-build-a-coding-agent.svg)](https://yunodb.com/tools/ghuntleyhow-to-build-a-coding-agent?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/ghuntleyhow-to-build-a-coding-agent?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/ghuntleyhow-to-build-a-coding-agent.svg" alt="Featured on YunoDB" height="20"></a>