Skip to main content

A production-ready, extensible multi-LLM AI Agent Framework with LiteLLM support

Project description

🤖 AgentAxis

A production-ready, extensible AI Agent Framework for Python. Built with Clean Architecture, it supports multi-provider LLM orchestration (via LiteLLM), memory management, and tool usage.

🚀 Features

  • Multi-Provider Support: Switch between OpenAI, Anthropic, Gemini, and local models seamlessly using LiteLLM.
  • HTTP Endpoint Support: Connect to any custom LLM endpoint with Bearer token authentication.
  • System Prompts: Configure agent behavior with built-in system prompt support.
  • Intelligent Routing: Architecture designed for dynamic model selection.
  • Tooling System: Register Python functions as tools with automatic JSON schema generation + MCP Support.
  • Memory Management: Pluggable memory backends (In-Memory provided, Extensible to Redis/Postgres).
  • Vector Store / RAG: Built-in adapter for ChromaDB.
  • Clean Architecture: Strictly decoupled core logic from infrastructure.

📦 Installation

pip install agentaxis

⚡ Quick Start

1. Basic Agent with System Prompt

from agentaxis import AgentService, AgentEntity, InMemoryMemory, AIEngine
from agentaxis.adapters.tools import ToolRegistry
import asyncio

async def main():
    # 1. Setup AI Engine with system prompt
    llm = AIEngine(
        model="gpt-4o", 
        api_key="sk-...",
        system_prompt="You are a helpful assistant that speaks like a pirate."
    )
    memory = InMemoryMemory()
    registry = ToolRegistry()
    
    # 2. Register Tools
    @registry.register
    def get_time(timezone: str) -> str:
        """Returns current time in timezone."""
        return "12:00 PM"

    # 3. Create Agent
    entity = AgentEntity(id="bot-1", name="Helper", role_description="Assistant")
    agent = AgentService(agent_entity=entity, llm=llm, memory=memory, tool_registry=registry)

    # 4. Chat
    response = await agent.chat("What time is it in NY?")
    print(response)

if __name__ == "__main__":
    asyncio.run(main())

2. Using Custom HTTP Endpoint

from agentaxis import HTTPEngine

# Connect to any LLM endpoint
llm = HTTPEngine(
    url="https://your-llm-endpoint.com/v1/chat/completions",
    auth_token="your-bearer-token",
    model="custom-model",
    system_prompt="You are an expert coding assistant."
)

3. Switching LLM Providers

# OpenAI
llm = AIEngine(model="gpt-4", api_key="sk-...")

# Anthropic
llm = AIEngine(model="claude-3-opus-20240229", api_key="sk-ant-...")

# Google Gemini
llm = AIEngine(model="gemini/gemini-pro", api_key="...")

# Local models
llm = AIEngine(model="ollama/llama2", api_base="http://localhost:11434")

🆕 What's New in v0.2.0

  • Renamed LiteLLMAdapter to AIEngine - More intuitive naming
  • Added HTTPEngine - Support for generic HTTP LLM endpoints
  • System Prompt Support - Configure agent personality via system_prompt parameter
  • Google Cloud Support - Added litellm[google] for Vertex AI compatibility

🏗️ Architecture

The framework follows Hexagonal Architecture:

  • Core/Domain: Pure business entities (Agent, Message).
  • Core/Ports: Interfaces for external dependencies (BaseLLM, MemoryPort).
  • Adapters: Concrete implementations (AIEngine, HTTPEngine, ChromaAdapter).

🛠️ Development

  1. Clone the repository.
  2. Install dependencies: pip install -e .[dev]
  3. Run tests: pytest

🤝 Contribution

Contributions are welcome! Please follow the Clean Architecture patterns.

📄 License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentaxis-0.2.0.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentaxis-0.2.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file agentaxis-0.2.0.tar.gz.

File metadata

  • Download URL: agentaxis-0.2.0.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for agentaxis-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1e1642d02c28c727bf721091c0c546c911eb176c566135a2e49ab5d69c8b4888
MD5 d252a84d50ed3c0461db707490a72b00
BLAKE2b-256 731a51aa0ddf2eb79ee891b49d0a3c5984a14fe847fdc115c8ccb6d9021fda6e

See more details on using hashes here.

File details

Details for the file agentaxis-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: agentaxis-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for agentaxis-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76767d46ecc39f5fe0a0eb84f4afa99f2c870dcc9680141127b14a7a8da0b69e
MD5 a6b09287944e2e12294cdf227dde9e40
BLAKE2b-256 51cffa08dd3787110417c9c79b2332bc2814f175152b27f6e8fbc7d3a2be9cba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page