Advanced web-based visualization platform for multi-agent systems with real-time data streaming, interactive dashboards, and enterprise-grade performance
SPADE Bokeh Server Plugin is a powerful integration that brings Bokeh's advanced web-based interactive visualization capabilities directly into your SPADE multi-agent systems. This plugin leverages Bokeh's HTML5 Canvas and WebGL rendering to create high-performance, real-time visualizations that update dynamically as your agents operate.
Built on Bokeh's server architecture, the plugin provides seamless integration with SPADE 3+ web controller and Jinja2 template system. It transforms your multi-agent systems into visually rich, interactive monitoring and analysis platforms where complex agent behaviors, communication patterns, and system metrics are rendered as publication-quality charts accessible from any web browser.
Leverage Bokeh's ColumnDataSource and periodic callbacks for efficient real-time agent data visualization. Stream new data points without full plot redraws, supporting high-frequency agent updates with minimal performance impact.
Access Bokeh's comprehensive plotting toolkit: scatter plots with customizable markers, multi-line time series, bar charts, histograms, box plots, contour plots, heatmaps, and specialized geographic visualizations for spatial agent data.
Build comprehensive multi-panel dashboards with interactive widgets (sliders, dropdowns, checkboxes) that trigger Python callbacks. Monitor agent states, performance metrics, message queues, and system health in real-time.
Deploy browser-based visualizations using HTML5 Canvas and WebGL rendering. No client-side installation required - serve interactive dashboards through SPADE's web interface with automatic plot synchronization.
{{ script | safe }}
from spade_bokeh import BokehServerMixin
from spade.agent import Agent
from bokeh.plotting import figure
from bokeh.models import ColumnDataSource
class MyVisualizationAgent(BokehServerMixin, Agent):
async def setup(self):
# Start Bokeh server
self.bokeh_server.start()
# Add real-time plot endpoint
self.bokeh_server.add_plot("/live_data", self.create_live_plot)
# Start data streaming
self.add_behaviour(self.DataStreamBehaviour())
def create_live_plot(self, doc):
# Create data source for streaming
source = ColumnDataSource(data=dict(x=[], y=[]))
# Create interactive plot
plot = figure(title="Agent Performance",
x_axis_label="Time", y_axis_label="Value")
plot.line('x', 'y', source=source, line_width=2)
# Add periodic callback for real-time updates
def update_data():
new_data = self.get_latest_metrics()
source.stream(new_data, rollover=1000)
doc.add_periodic_callback(update_data, 100) # Update every 100ms
doc.add_root(plot)
pip install spade_bokeh
Requires Python 3.7+, SPADE 3+ framework, and Bokeh 2.0+