Monitoring and information service for the ePIC streaming workflow testbed.
The application is built on Django infrastructure and comprises two main web apps, real-time messaging, and PostgreSQL backend.
-
Monitor App (
monitor_app
): Primary user-facing component- Browser UI: Server-side rendered dashboard for viewing agent statuses with Django session authentication
- REST API: Programmatic interface with token-based authentication and OpenAPI schema
-
MCP App (
mcp_app
): Real-time communication layer- WebSocket Service: Django Channels implementation of Model Control Protocol (MCP)
- REST Endpoints: HTTP alternative to WebSocket for MCP commands
-
ActiveMQ Integration: Management command (
listen_activemq
) for agent communications via message queue -
PostgreSQL Database: Primary data store for agents, logs, runs, and application state
The monitor serves as the central hub in a distributed agent-based workflow:
┌─ swf-daqsim-agent (scheduler/generator)
│ ↓ ActiveMQ messages
├─ [swf-data-agent] → [swf-processing-agent] → [swf-fastmon-agent]
│ ↓ status updates & logs
└─ swf-monitor (dashboard/database)
- 🖥️ Real-time Dashboard - Agent status monitoring with live updates
- 🔗 REST API - Complete CRUD operations with OpenAPI documentation
- ⚡ WebSocket Service - Bidirectional real-time communication via MCP
- 📊 Centralized Logging - Agent log collection with
swf-common-lib
integration - 🔐 Authentication - Token-based API access and web session management
- 📈 Message Queue Integration - ActiveMQ connectivity for workflow coordination
- 🧪 Comprehensive Testing - 65 tests across API, UI, and integration scenarios
📚 Complete technical documentation in docs/
directory:
Guide | Description | Use Case |
---|---|---|
Setup Guide | Installation, configuration, and development setup | Getting started |
API Reference | REST API, WebSocket, database schema, authentication | Integration |
MCP Implementation | Model Control Protocol REST API details | Agent communication |
Development Roadmap | Future plans, architecture, workflow design | Contributors |
Test System | Testing approach, structure, and best practices | Quality assurance |
- Interactive API Docs: Swagger UI | ReDoc
- Database Schema: testbed-schema.dbml (auto-generated)
- Parent Project: swf-testbed documentation
# See docs/SETUP_GUIDE.md for complete installation
python manage.py runserver # Start web interface
python manage.py listen_activemq # Start message queue listener
# Generate token and create agent
python manage.py get_token username --create-user
curl -H "Authorization: Token <token>" -H "Content-Type: application/json" \
-d '{"instance_name": "my-agent", "agent_type": "test", "status": "OK"}' \
http://127.0.0.1:8000/api/systemagents/
# Centralized logging with swf-common-lib
from swf_common_lib.rest_logging import setup_rest_logging
logger = setup_rest_logging(app_name='my_agent', instance_name='agent_001')
logger.info("Agent started") # Automatically sent to monitor
See Test System documentation for comprehensive testing guide.
- Python 3.9+
- PostgreSQL for data persistence
- ActiveMQ for agent messaging (optional)
- Django web framework with Channels for WebSocket support
- Model Control Protocol (MCP) for standardized agent communication
- Token-based REST API with comprehensive OpenAPI documentation
- Shared service architecture between WebSocket and REST implementations
See Setup Guide for detailed development environment configuration.
For complete technical documentation and implementation details, see the docs/
directory.