Skip to main content

The WordPress of AI Agents - A modular, lightweight agentic framework

Project description

๐Ÿค– AgentStack

The WordPress of AI Agents - A modular, lightweight, plugin-first agentic framework that makes building AI agents as easy as WordPress makes building websites.

Python 3.10+ License: MIT

โœจ Features

  • ๐Ÿงฉ Modular Architecture - Plug-and-play components for skills, tools, memory, and more
  • ๐Ÿ”Œ Plugin System - Extend functionality with WordPress-style plugins
  • ๐Ÿง  Multi-Type Memory - Conversation, long-term, semantic, and composite memory
  • ๐Ÿ“Š Graph Workflows - Visual, state-based workflow orchestration
  • ๐Ÿ” RAG Pipeline - Built-in retrieval-augmented generation with reranking
  • ๐Ÿ‘ฅ Human-in-the-Loop - Approval workflows, feedback, and intervention points
  • ๐Ÿคฑ Mother Agent - AI-powered assistant to help you build agents
  • ๐Ÿ”ง 12+ LLM Providers - OpenAI, Anthropic, Google, Azure, and more
  • ๐Ÿ“ Type-Safe - Full type hints and validation

๐Ÿš€ Quick Start

Installation

pip install agentstack

Create Your First Agent

from agentstack import Agent, skill
from agentstack.memory import ConversationMemory

@skill(id="greet", description="Greet the user")
async def greet(name: str = "friend") -> str:
    return f"Hello, {name}! How can I help you today?"

agent = Agent(
    name="GreeterBot",
    skills=[greet],
    memory=ConversationMemory(),
    model="gpt-4"
)

# Run interactively
agent.run()

Using the CLI

# Create a new project
stack init my-agent

# Run your agent
cd my-agent
stack run

# Get help from Mother Agent
stack mother

๐Ÿ“– Documentation

Core Concepts

Concept Description
Agent The main entity that processes requests
Skills Capabilities your agent can use
Tools External integrations (web, files, code)
Memory Context and conversation history
Workflows Multi-step process orchestration

Modules

  • Memory - Conversation, buffer, window, long-term, composite
  • RAG - Document loading, chunking, retrieval, reranking
  • Tools - Built-in and custom tools
  • Workflows - State graphs and execution
  • HITL - Human-in-the-loop patterns
  • Plugins - Creating and using plugins

Guides

๐Ÿงฑ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         AgentStack                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”‚
โ”‚  โ”‚   Agent     โ”‚  โ”‚  MultiAgent โ”‚  โ”‚   Mother    โ”‚          โ”‚
โ”‚  โ”‚             โ”‚  โ”‚   System    โ”‚  โ”‚   Agent     โ”‚          โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜          โ”‚
โ”‚         โ”‚                โ”‚                                  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚                    Core Modules                      โ”‚   โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค   โ”‚
โ”‚  โ”‚  Skills  โ”‚  Tools   โ”‚  Memory  โ”‚Workflows โ”‚   RAG    โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                                                             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚                  Foundation Layer                    โ”‚   โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค   โ”‚
โ”‚  โ”‚ Kernel  โ”‚ Vectors โ”‚ Tracing โ”‚ Guards  โ”‚Orchestrate   โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                                                             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚  โ”‚                   LLM Providers                        โ”‚ โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚
โ”‚  โ”‚ OpenAI โ”‚Anthropic โ”‚ Google โ”‚ Azure  โ”‚ Cohere   โ”‚ More  โ”‚ โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ฆ Examples

Research Agent with RAG

from agentstack import Agent, skill
from agentstack.rag import RAGPipeline, SemanticRetriever
from agentstack.tools import WebSearchTool, WebFetchTool

@skill(id="research", description="Research a topic")
async def research(topic: str) -> str:
    # Skill implementation
    pass

agent = Agent(
    name="Researcher",
    skills=[research],
    tools=[WebSearchTool(), WebFetchTool()],
    rag=RAGPipeline(retriever=SemanticRetriever()),
)

Workflow with State Graph

