ViewFileTool: View contents and metadata of filesSemanticEditTool: Make intelligent edits to filesRevealSymbolTool: Analyze symbol dependencies and usagesMoveSymbolTool: Move symbols between files with import handlingReplacementEditTool: Make regex-based replacement editing on filesListDirectoryTool: List directory contentsSearchTool: Search for files and symbolsCreateFileTool: Create new filesDeleteFileTool: Delete filesRenameFileTool: Rename filesEditFileTool: Edit files
View the full code for the default tools and agent implementation in our examples repository
Basic Usage
The following example shows how to create and run aCodeAgent:
Your
ANTHROPIC_API_KEY must be set in your env.anthropic/claude-3-5-sonnet-latest for the model but this can be changed through the model_provider and model_name arguments.
If using a non-default model provider, make sure to set the appropriate API key (e.g.,
OPENAI_API_KEY for OpenAI models) in your env.Available Tools
The agent comes with a comprehensive set of tools for code analysis and manipulation. Here are some key tools:View the full set of tools on Github
Extensions
GitHub Integration
The agent includes tools for GitHub operations like PR management. Set up GitHub access with:- Creating pull requests
- Viewing PR contents and diffs
- Adding general PR comments
- Adding inline review comments
View all Github tools on Github
Linear Integration
The agent can interact with Linear for issue tracking and project management. To use Linear tools, set the following environment variables:- Create and search issues
- Get issue details and comments
- Add comments to issues
- View team information
View all Linear tools on Github