๐Ÿค– AI Agentic Framework

A production-ready, composable AI Agentic Framework designed for building complex, multi-agent systems with ease. It features dynamic agent creation, robust orchestration, multi-layer memory, and enterprise-grade observability.

API Documentation

๐ŸŒŸ Key Features

๐Ÿ—๏ธ Architecture

The framework is built around the Agent core, which orchestrates the interaction between:

graph TD User[User/App] --> Agent Agent --> Memory Agent --> LLM[LLM Client] Agent --> Tools[Tool Registry] Tools --> External[External APIs] Agent --> Telemetry[OpenTelemetry]

๐Ÿ“ฆ Components

1. Agent

The Agent class is the main entry point. It implements the ReAct loop, managing the state, history, and tool execution.

from agentic_framework import Agent
from agentic_framework.llm import OpenAIClient

agent = Agent(
    id="researcher",
    name="Researcher",
    instructions="You are a helpful research assistant.",
    model_client=OpenAIClient(),
    tools=[]
)

2. Tools

Tools are executable functions that agents can use. Define custom tools by inheriting from Tool.

from agentic_framework.core.tool import Tool

class MyTool(Tool):
    def __init__(self):
        super().__init__(name="my_tool", description="Does something useful")

    async def execute(self, param: str) -> str:
        return f"Executed with {param}"

3. Memory

Memory providers allow agents to retain information. SimpleMemory is provided for testing, but you can implement MemoryProvider for vector databases (Chroma, Pinecone, etc.).

from agentic_framework.memory.simple import SimpleMemory

agent = Agent(..., memory=SimpleMemory())

4. Observability

Enable OpenTelemetry tracing by setting ENABLE_TELEMETRY=true. The framework automatically traces agent execution, tool calls, and LLM requests.

๐Ÿš€ Quick Start

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/selvamanigovindaraj/ai-agentic-framework.git
    cd ai-agentic-framework
    
  2. Install dependencies:

    uv sync
    # OR
    pip install -e .
    
  3. Configure Environment:

    cp .env.example .env
    # Edit .env and add your OPENAI_API_KEY
    

Usage Examples

Basic Agent

Run the CLI to test a basic agent:

uv run agentic test

Or use Python:

import asyncio
from agentic_framework import Agent, ToolRegistry
from agentic_framework.llm import OpenAIClient
from agentic_framework.tools.calculator import Calculator

async def main():
    llm = OpenAIClient()
    registry = ToolRegistry()
    registry.register(Calculator())

    agent = Agent(
        id="math_agent",
        name="Math Agent",
        instructions="You are a math wizard.",
        tools=registry.get_all(),
        model_client=llm
    )

    result = await agent.execute("What is 50 * 25?")
    print(result["output"])

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

Multi-Agent Workflow

Run the multi-agent example:

uv run agentic multiagent

๐Ÿ› ๏ธ Configuration

The Agent can be configured via AgentConfig:

Parameter Default Description
max_iterations 10 Max ReAct loops per task
timeout_seconds 300 Execution timeout
max_cost 1.0 Max estimated cost ($)
temperature 0.7 LLM creativity

๐Ÿงช Testing

Run the end-to-end test suite:

uv run pytest tests/test_e2e.py

๐Ÿค Contributing

Contributions are welcome! Please submit a Pull Request.

๐Ÿ“„ License

MIT License