This directory contains your custom Codebuff agents. Each agent is a TypeScript file that defines an AI agent with specific capabilities and behavior.
- Edit an existing agent: Start with
my-custom-agent.tsand modify it for your needs - Check out the examples and types: See the examples and types directories to draw inspiration and learn what's possible.
- Test your agent: Run
codebuff --agent your-agent-name - Publish your agent: Run
codebuff publish your-agent-name
types/- TypeScript type definitionsexamples/- Example agents for referencemy-custom-agent.ts- Your first custom agent (edit this!)- Add any new agents you wish to the .agents directory
Each agent file exports an AgentDefinition object with:
id: Unique identifier (lowercase, hyphens only)displayName: Human-readable namemodel: AI model to use (see OpenRouter for options)toolNames: Tools the agent can useinstructionsPrompt: Instructions for the agent's behaviorspawnerPrompt: When other agents should spawn this onespawnableAgents: Which agents this agent can spawn
read_files- Read file contentswrite_file- Create or modify filesstr_replace- Make targeted editsrun_terminal_command- Execute shell commandscode_search- Search for code patternsspawn_agents- Delegate to other agentsend_turn- Finish the response
See types/tools.ts for more information on each tool!
- Check the type definitions in
types/agent-definition.ts - Look at examples in the
examples/directory - Join the Codebuff Discord community (https://discord.com/invite/mcWTGjgTj3)
Happy agent building! 🤖