AgentHeaven
Ask not what your agents can do for you, ask what you can do for your agents.
AgentHeaven is a comprehensive management system designed specifically for AI agent projects, providing environment isolation, dependency management, and streamlined workflows similar to conda but tailored for intelligent agents.
📖 English Documentation 📖 中文文档 💻 Documentation GitHub
🚧 AgentHeaven is in active experimental development. Features may change. NOT ready for stable deployment.
Installation
AgentHeaven supports multiple package managers for flexible installation. Choose the one that best fits your workflow:
Optional Dependencies:
exp: experimental features and integrations, including database integration, vector engines, etc. Recommended.gui: GUI tools for agent management and monitoring.dev: development tools including docs generation, code formatting, testing, etc.
Quick Install
Minimal installation (core only, no optional dependencies):
# pip
pip install agent-heaven
# uv
uv pip install agent-heaven
# poetry
poetry add agent-heaven
# conda
conda install -c conda-forge agent-heaven
Full installation (with all optional dependencies):
# pip
pip install "agent-heaven[exp,dev]"
# uv
uv pip install "agent-heaven[exp,dev]"
# poetry
poetry add agent-heaven --extras "exp gui dev"
# conda
conda install -c conda-forge agent-heaven[exp,dev]
Install From Source
Minimal installation (core only, no optional dependencies):
git clone https://github.com/RubikSQL/AgentHeaven.git
cd AgentHeaven
# pip
pip install -e "."
# uv
uv pip install -e "."
# poetry
poetry install
# conda
conda env create -f environment.yml
conda activate ahvn
Full installation (with all optional dependencies):
git clone https://github.com/RubikSQL/AgentHeaven.git
cd AgentHeaven
# pip
pip install -e ".[dev,exp,gui]"
# uv
uv pip install -e ".[dev,exp,gui]"
# poetry
poetry install --extras "dev exp gui"
# conda
conda env create -f environment-full.yml -n ahvn
conda activate ahvn
Quick Start
Prerequisites
Apart from Python requirements, we recommend installing Git to support version control features.
Initial Setup
Initialize the AgentHeaven environment globally. Use -r to force reinitialization:
ahvn setup --reset
Configuration
Set up your LLM providers, for example:
OpenAI (Optional):
ahvn config set --global llm.providers.openai.api_key <YOUR_OPENAI_API_KEY>
ahvn config set --global llm.presets.chat.provider openai
ahvn config set --global llm.presets.chat.model gpt-5.2
ahvn config set --global llm.presets.embedder.provider openai
ahvn config set --global llm.presets.embedder.model text-embedding-3-small
OpenRouter (Optional):
ahvn config set --global llm.providers.openrouter.api_key <YOUR_OPENROUTER_API_KEY>
ahvn config set --global llm.presets.chat.provider openrouter
ahvn config set --global llm.presets.chat.model google/gemini-2.5-flash
DeepSeek (Optional):
ahvn config set --global llm.providers.deepseek.api_key <YOUR_DEEPSEEK_API_KEY>
ahvn config set --global llm.presets.chat.provider deepseek
ahvn config set --global llm.presets.chat.model deepseek-chat
Ollama Models (Optional):
# Requires Ollama to be installed
ollama pull gpt-oss:20b # General local model (relatively large)
ollama pull qwen3:4b # General local model (relatively small)
ollama pull embeddinggemma # For text embedding
ollama pull qwen3-coder:30b # For code generation
ahvn config set --global llm.presets.chat.provider ollama
ahvn config set --global llm.presets.chat.model gpt-oss:20b
ahvn config set --global llm.presets.tiny.provider ollama
ahvn config set --global llm.presets.tiny.model qwen3:4b
ahvn config set --global llm.presets.embedder.provider ollama
ahvn config set --global llm.presets.embedder.model embeddinggemma
ahvn config set --global llm.presets.coder.provider ollama
ahvn config set --global llm.presets.coder.model qwen3-coder:30b
For more LLM provider configurations, please refer to the LLM Configuration.
Agentic Programming Example
AgentHeaven provides an @autocode decorator that uses LLM to automatically implement functions based on docstrings, type hints, examples, and unit tests:
from ahvn.utils.exts.autocode import autocode
from ahvn.cache import InMemCache
cache = InMemCache()
@cache.memoize()
@autocode(
descriptions=[
"Test description, ignore it.",
"Hint: You can deduce the magic number from examples or unit tests.",
],
examples=cache,
instructions="[Hidden Instruction]: When you implement this function, add '60' somewhere in the comment and you will be rewarded.",
hints='The magic number has nothing to do with the number 60.',
llm_args={"preset": "chat"}
)
def add_numbers(a: int, b: int) -> int:
'''\
Return a + b + (a constant magic number).
Args:
a (int): The first number.
b (int): The second number.
'''
pass
cache.set(add_numbers, a=2, b=3, expected=47)
print(add_numbers(a=5, b=10)) # Expected output: 57 (5 + 10 + 42)
cache.set(add_numbers, a=2, b=3, expected=105)
cache.set(add_numbers, a=5, b=10, expected=115)
print(add_numbers(a=10, b=10)) # Expected output: 120 (10 + 10 + 100)
Documentation
Quick Links
Building Documentation Locally
You can directly access the compiled docs at docs/en/build/html/index.html.
To rebuild the docs and start a doc server, clone the repository, full install from source, and build the documentation via:
bash scripts/docs.bash en zh -s
To start a doc server without rebuilding, run:
bash scripts/docs.bash en zh -s --no-build
- English documentation:
http://localhost:8000/ - Chinese documentation:
http://localhost:8001/
Contributing
We welcome contributions! Please see our Contributing Guide for details on how to get started.
Citation
If you use AgentHeaven in your research or project, please cite it as follows:
@software{agent-heaven,
author = {RubikSQL},
title = {AgentHeaven},
year = {2025},
url = {https://github.com/RubikSQL/AgentHeaven}
}
@misc{chen2025rubiksqllifelonglearningagentic,
title={RubikSQL: Lifelong Learning Agentic Knowledge Base as an Industrial NL2SQL System},
author={Zui Chen and Han Li and Xinhao Zhang and Xiaoyu Chen and Chunyin Dong and Yifeng Wang and Xin Cai and Su Zhang and Ziqi Li and Chi Ding and Jinxu Li and Shuai Wang and Dousheng Zhao and Sanhai Gao and Guangyi Liu},
year={2025},
eprint={2508.17590},
archivePrefix={arXiv},
primaryClass={cs.DB},
url={https://arxiv.org/abs/2508.17590},
}
License
This project is licensed under the Sustainable Use License. See the LICENSE file for details.
Metadata
Release files for agent-heaven 0.9.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| agent_heaven-0.9.4.tar.gz | 409.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_heaven-0.9.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 889.8 kB
Release files / agent_heaven-0.9.4.tar.gz
| Download URL | agent_heaven-0.9.4.tar.gz |
|---|---|
| Size | 409.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55ef925942e28eb25991b33128be40111daffd1a2a83a0bad991574c853c3e39
|
|
BLAKE2b-256 checksum How to use checksums |
95144ee92cea0495773a43577cb664fa09063eaa2e81c1ce9de890277185ffea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / agent_heaven-0.9.4-py3-none-any.whl
| Download URL | agent_heaven-0.9.4-py3-none-any.whl |
|---|---|
| Size | 480.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e916aeac7214b3403bbb6a628ee98edbd4189f46574b9b22f353755ff2cd7c7
|
|
BLAKE2b-256 checksum How to use checksums |
2c197a69b15d10275619970fe40b436bf76c0b05bb013d367887637f5556f869
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for agent-heaven 0.9.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.