Overview
In this guide, you’ll create a specialized AI agent, configure its capabilities, and use it to accomplish real tasks. By the end, you’ll understand how to build agents tailored to your needs.Prerequisites
- klaw installed and configured (Installation Guide)
- API key configured (
ANTHROPIC_API_KEYorEACHLABS_API_KEY)
Step 1: Initialize klaw
If you haven’t already, initialize klaw’s configuration:~/.klaw directory with default configuration files.
Step 2: Create Your Agent
Let’s create a coding agent specialized for Go development:Step 3: Examine the Agent Definition
View the agent’s configuration:~/.klaw/agents/go-developer.toml:
Step 4: Chat with Your Agent
Start a conversation with your agent:Step 5: Add More Skills
Enhance your agent with additional capabilities:Step 6: Run Agent Tasks
One-Shot Tasks
Execute a single task:Interactive Mode
For ongoing work:Container Mode
Run in isolation:Step 7: Configure the Workspace
Customize the agent’s context by editing workspace files:SOUL.md - Agent Identity
Edit~/.klaw/workspace/SOUL.md:
USER.md - Your Preferences
Create~/.klaw/workspace/USER.md:
Creating More Agents
Here are some useful agent configurations:Research Agent
DevOps Agent
Documentation Agent
Using Multiple Agents
You can route messages to different agents:Best Practices
Define clear purposes
Define clear purposes
Each agent should have a specific focus. Specialized agents perform better than generalists.
Start with minimal skills
Start with minimal skills
Add skills as needed. Fewer skills mean faster responses and lower token usage.
Use appropriate models
Use appropriate models
- Sonnet: General tasks, coding, research
- Opus: Complex reasoning, architecture decisions
- Haiku: Quick responses, simple tasks
Set working directories
Set working directories
For file-focused agents, set a workdir to contain operations:

