agentic

agentic

An opinionated framework for building sophisticated AI Agents

Stars: 95

Visit
 screenshot

Agentic is a lightweight and flexible Python library for building multi-agent systems. It provides a simple and intuitive API for creating and managing agents, defining their behaviors, and simulating interactions in a multi-agent environment. With Agentic, users can easily design and implement complex agent-based models to study emergent behaviors, social dynamics, and decentralized decision-making processes. The library supports various agent architectures, communication protocols, and simulation scenarios, making it suitable for a wide range of research and educational applications in the fields of artificial intelligence, machine learning, social sciences, and robotics.

README:

Agentic - Docs

Join our Discord!

Screenshot 2025-02-24 at 12 13 31 PM

Release Notes CI PyPI - License PyPI - Downloads GitHub star chart Open Issues

Agentic makes it easy to create AI agents - autonomous software programs that understand natural language and can use tools to do work on your behalf.

Agentic is in the tradition of opinionated frameworks. We've tried to encode lots of sensible defaults and best practices into the design, testing and deployment of agents.

Agentic is a few different things:

  • A lightweight agent framework. Same part of the stack as SmolAgents or PydanticAI.
  • A reference implementation of the agent protocol.
  • An agent runtime built on Ray
  • An optional "batteries included" set of features to help you get running quickly:
    • Built in FastAPI API for your agent
    • Basic RAG features
    • A set of production-ready tools (extracted from our Supercog product)
    • Agentic Chat UI examples in NextJS and Streamlit
    • A growing set of working examples

You can pretty much use any of these features and leave the others. There are lots of framework choices but we think we have embedded some good ideas into ours.

Some of the framework features:

  • Approachable and simple to use, but flexible enough to support the most complex agents
  • Supports teams of cooperating agents
  • Supports Human-in-the-loop
  • Easy definition and use of tools (functions, class methods, import LangChain tools, ...)
  • Built alongside a set of production-tested tools

Visit the docs: https://supercog-ai.github.io/agentic/latest/

Pre-built agents you can run today

Perform complex research on any topic. Adapted from the LangChain version (but you can actually understand the code).

...full browser automation, including using authenticated sessions...

An agent team which auto-produces and publishes a daily podcast. Customize for your news interests.

Your own meeting bot agent with meeting summaries stored into RAG.

Install

At this stage it's probably easiest to run this repo from source. We use uv for package management:

Note If you're on Linux or Windows and installing the rag extra you will need to add --extra-index-url https://download.pytorch.org/whl/cpu to install the CPU version of PyTorch.

git clone [email protected]:supercog-ai/agentic.git
uv venv  --python 3.12
source .venv/bin/activate

# For MacOS
uv pip install -e "./agentic[all,dev]"

# For Linux or Windows
uv pip install -e "./agentic[all,dev]" --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-first-match

these commands will install the agentic package locally so that you can use the agentic CLI command and so your pythonpath is set correctly.

Install the package

You can also try installing just the package:

# For MacOS
uv pip install "agentic-framework[all,dev]"

# For Linux or Windows
uv pip install "agentic-framework[all,dev]" --extra-index-url https://download.pytorch.org/whl/cpu

Now setup your folder to hold your agents:

agentic init .

The install will copy examples and a basic file structure into the directory myagents. You can name or rename this folder however you like.

Intro Tutorial

Visit the docs for a tutorial on getting started with the framework.

Running Agents

Agentic provides multiple ways to interact with your agents, from command-line interfaces to web applications. This guide covers all available methods.

Available Interfaces

Interface Use Case Features
Command Line (CLI) Quick testing, scripting Simple text I/O, dot commands
REST API Integration with other applications HTTP endpoints, event streaming
Next.js Dashboard Professional web UI Real-time updates, thread history, background tasks
Streamlit Dashboard Quick prototyping Simple web UI with minimal setup

Command Line Interface

