SPADE Logo

Smart Python Agent Development Environment

A comprehensive multi-agent systems platform written in Python, powered by XMPP messaging. Build intelligent agents with IoT artifact connections, advanced presence management, and seamless communication between agents and humans. With SPADE-LLM, integrate Large Language Models featuring guardrails, MCP server connections, and persistent memory - creating truly intelligent, interconnected agent ecosystems.

Agent 1

Unavailable
oneshot

Agent 2

Available
cyclic
spade_artifact connection

Agent 3

Available
LLMBehaviour
Guardrails MCP Connection

Agent 4

Available
LLMBehaviour
Memory DB Context Store

MCP Server

HTTP Streaming
IoT

FIWARE IoT Artifact

Connected
👆

Make your own connections and create your multi-agent system

PyPI Version Python Versions MIT License CI Status Coverage Documentation Downloads

Key Features

Discover what makes SPADE the perfect choice for multi-agent systems

🔌

XMPP-Based

Built on the XMPP protocol for robust, real-time messaging between agents and humans.

  • Standardized messaging
  • Presence notification
  • Security features
⚙️

Behaviour-Based Model

Define agent behaviors using cyclic, periodic, one-shot, and finite state machine patterns.

  • Modular design
  • Task specialization
  • Complex workflow support
🔄

Asyncio Support

Modern asynchronous programming with Python's asyncio for concurrent agent operations.

  • Non-blocking operations
  • Efficient resource usage
  • Modern Python practices
👁️

Presence Awareness

Real-time presence notification system to monitor agent status and availability.

  • Status tracking
  • Automatic reconnection
  • System monitoring
🌐

Web Interface

Built-in web interface for easy monitoring and interaction with your agents.

  • Message visualization
  • Agent status dashboard
  • Customizable UI
🧠

LLM Integration

Seamless integration with Large Language Models for intelligent agent reasoning and natural language processing.

  • AI-powered agents
  • Natural language understanding
  • Contextual reasoning

See SPADE in Action

Creating intelligent agents has never been easier

agent_example.py
import spade
from spade.agent import Agent
from spade.behaviour import CyclicBehaviour
from spade.message import Message

class MyAgent(Agent):
    class MyBehaviour(CyclicBehaviour):
        async def run(self):
            msg = await self.receive(timeout=10)
            if msg:
                print(f"Message received: {msg.body}")
                reply = Message(to=str(msg.sender))
                reply.body = "I received your message!"
                await self.send(reply)

    async def setup(self):
        behaviour = self.MyBehaviour()
        self.add_behaviour(behaviour)

async def main():
    agent = MyAgent("agent@localhost", "password")
    await agent.start()

if __name__ == "__main__":
    spade.run(main())

Simple & Intuitive API

SPADE provides a clean, object-oriented API that makes it easy to create powerful multi-agent systems. Define your agents, their behaviors, and how they communicate with just a few lines of code.

This example shows a basic agent that can receive messages and automatically reply to them. SPADE handles all the underlying communication details for you.

View More Examples

Extend SPADE with Plugins

Enhance your agent platform with specialized capabilities

SPADE BDI

Implement Belief-Desire-Intention agents with AgentSpeak language support.

SPADE PubSub

Add publish-subscribe communication patterns to your agent platform.

SPADE Artifact

Create and manage artifacts for your agents to interact with.

SPADE Norms

Implement normative systems to regulate agent behaviors.

SPADE Bokeh

Integrate interactive Bokeh plots with your agent interfaces.

More Coming Soon

The SPADE ecosystem is constantly growing with new plugins and extensions.

Getting Started

Start building your multi-agent system in minutes

Quick Installation

Install SPADE using pip and create your first agent in minutes.

Terminal
pip install spade

SPADE requires Python 3.9 or higher and works on Windows, macOS, and Linux.

hello_agent.py
import spade
from spade.agent import Agent
from spade.behaviour import OneShotBehaviour

class MyAgent(Agent):
    class MyBehav(OneShotBehaviour):
        async def run(self):
            print("Hello World!")

    async def setup(self):
        self.add_behaviour(self.MyBehav())

async def main():
    agent = MyAgent("agent@localhost", "password")
    await agent.start()

if __name__ == "__main__":
    spade.run(main())
Installation Guide

Documentation

Comprehensive guides and API reference to help you get the most out of SPADE.

Use Cases

SPADE powers intelligent applications across various domains

🏭

Industrial IoT

Coordinate IoT devices and sensors in smart factories and industrial automation systems.

🏙️

Smart Cities

Manage traffic systems, energy grids, and public services through intelligent agent coordination.

🤖

Distributed AI

Build distributed artificial intelligence systems with cooperating and competing agents.

💹

Financial Trading

Create autonomous trading agents for algorithmic trading and market analysis.

🎓

Educational Systems

Develop adaptive learning environments and intelligent tutoring systems.

🌐

Social Networks

Model complex social interactions and communication patterns in virtual environments.

AI Enhancement

Meet SpadeLLM

Elevate your multi-agent systems with Large Language Model integration. Create agents that think, reason, and communicate naturally.

