Skip to main content

Plug-and-play SDK for building immortal, self-healing multi-agent AI systems

Project description

Agentic Swarm Banner

Agentic Swarm Logo

Build immortal, self-healing multi-agent AI systems

CI PyPI Downloads License Python Stars

FeaturesInstallationQuick StartDocumentationContributing

README Code of Conduct Contributing License Security


What is Agentic Swarm?

Agentic Swarm is a production-grade SDK for building multi-agent AI systems where agents:

  • Never die — Auto-heal on failure with state recovery
  • Spawn children — Dynamically create sub-agents for complex subtasks
  • Route intelligently — Pick the optimal LLM based on task complexity
  • Remember everything — Tiered memory with vector-indexed long-term storage
  • Stay secure — Audit logs, encryption, RBAC, and data isolation

Highlights

Tests Passing LLM Providers Examples External DBs

Features

Feature Description
Immortal Agents Auto-heal on failure with state recovery
Dynamic Spawning Create sub-agents at runtime
7 LLM Providers OpenAI, Anthropic, Bedrock, Gemini, Groq, Ollama, vLLM
Smart Routing Cost/speed/quality optimized model selection
Tiered Memory Core + Recall + Archival (vector-indexed)
Never-Forget Memory Compress, store, search, inject memories across sessions
RAG Pipeline Chunk → Embed → Retrieve (dense+BM25+RRF) → Rerank
Hybrid Search Dense vectors + BM25 sparse + Reciprocal Rank Fusion
Sandbox Isolation CPU/memory limits, data isolation per agent
Security Audit logs, AES-256 encryption, RBAC

Installation

pip install agentic-swarm

With optional providers:

pip install agentic-swarm[openai]      # OpenAI
pip install agentic-swarm[anthropic]   # Anthropic
pip install agentic-swarm[bedrock]     # AWS Bedrock
pip install agentic-swarm[all]         # Everything

Quick Start

import asyncio
from agentic_swarm import Agent, Swarm, tool

@tool
def search_web(query: str) -> str:
    """Search the web for information."""
    return f"Results for: {query}"

agent = Agent(
    name="researcher",
    role="Research and gather information",
    tools=[search_web],
)

swarm = Swarm(agents=[agent])

async def main():
    result = await swarm.run("Find information about AI agents")
    print(result)

asyncio.run(main())

With LLM Provider

from agentic_swarm import Agent
from agentic_swarm.llm import LLMRouter, OpenAIProvider

router = LLMRouter(strategy="quality_optimized")
router.register_provider("openai", OpenAIProvider(model="gpt-4o"))

agent = Agent(
    name="assistant",
    role="Helpful AI assistant",
    llm_router=router,
)

result = await agent.run("Explain quantum computing")

Never-Forget Memory

from agentic_swarm import Agent
from agentic_swarm.vectordb import InMemoryVectorDB
from agentic_swarm.rag.embedder import Embedder

# Agent that remembers across sessions
agent = Agent(
    name="assistant",
    role="Helpful assistant",
    vectordb=InMemoryVectorDB(),
    embedder=Embedder(),
    auto_archive=True,
    auto_inject_memories=True,
)

# Store memories
await agent.remember("User prefers dark mode")

# Search memories
memories = await agent.recall("user preferences")

# Run task - automatically injects relevant memories
result = await agent.run("What are my preferences?")

Documentation

Document Description
Getting Started Installation and first steps
Configuration All configurable parameters
API Reference Complete API documentation
Examples Code examples and tutorials
Architecture System design

Examples

# Full SDK showcase
python examples/full_showcase.py --provider openai

# With AWS Bedrock
python examples/full_showcase.py --provider bedrock

# Demo mode (no LLM)
python examples/full_showcase.py --skip-llm

See examples/ for working examples covering all features.

Contributing

We welcome contributions! Please see our contributing guidelines.

Resource Link
📖 README README.md
🤝 Code of Conduct CODE_OF_CONDUCT.md
👥 Contributing CONTRIBUTING.md
📜 License Apache 2.0
🔒 Security SECURITY.md

Development Setup

git clone https://github.com/nik0811/agentic-swarm.git
cd agentic-swarm
python -m venv env && source env/bin/activate
pip install -e ".[dev,all]"
pytest tests/ -v

Roadmap

  • 7 LLM Providers (OpenAI, Anthropic, Bedrock, Gemini, Groq, Ollama, vLLM)
  • Tiered Memory (Core + Recall + Archival)
  • RAG Pipeline with Hybrid Search
  • Agent Sandbox & Data Isolation
  • Never-Forget Memory
  • Web UI Dashboard
  • Distributed Multi-Node Swarms
  • OpenTelemetry Integration

License

Apache License 2.0 — see LICENSE for details.


Built with ❤️ for the AI community

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

agentic_swarm-0.1.0.tar.gz (3.9 MB view details)

Uploaded Source

Built Distribution

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

agentic_swarm-0.1.0-py3-none-any.whl (109.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentic_swarm-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentic_swarm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1e1dec04645e5d56bdf4136900e4a91614d4eb612c4dd901d066552f6016189e
MD5 0023fa33c848562a2af380c5f5b19c8b
BLAKE2b-256 237228268dec7e4da658d85d7ccafc9056d26246ccfd4c1827ed5fc2aa34137d

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_swarm-0.1.0.tar.gz:

Publisher: release-please.yml on nik0811/agentic-swarm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: agentic_swarm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 109.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentic_swarm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9667a4e191b8a2771093cc6b2012162befca69c3f2b741d969b5deaa0b20f248
MD5 9556cdef9fc53b363b21f16ca84af977
BLAKE2b-256 e8c3b2e167f7a8e3b5fe13c880eda6ea4f235ed51c1b0a99e3f55cee731bcea2

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_swarm-0.1.0-py3-none-any.whl:

Publisher: release-please.yml on nik0811/agentic-swarm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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