Warning
This is a early stage version of the Aho and is not yet suitable for production use.
Advanced hybrid orchestration, aka "Aho" is a small and powerful AI agents framework, the idea is to make it: easy to use, lightweight, composable and production ready
🧬 Simple Yet Powerful
- Direct API integrations with leading LLM providers (OpenAI, Anthropic)
- No complex abstractions or magic - just clean, predictable Python code
- Built for production with comprehensive error handling and retry logic
🔄 Flexible Workflows
- Chain prompts for complex multi-step reasoning
- Route requests to specialized models based on complexity
- Run parallel operations for speed and consensus
- Implement evaluator-optimizer loops for iterative refinement
🛠 Robust Tooling
- Standardized interface for all LLM providers
- Built-in support for common agent patterns
- Type-safe tool definitions with comprehensive documentation
- Automatic retry handling and error recovery
🔌 Easy Integration
- Works with any Python async framework
- Simple plugin architecture for custom tools
- Comprehensive logging and observability
- Built-in support for popular embeddings and vector stores
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
- Install the package in development mode with all extras:
pip install -e ".[llm,local,dev]"
pip install aho
from aho.plugins import OpenAIPlugin, ClaudePlugin
from aho.workflows import PromptChain, ParallelProcessor
# Initialize plugins with your API keys
openai = OpenAIPlugin(api_key="your-openai-key")
claude = ClaudePlugin(api_key="your-anthropic-key")
# Create a simple prompt chain
async def translate_and_improve():
chain = PromptChain([
# First, translate text to French
(openai, "Translate this to French: {input}"),
# Then, have Claude improve the style
(claude, "Improve this French text while keeping the meaning: {input}")
])
result = await chain.run("Hello world!")
return result
# Or run parallel operations
async def get_consensus():
validator = ParallelProcessor([openai, claude])
result = await validator.run("Is this content safe to publish?")
return result.majority_vote
AHO Framework follows three core principles:
- Simplicity: Clear, understandable code with no hidden complexity
- Composability: Build complex workflows from simple, reusable components
- Reliability: Production-ready with proper error handling and recovery
Not there yet.
- Install development dependencies:
pip install -e ".[dev]"
- Run tests:
pytest tests/
- Run code formatting:
black .
isort .
- Run type checking:
mypy aho/
This project is licensed under the MIT License - see the LICENSE file for details.
In Te Reo Māori (Māori language), "aho" means string or cord - representing the threads that connect and weave together different components of our AI systems. Like a master weaver creating intricate patterns, AHO framework helps you orchestrate AI agents with elegance and precision.