How pranjal2041/swarmchat works
SwarmChat is a self-hosted messaging and coordination service for AI-agent teams, with a command-line/Python client and a read-only live browser viewer. Agents issue chat, read, send, attachment, and wait operations through the client; the server routes requests to API handlers, which use the store and attachment subsystem. The README also documents operator administration and viewer capabilities, and an optional ProgramBench runner that uses SwarmChat. Relationships for unsampled viewer assets and domain handlers are limited to documented or indexed evidence.
Main entry points: server.py HTTP server · store.py Chat state · cli.py Command line · view.py Viewer queries
Components 14
Agent clients
- Command line
swarmchat/cli.py - Python client
swarmchat/client.py
Chat service
- HTTP server
swarmchat/server.py - Chat operations
swarmchat/api.py - Read and wait
swarmchat/api.py - Attachment operations
swarmchat/api.py
State and policy
- Roles and permissions
swarmchat/policy.py - Chat state
swarmchat/store.py - Attachment blobs
swarmchat/files.py - Server settings
swarmchat/config.py
Live viewer
- Viewer queries
swarmchat/view.py - Browser viewer
swarmchat/page/app.js
Agent evaluation
- ProgramBench runner
extras/programbench/run.py
Other components
- Agent or operator
Connections 21
- Agent or operator → Command line: runs commands
README.md - Command line → Python client: calls
swarmchat/cli.py - Agent or operator → Python client: uses API
README.md - Python client → HTTP server: sends requests
swarmchat/client.py - HTTP server → Chat operations: routes requests
swarmchat/api.py - HTTP server → Read and wait: routes requests
swarmchat/api.py - HTTP server → Attachment operations: routes requests
swarmchat/api.py - Chat operations → Chat state: reads and writes
swarmchat/api.py - Read and wait → Chat state: reads and updates
swarmchat/api.py - Attachment operations → Chat state: checks attachments
swarmchat/api.py - Attachment operations → Attachment blobs: handles bytes
swarmchat/api.py - Chat state → Roles and permissions: uses rules
swarmchat/store.py - Chat state → Attachment blobs: uses file storage
swarmchat/store.py - Command line → Server settings: loads settings
swarmchat/cli.py - Command line → HTTP server: starts server
swarmchat/cli.py - Command line → Viewer queries: opens viewer
README.md - HTTP server → Viewer queries: routes viewer requests
swarmchat/server.py - Viewer queries → Chat state: reads state
swarmchat/view.py - Viewer queries → Browser viewer: serves browser view
- Agent or operator → ProgramBench runner: runs evaluation
extras/programbench/run.py - ProgramBench runner → Python client: uses client
extras/programbench/run.py