- File operations - read, write, and edit files in your project with tools that enable agents to manage and modify code and documentation.
- Shell command execution - execute shell commands to run tests, build projects, manage dependencies, and interact with version control systems.
- Web search - search the web for up-to-date information and documentation (requires Tavily API key).
- HTTP requests - make HTTP requests to APIs and external services for data fetching and integration tasks.
- Task planning and tracking - break down complex tasks into discrete steps and track progress through the built-in todo system.
- Memory storage and retrieval - store and retrieve information across sessions, enabling agents to remember project conventions and learned patterns.
- Human-in-the-loop - require human approval for sensitive tool operations.
Quick start
Set your API key
Export as an environment variable:Or create a
.env file in your project root:Run the CLI
Give the agent a task
Additional installation and configuration options
Additional installation and configuration options
Install locally if needed:The CLI uses Anthropic Claude Sonnet 4 by default. To use OpenAI:Enable web search (optional):API keys can be set as environment variables or in a
.env file.Configuration
Command-line options
Command-line options
| Option | Description |
|---|---|
--agent NAME | Use named agent with separate memory |
--auto-approve | Skip tool confirmation prompts (toggle with Ctrl+T) |
--sandbox TYPE | Execute in remote sandbox: modal, daytona, or runloop |
--sandbox-id ID | Reuse existing sandbox |
--sandbox-setup PATH | Run setup script in sandbox |
CLI commands
CLI commands
| Command | Description |
|---|---|
deepagents list | List all agents |
deepagents help | Show help |
deepagents reset --agent NAME | Clear agent memory and reset to default |
deepagents reset --agent NAME --target SOURCE | Copy memory from another agent |
Interactive mode
Slash commands
Slash commands
Use these commands within the CLI session:
/tokens- Display token usage/clear- Clear conversation history/exit- Exit the CLI
Bash commands
Bash commands
Execute shell commands directly by prefixing with
!:Keyboard shortcuts
Keyboard shortcuts
| Shortcut | Action |
|---|---|
Enter | Submit |
Alt+Enter | Newline |
Ctrl+E | External editor |
Ctrl+T | Toggle auto-approve |
Ctrl+C | Interrupt |
Ctrl+D | Exit |
Set project conventions with memories
Agents store information in~/.deepagents/AGENT_NAME/memories/ as markdown files using a memory-first protocol:
- Research: Searches memory for relevant context before starting tasks
- Response: Checks memory when uncertain during execution
- Learning: Automatically saves new information for future sessions
Use remote sandboxes
Execute code in isolated remote environments for safety and flexibility. Remote sandboxes provide the following benefits:- Safety: Protect your local machine from potentially harmful code execution
- Clean environments: Use specific dependencies or OS configurations without local setup
- Parallel execution: Run multiple agents simultaneously in isolated environments
- Long-running tasks: Execute time-intensive operations without blocking your machine
- Reproducibility: Ensure consistent execution environments across teams
-
Configure your sandbox provider (Runloop, Daytona, or Modal):
-
Run the CLI with a sandbox:
The agent runs locally but executes all code operations in the remote sandbox. Optional setup scripts can configure environment variables, clone repositories, and prepare dependencies.
-
(Optional) Create a
setup.shfile to configure your sandbox environment:Store secrets in a local.envfile for the setup script to access.