Installation
Requirements
Section titled “Requirements”- Python 3.10 or higher
- An LLM API key (Anthropic, OpenAI, or xAI)
Basic Installation
Section titled “Basic Installation”Install the core package:
pip install anvil-agentWith LLM Providers
Section titled “With LLM Providers”Anvil needs an LLM to generate tool code. Install with your preferred provider:
# Claude (recommended)pip install "anvil-agent[anthropic]"
# GPT-4pip install "anvil-agent[openai]"
# Both providerspip install "anvil-agent[all-providers]"With Framework Adapters
Section titled “With Framework Adapters”If you’re using a specific AI framework, install the corresponding adapter:
# LangChainpip install "anvil-agent[langchain]"
# CrewAIpip install "anvil-agent[crewai]"
# AutoGenpip install "anvil-agent[autogen]"
# OpenAI Agents SDKpip install "anvil-agent[openai-agents]"
# All frameworkspip install "anvil-agent[all-frameworks]"Full Installation
Section titled “Full Installation”Install everything:
pip install "anvil-agent[all]"This includes:
- All LLM providers (Anthropic, OpenAI)
- All framework adapters
- Documentation fetching (FireCrawl)
Development Installation
Section titled “Development Installation”For contributing or local development:
git clone https://github.com/anthropics/anvil-sdk.gitcd anvil-sdkpip install -e ".[dev]"Setting Up API Keys
Section titled “Setting Up API Keys”Anvil needs API keys to generate tools. Set them as environment variables:
# Required: At least one LLM providerexport ANTHROPIC_API_KEY="sk-ant-..."# orexport OPENAI_API_KEY="sk-..."
# Optional: For fetching documentationexport FIRECRAWL_API_KEY="..."Or use the CLI to set up interactively:
anvil initThis creates a .env file with your keys securely stored.
Verify Installation
Section titled “Verify Installation”Check that everything is working:
anvil doctorThis will show:
- Python version
- Docker availability (optional, for sandboxing)
- API key status
- Configuration files
Optional: Docker
Section titled “Optional: Docker”For enhanced security, Anvil can run generated code in Docker containers. Install Docker Desktop or Docker Engine to enable this feature.
When Docker is available, generated tools are verified in a sandbox before being saved.
Next Steps
Section titled “Next Steps”Now that you have Anvil installed: