Skip to main content

🤖 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")

4. Connecting to MCP Servers via HTTP

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

async def main():
    # Connect to HTTP MCP server
    mcp = HTTPMCPAdapter(
        base_url="http://localhost:3000",
        auth_token="your-token"  # Optional
    )
    
    await mcp.connect()
    tools = await mcp.list_tools()
    
    # Register MCP tools
    registry = ToolRegistry()
    for tool in tools:
        registry.register_tool(tool)
    
    # Create agent with MCP tools
    llm = AIEngine(model="gpt-4", api_key="sk-...")
    entity = AgentEntity(id="bot", name="MCP Agent", role_description="Assistant")
    agent = AgentService(entity, llm, InMemoryMemory(), registry)
    
    response = await agent.chat("Use the MCP tools to help me")
    print(response)

🆕 What's New in v0.3.0

  • HTTP MCP Adapter - Connect to MCP servers via HTTP endpoints
  • Web Search - Optional web search using DuckDuckGo (default: OFF, no API key needed)
    • Enable with enable_web_search=True parameter

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.

Release files for agentaxis 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentaxis 0.3.0
File Size Uploaded
agentaxis-0.3.0.tar.gz 25.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentaxis 0.3.0
File Interpreter ABI Platform
agentaxis-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.2 kB

Release files / agentaxis-0.3.0.tar.gz

Download URL agentaxis-0.3.0.tar.gz
Size 25.7 kB
Tags Source
SHA-256 checksum
How to use checksums
464678aa1495c780044e79492b5f82ea63f135ae65aaf970cdc346341c13081d
BLAKE2b-256 checksum
How to use checksums
c91812c77ccc98e12bc9ddfa3a92e1c4bb8330dc97bd1b660bdd0265851e0d65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.6

Release files / agentaxis-0.3.0-py3-none-any.whl

Download URL agentaxis-0.3.0-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2fe31b116a8802c80085b848216f86ce3891edee618562917991b8201de70a6
BLAKE2b-256 checksum
How to use checksums
b4d71df2e8939cd70118399bb29302603277d6f2f424a953480d71d3ebe3a520
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.6

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page