8000 GitHub - igorcosta/aho: A lightweight yet powerful AI agents framework
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

igorcosta/aho

Repository files navigation

Aho

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

Key Features

🧬 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

Installation

Development Installation

  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows, use: venv\Scripts\activate
  1. Install the package in development mode with all extras:
pip install -e ".[llm,local,dev]"

Production Installation

pip install aho

Quick Start

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

Architecture

AHO Framework follows three core principles:

  1. Simplicity: Clear, understandable code with no hidden complexity
  2. Composability: Build complex workflows from simple, reusable components
  3. Reliability: Production-ready with proper error handling and recovery

Documentation

Not there yet.

Development

  1. Install development dependencies:
pip install -e ".[dev]"
  1. Run tests:
pytest tests/
  1. Run code formatting:
black .
isort .
  1. Run type checking:
mypy aho/

License

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.

About

A lightweight yet powerful AI agents framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0