The CLI provides a simple REPL interface for direct conversations with your agents.

agentic thread examples/basic_agent.py

Learn more about the CLI →

REST API

The REST API allows integration with web applications, automation systems, or other services.

agentic serve examples/basic_agent.py

Learn more about the API →

Next.js Dashboard

The Next.js Dashboard offers a full-featured web interface with:

  • Multiple agent management
  • Real-time event streaming
  • Background task management
  • Thread history and logs
  • Markdown rendering
agentic dashboard start --agent-path examples/basic_agent.py

Learn more about the Next.js Dashboard →

Streamlit Dashboard

The Streamlit Dashboard provides a lightweight interface for quick prototyping.

agentic streamlit --agent-path examples/basic_agent.py

Learn more about the Streamlit Dashboard →

Programmatic Access

You can always interact with agents directly in Python:

from agentic.common import Agent

# Create an agent
agent = Agent(
    name="My Agent",
    instructions="You are a helpful assistant.",
    model="openai/gpt-4o-mini"
)

# Use the << operator for a quick response
response = agent << "Hello, how are you?"
print(response)

# For more control over the conversation
request_id = agent.start_request("Tell me a joke").request_id
for event in agent.get_events(request_id):
    print(event)

Learn more about Programmatic Access →

Dependencies

Agentic builds on Litellm to enable consistent support for many different LLM models.

Under the covers, Agentic uses Ray to host and run your agents. Ray implements an actor model which implements a much better architecture for running complex agents than a typical web framework.

API Keys

Agentic requires API keys for the LLM providers you plan to use. Copy the .env.example file to .env and set the following environment variables:

OPENAI_API_KEY=your_openai_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here

You only need to set the API keys for the models you plan to use. For example, if you're only using OpenAI models, you only need to set OPENAI_API_KEY.

Tests and docs

Run tests:

pytest

Preview docs locally:

mike serve

Deploy the docs:

mike deploy --push dev

Why does this exist?

Yup, there's a lot of agent frameworks. But many of these are "gen 1" frameworks - designed before anyone had really built agents and tried to put them into production. Agentic is informed by our learnings at Supercog from building and running hundreds of agents over the past year.

Some reasons why Agentic is different:

  • We have a thin abstraction over the LLM. The "agent loop" code is a couple hundred lines calling directly into the LLM API (the OpenAI completion API via Litellm).
  • Logging is built-in and usable out of the box. Trace agent threads, tool calls, and LLM completions with ability to control the right level of detail.
  • Well designed abstractions with just a few nouns: Agent, Tool, Thread, Run. Stop assembling the computational graph out of toothpicks.
  • Rich event system goes beyond text so agents can work with data and media.
  • Event streams can have multiple channels, so your agent can "run in the background" and still notify you of what is happening.
  • Human-in-the-loop is built into the framework, not hacked in. An agent can wait indefinitely, or get notification from any channel like an email or webhook.
  • Context length, token usage, and timing usage data is emitted in a standard form.
  • Tools are designed to support configuration and authentication, not just run on a sea of random env vars.
  • Use tools from almost any framework, including MCP and Composio.
  • "Tools are agents". You can use tools and agents interchangeably. This is where the world is heading, that whatever "service" your agent uses it will be indistinguishable whether that service is "hard-coded" or implemented by another agent.
  • Agents can add or remove tools dynamically while they are running. (coming soon...)
  • "Batteries included". Easy RAG support. Every agent has an API interface. UI tools for quickly building a UI for your agents. "Agent contracts" for testing.
  • Automatic context management keeps your agent within context length limits.

Contributing

We would love you to contribute! We especially welcome:

  • New tools
  • Example agents
  • New UI apps

but obviously we appreciate bug reports, bug fixes, etc... We encourage tests with all contributions, but especially if you want to modify the core framework please submit tests in the PR.

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for agentic

Similar Open Source Tools

For similar tasks

For similar jobs