Skip to content

🚀 Quick Start Guide

Get up and running with AgenticAI Framework in under 5 minutes.

Framework Overview

AgenticAI Framework includes 400+ modules with 237 enterprise-grade features covering agents, security, ML/AI infrastructure, and more.


📦 Installation

Basic Installation

Bash
pip install agenticaiframework

Full Installation (All Features)

Bash
pip install agenticaiframework[all]

Feature-Specific Installation

Bash
pip install agenticaiframework
Bash
pip install agenticaiframework[llm]
# Includes: openai, anthropic, google-generativeai
Bash
pip install agenticaiframework[monitoring]
# Includes: opentelemetry, prometheus-client
Bash
pip install agenticaiframework[dev]
# Includes: pytest, black, mypy, ruff

⚙ Configuration

Create a .env file in your project root:

Bash
1
2
3
4
5
6
7
8
9
# LLM Provider API Keys
OPENAI_API_KEY=your_openai_key_here
ANTHROPIC_API_KEY=your_anthropic_key_here
GOOGLE_API_KEY=your_google_key_here

# Optional: Framework Settings
AGENTIC_LOG_LEVEL=INFO
AGENTIC_ENABLE_TRACING=true
AGENTIC_CACHE_ENABLED=true

Or use a YAML configuration file:

agentic_config.yaml
framework:
  log_level: INFO
  enable_tracing: true
  cache_enabled: true

llm:
  default_provider: openai
  default_model: gpt-4o-mini
  temperature: 0.7
  max_tokens: 4096

🤖 Your First Agent

The fastest way to create an agent — one line, sensible defaults:

Python
1
2
3
4
5
from agenticaiframework import Agent

# Minimal setup — auto-configures LLM from environment variables
agent = Agent.quick("Assistant")
output = agent.invoke("What is the capital of France?")

With Role Templates

Built-in role templates: assistant, analyst, coder, writer, researcher.

Python
from agenticaiframework import Agent

# Create a research agent
researcher = Agent.quick(
    "ResearchBot",
    role="researcher",
    provider="openai",
)
output = researcher.invoke("Summarise the latest trends in AI safety")

# Create a coding agent
coder = Agent.quick(
    "CodeHelper",
    role="coder",
    provider="anthropic",
)
output = coder.invoke("Write a Python function to merge two sorted lists")

Full Constructor

For complete control, use the Agent constructor directly:

Python
from agenticaiframework import Agent

agent = Agent(
    name="research_assistant",
    role="Expert researcher with deep analytical skills",
    capabilities=["search", "summarization", "reasoning"],
    config={"llm": "gpt-4o", "temperature": 0.7},
    max_context_tokens=8192,
)

result = agent.execute("Analyse the current state of quantum computing")

🔄 Multi-Agent Teams

Using AgentTeam

Python
1
2
3
4
5
6
7
8
9
from agenticaiframework import Agent
from agenticaiframework.orchestration import AgentTeam

researcher = Agent.quick("Researcher", role="researcher")
writer = Agent.quick("Writer", role="writer")

team = AgentTeam(name="content_team")
team.add_member(researcher)
team.add_member(writer)

Using AgentSupervisor

Python
1
2
3
4
5
6
from agenticaiframework.orchestration import AgentSupervisor

supervisor = AgentSupervisor(
    name="project_lead",
    agents=[researcher, writer],
)

⚡ Running Processes

Sequential Pipeline

Python
1
2
3
4
5
6
7
8
from agenticaiframework import Process

proc = Process(name="etl_pipeline", strategy="sequential")
proc.add_task(fetch_data, "source_url")
proc.add_task(transform_data, raw_data)
proc.add_task(load_data, cleaned_data)

results = proc.execute()

Parallel Execution

Python
1
2
3
4
5
6
7
from agenticaiframework import Process

proc = Process(name="multi_fetch", strategy="parallel", max_workers=4)
for source in ["arxiv", "scholar", "semantic"]:
    proc.add_task(fetch_papers, source)

results = proc.execute() # All sources fetched concurrently

💾 Memory Management

Python
from agenticaiframework.memory import MemoryManager

memory = MemoryManager()

