| .gitattributes | ||
| .gitignore | ||
| agent.go | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| Makefile | ||
| README.md | ||
| secret-file.txt | ||
| source.url | ||
| tools.editfiles.go | ||
| tools.go | ||
| tools.listfiles.go | ||
| tools.readfile.go | ||
Claude Agent
A Go-based implementation of a Claude AI agent with file system tools, allowing Claude to interact with and manipulate files in your environment.
Features
- Read files
- List directory contents
- Edit file contents
- Seamless integration with Claude API
Getting Started
# Clone the repository
git clone https://github.com/yourusername/claude-agent.git
# Navigate to project directory
cd claude-agent
# Build the agent
make build
# Run the agent
./dist/claude_agent
Environment Setup
Create a .env file with your Anthropic API key:
ANTHROPIC_API_KEY=your_api_key_here
Inspiration
This project implements the concepts from the excellent blog post How to Build an Agent from AmpCode. I followed along with the tutorial to try out the agent implementation and explore the capabilities.
Implementation Notes
The original code from the blog post has been modified to accommodate changes in the Anthropic Go SDK. Specifically, the NewToolResultBlock implementation was updated to align with the current SDK version.
Dependencies
- Go version: 1.24
- Anthropic Go SDK: v1.5.0
🚀 I'm excited about this implementation of Claude with file system tools! It showcases how powerful AI agents can be when given the ability to interact with a computer's file system in a controlled way.