Next-Generation Agent Intelligence

SpadeLLM provides production-ready LLM integration with advanced safety and coordination features. Build intelligent agents with guardrails, persistent memory, human oversight, and sophisticated tool capabilities for secure, enterprise-grade AI applications.

🛡️
Guardrails System

Content filtering and safety controls for secure AI interactions

🧠
Dual Memory Architecture

Agent learning and conversation continuity with persistent storage

👥
Human-in-the-Loop

Web interface for expert consultation with configurable timeout

🔧
Advanced Tools System

Async function calling with custom tool creation and LangChain integration

🌐
MCP Server Support

Model Context Protocol integration for advanced agent coordination

💬
Smart Context Management

Multi-conversation support with automatic cleanup and intelligent routing

Multi-Agent Orchestration Demo
GitHub Monitor Active
👤 User 🛡️ Chat Agent 🔍 GitHub Analyzer 📚 Notion Manager 📧 Email Manager 👥 Human Expert Email sent
Agent Details
Active

Function

Agent function description

Tools & Capabilities

Tool 1 Tool 2

XMPP Messages

No messages yet

Why SpadeLLM? Key Advantages

🌐
XMPP-Based Distributed

Fully distributed and decentralized architecture based on XMPP protocol for robust, scalable agent communication.

🎯
Flexible Orchestration

Advanced orchestration capabilities with conditional routing, dynamic workflows, and intelligent message handling.

🔄
Intelligent Routing

Smart message routing with context-aware decision making, load balancing, and automatic failover mechanisms.

🔧
Rich Tool Ecosystem

Extensive tool integration including MCP servers, LangChain tools, and custom function calling capabilities.

🛡️
Safe & Secure Agents

Built-in security features, content filtering, guardrails system, and comprehensive safety controls for production use.

🔌
SPADE Extension Compatible

Seamlessly integrates with all SPADE extensions like BDI, PubSub, Artifacts, and Norms for enhanced functionality.

Frequently Asked Questions

Get answers to common questions about SPADE

SPADE (Smart Python Agent Development Environment) is a multi-agent systems platform built in Python that leverages XMPP (eXtensible Messaging and Presence Protocol) for communication. What makes SPADE unique is its combination of an intuitive behavior-based agent model with powerful instant messaging capabilities that allow agents to interact with both other agents and humans.

Unlike other agent frameworks, SPADE provides presence awareness, asynchronous operation through asyncio, and a web-based interface out of the box. It's designed to be both powerful for complex systems and approachable for developers new to agent-based programming.

No, SPADE includes a custom XMPP server (pyjabber) that you can use out of the box for development and testing. This means you can get started with SPADE without setting up any additional infrastructure.

However, for production environments or specific requirements, SPADE is compatible with any standard XMPP server like Prosody, ejabberd, or Openfire. This flexibility allows you to choose the best option for your specific deployment needs.

SPADE provides several types of predefined behaviors to help you implement different agent tasks:

  • CyclicBehaviour: Executes repeatedly without end
  • PeriodicBehaviour: Executes at regular time intervals
  • OneShotBehaviour: Executes only once
  • TimeoutBehaviour: Executes after a specified time delay
  • FSMBehaviour: Implements a Finite State Machine for complex behavior patterns

These behavior types can be combined and nested to create sophisticated agent logic, and each behavior can have its own message template to handle specific types of incoming communications.

SPADE offers several official extensions that expand its core capabilities:

  • SPADE BDI: Implements Belief-Desire-Intention agents with AgentSpeak support for intelligent reasoning and goal-oriented behavior
  • SPADE PubSub: Provides publish-subscribe communication patterns for event-driven agent interactions
  • SPADE Artifact: Enables knowledge management and data integration from multiple sources (CSV, SQL, APIs, MongoDB)

Install any extension with pip install spade_[extension] (e.g., pip install spade_bdi).

Use the SpadeLLM extension to integrate Large Language Models into your agents. It supports multiple LLM providers (OpenAI, Ollama, LM Studio, vLLM) and includes advanced features:

  • Async function calling with custom tools
  • Dual memory architecture for agent learning
  • Guardrails system for content filtering
  • Human-in-the-loop web interface
  • Intelligent message routing
  • MCP server connections

Install with pip install spade_llm and create intelligent agents that combine SPADE's distributed architecture with generative AI capabilities.

150K+
Downloads
250+
Stars
100+
Forks
5+
Plugins

Latest News

Stay updated with the latest SPADE developments

SPADE 3.3.0 Released

New features include improved async support and better error handling.

2024-01-15
New BDI Plugin Available

Enhanced BDI capabilities with improved AgentSpeak support.

2024-01-10
Documentation Updated

Comprehensive tutorials and examples now available.

2024-01-05

Interactive Agent Demo

See how SPADE agents communicate and interact in real-time

Status: Paused
A simple demonstration of two agents exchanging messages.
Agent Communication

Watch agents send and receive messages using XMPP protocol

Behavior Patterns

See different behavior types: Cyclic, Periodic, and One-shot

Real-time Updates

Monitor agent status and presence in real-time

Python Implementation