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.
Make your own connections and create your multi-agent system
Discover what makes SPADE the perfect choice for multi-agent systems
Built on the XMPP protocol for robust, real-time messaging between agents and humans.
Define agent behaviors using cyclic, periodic, one-shot, and finite state machine patterns.
Modern asynchronous programming with Python's asyncio for concurrent agent operations.
Real-time presence notification system to monitor agent status and availability.
Built-in web interface for easy monitoring and interaction with your agents.
Seamless integration with Large Language Models for intelligent agent reasoning and natural language processing.
Creating intelligent agents has never been easier
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())
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 ExamplesEnhance your agent platform with specialized capabilities
The SPADE ecosystem is constantly growing with new plugins and extensions.
Start building your multi-agent system in minutes
Install SPADE using pip and create your first agent in minutes.
pip install spade
SPADE requires Python 3.9 or higher and works on Windows, macOS, and Linux.
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())
Comprehensive guides and API reference to help you get the most out of SPADE.
SPADE powers intelligent applications across various domains
Coordinate IoT devices and sensors in smart factories and industrial automation systems.
Manage traffic systems, energy grids, and public services through intelligent agent coordination.
Build distributed artificial intelligence systems with cooperating and competing agents.
Create autonomous trading agents for algorithmic trading and market analysis.
Develop adaptive learning environments and intelligent tutoring systems.
Model complex social interactions and communication patterns in virtual environments.
Elevate your multi-agent systems with Large Language Model integration. Create agents that think, reason, and communicate naturally.
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.
Content filtering and safety controls for secure AI interactions
Agent learning and conversation continuity with persistent storage
Web interface for expert consultation with configurable timeout
Async function calling with custom tool creation and LangChain integration
Model Context Protocol integration for advanced agent coordination
Multi-conversation support with automatic cleanup and intelligent routing
Agent function description
Fully distributed and decentralized architecture based on XMPP protocol for robust, scalable agent communication.
Advanced orchestration capabilities with conditional routing, dynamic workflows, and intelligent message handling.
Smart message routing with context-aware decision making, load balancing, and automatic failover mechanisms.
Extensive tool integration including MCP servers, LangChain tools, and custom function calling capabilities.
Built-in security features, content filtering, guardrails system, and comprehensive safety controls for production use.
Seamlessly integrates with all SPADE extensions like BDI, PubSub, Artifacts, and Norms for enhanced functionality.
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:
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:
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:
Install with pip install spade_llm
and create intelligent agents that combine SPADE's distributed architecture with generative AI capabilities.
Stay updated with the latest SPADE developments
New features include improved async support and better error handling.
2024-01-15Enhanced BDI capabilities with improved AgentSpeak support.
2024-01-10Comprehensive tutorials and examples now available.
2024-01-05See how SPADE agents communicate and interact in real-time
Watch agents send and receive messages using XMPP protocol
See different behavior types: Cyclic, Periodic, and One-shot
Monitor agent status and presence in real-time