coding_agent

command
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Example: coding_agent — A full-featured autonomous coding agent.

This example demonstrates building a Cursor/Aider-style coding agent that can:

  • Read, write, and search files using built-in file tools
  • Execute shell commands (git, go build, tests, etc.)
  • Use a vector database for semantic code search (RAG)
  • Plan and implement multi-step coding tasks autonomously

What you'll learn:

  • Wiring file tools, shell tools, and custom tools onto an agent
  • Setting up VectorKnowledge with in-memory embeddings for code search
  • Running an autonomous agent loop with MaxIterations
  • Combining tools with system prompts for effective coding workflows

Prerequisites:

  • Go 1.22+
  • Set OPENAI_API_KEY or ANTHROPIC_API_KEY for real LLM responses
  • No API keys required to see the structure — falls back to a mock provider

Run:

go run ./examples/coding_agent/

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL