Smart Python Agent Development Environment - A multi-agent systems framework powered by XMPP messaging, enabling intelligent agents to communicate with each other and humans.
SPADE (Smart Python Agent Development Environment) is an open-source multi-agent systems platform that enables developers to create intelligent agents capable of communicating with other agents and humans through the XMPP protocol.
Built with modern Python's asyncio architecture, SPADE provides a behavior-based agent model that supports real-time presence notifications, FIPA metadata handling, and includes a built-in web interface for monitoring and interaction. Compatible with Python ≥3.9 and works across Windows, macOS, and Linux platforms.
Built on the XMPP protocol for robust, real-time messaging between agents and humans. Includes standardized messaging, presence notification, and built-in security features.
Define agent behaviors using cyclic, periodic, one-shot, and finite state machine patterns. Modular design supports task specialization and complex workflow management.
Modern asynchronous programming with Python's asyncio for concurrent agent operations. Enables non-blocking operations, efficient resource usage, and modern Python practices.
Real-time presence notification system to monitor agent status and availability. Includes status tracking, automatic reconnection, and comprehensive system monitoring.
Built-in web interface for easy monitoring and interaction with your agents. Features message visualization, agent status dashboard, and customizable user interface.
Supports FIPA metadata via XMPP Data Forms, ensuring compatibility with multi-agent system standards.
Install SPADE using pip and create your first agent in minutes.
pip install spade
Requirements: Python ≥3.9, works on Windows, macOS, and Linux.
Create your first SPADE agent with this simple example.
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 resources to help you build powerful multi-agent systems with SPADE:
This example demonstrates SPADE's message handling capabilities with automatic reply functionality:
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())
This agent can receive messages and automatically reply to them. SPADE handles all the underlying communication details for you.
See 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