Skip to content

Getting Started

Chimera is published on PyPI as chimera-run (the import path stays chimera):

Terminal window
pip install chimera-run # core (zero dependencies)
pip install chimera-run[anthropic] # + Claude support
pip install chimera-run[openai] # + OpenAI support
pip install chimera-run[all] # all providers

Or with uv:

Terminal window
uv add chimera-run # core
uv add 'chimera-run[anthropic]' # + Claude support

Requires Python 3.11+. Tested on 3.11, 3.12, and 3.13.


Chimera auto-detects the provider from the model name. Set the appropriate environment variables for your backend:

Terminal window
export ANTHROPIC_API_KEY="sk-ant-..."
Terminal window
export OPENAI_API_KEY="sk-..."
Terminal window
export GOOGLE_API_KEY="..."

No credentials needed — Chimera connects to http://localhost:11434 by default.

Terminal window
export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"
export ANTHROPIC_AUTH_TOKEN="your-token-here"
export ANTHROPIC_MODEL="glm-5"
ProviderModel PrefixesAuto-detected
Anthropicclaude-*Yes
OpenAIgpt-*, o1-*, o3-*Yes
Googlegemini-*Yes
Ollamallama-*, mistral-*, qwen-*, phi-*Yes
ModalNo (provider_type="modal")
CompatibleNo (provider_type="compatible")

This example creates an agent with the default tool set, points it at a local workspace directory, and asks it to generate a Python script.

import chimera
# 1. Create a provider (auto-detects from env vars)
provider = chimera.create_provider()
# 2. Build an agent with the built-in tools
agent = chimera.Agent(
provider=provider,
tools=list(chimera.DEFAULT_TOOLS),
)
# 3. Run the agent in a local environment
env = chimera.LocalEnvironment("./workspace")
env.setup()
result = agent.run(
"Create a hello world Python script",
env=env,
)
print(result.output)
env.cleanup()