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.2.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.2.0-py3-none-any.whl (121.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentic_swarm-0.2.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.2.0.tar.gz
Algorithm Hash digest
SHA256 2b43e82a9e9b1d39b3a52cf6d662e3b852f2075341d5125b1cd7138b4b32a78c
MD5 bb01b6185ab7f432207326a83d1f451e
BLAKE2b-256 3987caf5d164e163c1c9df5b131cf3084e2a74c870a5f7a40ae4890bd9280c94

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_swarm-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: agentic_swarm-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 121.4 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 002c6c45aa8593227452a5ccdc91c4db41c57a97537b4c767baa679d4f3cc0f3
MD5 b54db0ed21ffc53a2e633e80110677d5
BLAKE2b-256 e92c818eaee30f83a13d9a577d0b54df1a6929e8127203326a86851962e3318b

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_swarm-0.2.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