I've been writing Go for a few years and recently got interested in how AI coding agents work behind the scenes. I understand the basic idea of sending prompts to a model, but I'm curious about everything that happens around that, like reading project files, running commands, keeping track of a conversation, and deciding when to ask for permission. Most of the examples I've found are either tiny demos that only make API calls or large projects written in TypeScript. I'd like to study some actual Go code rather than build everything from scratch just to understand the architecture. Has anyone come across an open source coding agent written in Go that's worth exploring?
See full discussion
Crush would give you plenty to read, though it'd be interesting to compare it with another Go agent. Once you've seen how two projects handle the same job, you've got more to go on when you're questioning why the authors made certain choices. You can check out Gopher Code here https://github.com/projectbarks/gopher-code . It's an independent project whose author tried to recreate Claude Code in Go. It's archived and unfinished, but the main agent loop is there to explore.