# Store a memory
memory.store(
    content="User prefers concise responses",
    metadata={"type": "preference", "user_id": "alice"},
)

# Search memories
results = memory.search("user preferences", top_k=5)

📖 Knowledge Retrieval

Python
1
2
3
4
5
6
7
from agenticaiframework import KnowledgeRetriever

retriever = KnowledgeRetriever()
retriever.register_source("docs", my_search_function)

# Query with automatic LRU caching
result = retriever.retrieve("docs", "How to configure agents?")

📊 Monitoring

Python
from agenticaiframework import MonitoringSystem

monitor = MonitoringSystem()

# Record metrics
monitor.record_metric("latency_ms", 42.5)
monitor.log_event("task_completed", {"task": "summarise"})

# Retrieve data
metrics = monitor.get_metrics()
events = monitor.get_events()
gc_stats = monitor.get_gc_stats()

🛡 Security

Input Validation

Python
1
2
3
4
5
6
7
from agenticaiframework.security import InputValidator

validator = InputValidator()
is_safe, sanitized = validator.validate(user_input)

if is_safe:
    result = agent.execute(sanitized)

PII Masking

Python
1
2
3
4
5
from agenticaiframework.compliance import PIIMasker

masker = PIIMasker()
masked_text = masker.mask("Contact John at john@email.com or 555-1234")
# Output: Contact [NAME] at [EMAIL] or [PHONE]

🔍 Tracing

Python
1
2
3
4
5
6
7
8
from agenticaiframework.tracing import TracingManager

tracer = TracingManager(
    service_name="my-agent-service",
)

with tracer.span("agent_execution"):
    result = agent.execute("Process this task")

🛠 MCP Tools

Python
from agenticaiframework.mcp_tools import MCPTool, MCPToolManager

tool = MCPTool(
    id="calculator",
    name="Calculator",
    capability="Perform arithmetic",
    execute_fn=lambda a, b: a + b,
)

manager = MCPToolManager()
manager.register_tool(tool)
result = manager.execute_tool("calculator", a=5, b=3) # 8

:hub: Hub Registry

Python
1
2
3
4
5
6
7
from agenticaiframework import Hub

hub = Hub()
hub.register("agents", "researcher", researcher)
hub.register("tools", "search", search_tool)

agent = hub.get("agents", "researcher")

📁 Project Structure

Recommended project structure:

Text Only
my_agent_project/
\u251c\u2500\u2500 agents/
\u2502 \u251c\u2500\u2500 __init__.py
\u2502 \u251c\u2500\u2500 researcher.py
\u2502 \u2514\u2500\u2500 writer.py
\u251c\u2500\u2500 tools/
\u2502 \u251c\u2500\u2500 __init__.py
\u2502 \u2514\u2500\u2500 custom_tools.py
\u251c\u2500\u2500 config/
\u2502 \u2514\u2500\u2500 agents.yaml
\u251c\u2500\u2500 tests/
\u2502 \u2514\u2500\u2500 test_agents.py
\u251c\u2500\u2500 main.py
\u251c\u2500\u2500 requirements.txt
\u2514\u2500\u2500 .env

🎯 Next Steps

  • 🤖 Deep Dive into Agents


    Advanced agent configuration, custom behaviours, and lifecycle management.

    Agents Guide

  • 🧠 Memory Management


    Explore memory managers and advanced memory patterns.

    Memory Guide

  • 🔄 Orchestration


    Build complex multi-agent workflows and teams.

    Orchestration Guide

  • 🛠 Tools


    Create custom tools and use MCP tools.

    Tools Guide


❓ Common Issues

Agent not responding as expected?
  • Check your API key is correctly set
  • Verify the model name is correct
  • Review the agent's role and goal for clarity
  • Enable debug logging: AGENTIC_LOG_LEVEL=DEBUG
Memory not persisting?
  • Default memory is in-memory (cleared on restart)
  • Configure persistent backend: memory = MemoryManager(backend="redis")
  • Check backend connection settings
Performance issues?
  • Enable caching: AGENTIC_CACHE_ENABLED=true
  • Use parallel strategy in Process for concurrent tasks
  • Set max_workers explicitly for CPU-bound work
  • Consider batching similar requests

💬 Getting Help