from agentstack.workflows import StateGraph, GraphExecutor

graph = StateGraph()

graph.add_node("analyze", analyze_function)
graph.add_node("process", process_function)
graph.add_node("output", output_function)

graph.add_edge("analyze", "process")
graph.add_conditional_edge("process", router_function)

graph.set_entry_point("analyze")
compiled = graph.compile()

executor = GraphExecutor()
result = await executor.run(compiled.graph, initial_state={})

Multi-Agent Collaboration

from agentstack import Agent, MultiAgent

researcher = Agent(name="Researcher", skills=[search])
writer = Agent(name="Writer", skills=[write])
reviewer = Agent(name="Reviewer", skills=[review])

team = MultiAgent(
    name="ContentTeam",
    agents=[researcher, writer, reviewer],
    strategy="sequential",
)

result = await team.run("Create an article about AI agents")

๐Ÿ”Œ Creating Plugins

from agentstack.plugins import Plugin
from agentstack.tools import tool

class WeatherPlugin(Plugin):
    name = "weather"
    version = "1.0.0"

    def on_load(self):
        self.register_tool(self._create_weather_tool())

    def _create_weather_tool(self):
        @tool(name="get_weather", description="Get weather for a city")
        async def get_weather(city: str) -> dict:
            # Implementation
            return {"city": city, "temp": 72}
        return get_weather

๐Ÿคฑ Mother Agent

The Mother Agent is your AI-powered development assistant:

# Interactive mode
stack mother

# Design an agent
stack mother build "I need a research agent"

# Validate your project
stack mother validate

# Generate from template
stack mother generate researcher --name MyResearcher
from agentstack.mother import MotherAgent

mother = MotherAgent()

# Get help designing an agent
blueprint = await mother.help_build(
    "I need an agent that searches the web and summarizes articles"
)

# Validate configuration
result = mother.validate(config=my_config)

# Debug an error
analysis = mother.debug(agent, error)

๐Ÿ› ๏ธ CLI Commands

Command Description
stack init <name> Create a new project
stack run Run the agent
stack mother Start Mother Agent
stack plugin list List plugins
stack plugin install <name> Install a plugin
stack tool list List available tools
stack workflow create <name> Create a workflow
stack validate Validate project

๐Ÿงช Testing

# Run all tests
pytest tests/

# Run specific tests
pytest tests/test_memory.py

# Run with coverage
pytest --cov=agentstack tests/

๐Ÿ“‹ Requirements

  • Python 3.10+
  • Dependencies installed via pip

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests
  5. Submit a pull request

๐Ÿ“„ License

MIT License - see LICENSE for details.

๐Ÿ™ Acknowledgments

AgentStack is inspired by the WordPress model of accessible, extensible software that empowers creators of all skill levels.


Built with โค๏ธ by the AgentStack Team

Documentation โ€ข GitHub โ€ข Discord

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

agenticstack-0.1.0.tar.gz (367.9 kB view details)

Uploaded Source

Built Distribution

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

agenticstack-0.1.0-py3-none-any.whl (326.0 kB view details)

Uploaded Python 3

File details

Details for the file agenticstack-0.1.0.tar.gz.

File metadata

  • Download URL: agenticstack-0.1.0.tar.gz
  • Upload date:
  • Size: 367.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for agenticstack-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9898cfed10db98d04071061f17257e52d3fd046ea7d3eee1ad85b80b8bedb29c
MD5 e2390fc2b06ff4470f80dc81626e53a4
BLAKE2b-256 0c5f81da2e77f937176c857d18995876b6775dad9626ae50dd90b8817e2ffd4f

See more details on using hashes here.

File details

Details for the file agenticstack-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agenticstack-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 326.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for agenticstack-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4968ce86b92fa84b2590aa7950cf34bf6996aadaf661a0ca908b0ec7d100d82
MD5 054ef3fd1992e4de281bc0bc09601665
BLAKE2b-256 d27ee1cdd2c3ad366e04d65f2ef0931b35f9c0cd47b4753086d9c8d100692e25

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