Skip to content

Installation

  • Python 3.10 or higher
  • An LLM API key (Anthropic, OpenAI, or xAI)

Install the core package:

Terminal window
pip install anvil-agent

Anvil needs an LLM to generate tool code. Install with your preferred provider:

Terminal window
# Claude (recommended)
pip install "anvil-agent[anthropic]"
# GPT-4
pip install "anvil-agent[openai]"
# Both providers
pip install "anvil-agent[all-providers]"

If you’re using a specific AI framework, install the corresponding adapter:

Terminal window
# LangChain
pip install "anvil-agent[langchain]"
# CrewAI
pip install "anvil-agent[crewai]"
# AutoGen
pip install "anvil-agent[autogen]"
# OpenAI Agents SDK
pip install "anvil-agent[openai-agents]"
# All frameworks
pip install "anvil-agent[all-frameworks]"

Install everything:

Terminal window
pip install "anvil-agent[all]"

This includes:

  • All LLM providers (Anthropic, OpenAI)
  • All framework adapters
  • Documentation fetching (FireCrawl)

For contributing or local development:

Terminal window
git clone https://github.com/anthropics/anvil-sdk.git
cd anvil-sdk
pip install -e ".[dev]"

Anvil needs API keys to generate tools. Set them as environment variables:

Terminal window
# Required: At least one LLM provider
export ANTHROPIC_API_KEY="sk-ant-..."
# or
export OPENAI_API_KEY="sk-..."
# Optional: For fetching documentation
export FIRECRAWL_API_KEY="..."

Or use the CLI to set up interactively:

Terminal window
anvil init

This creates a .env file with your keys securely stored.

Check that everything is working:

Terminal window
anvil doctor

This will show:

  • Python version
  • Docker availability (optional, for sandboxing)
  • API key status
  • Configuration files

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.

Now that you have Anvil installed:

  1. Follow the Quick Start guide
  2. Learn about tool generation