This example demonstrates how to create an AI coding agent using AgentKit and E2B's code interpreter. The agent can help users with coding tasks by executing commands in a sandboxed environment, providing a safe and controlled way to run code and terminal commands.
- 🤖 AI-powered coding assistant using Claude 3.5 Sonnet
- 🏗️ Sandboxed code execution environment using E2B
- 🔧 Terminal command execution capabilities
- 🔄 Step-by-step task execution
- 📝 Detailed task summaries
Before running this example, you'll need:
- Node.js (v16 or higher)
- npm package manager
- An E2B API key
- An Anthropic API key
- Install dependencies:
npm install
- Configure environment variables:
- Copy
.env.example
to.env
- Add your API keys to the
.env
file:
- Copy
E2B_API_KEY=your_e2b_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
To start the coding agent in development mode with hot reloading:
npm run start "Create a Next.js TodoList demo and its associated unit tests. Finally run the tests with coverage"
The example creates an AI coding agent using AgentKit's framework with the following components:
-
Agent Configuration: Uses Claude 3.5 Sonnet model for natural language understanding and code generation.
-
Tools:
- Terminal tool for executing commands in a sandboxed environment
- File system operations
- Code execution capabilities
-
Sandbox Environment: Utilizes E2B's code interpreter to provide a safe environment for running code and commands.
-
Task Execution:
- The agent thinks through tasks step-by-step
- Executes commands in the sandbox environment
- Provides detailed summaries of completed tasks