How vinayaksharma1853-a11y/relay_caspian_hackathon works
RELAY receives incidents and commands through one Caspian message handler, analyzes incidents, records their state, and replies with status or a severity-based communication plan. Telegram and Discord are connected at runtime; email appears in the plan but is not dispatched by the sampled code. The source excerpt is partial, so the graph omits uncertain details of command handling and persistence beyond the visible JSON state operations.
Main entry points: relay_agent.py Relay agent · main.py Message handler
Components 15
Runtime and channels
- Runtime setup
main.py - Caspian client
- Telegram
- Discord
- Message handler
main.py
Incident decisions
- Relay agent
relay_agent.py - Command handling
relay_agent.py - Incident analysis
relay_agent.py - OpenAI API
- Fallback classifier
relay_agent.py - Communication plan
relay_agent.py
Incident state
- Incident IDs
relay_agent.py - Status tracking
relay_agent.py - Incident state file
relay_agent.py
Other components
- Incident sender
Connections 19
- Runtime setup → Caspian client: creates and listens
- Runtime setup → Telegram: connects when configured
- Runtime setup → Discord: connects when configured
- Incident sender → Caspian client: sends message
- Caspian client → Message handler: dispatches message
- Message handler → Relay agent: handles text
- Relay agent → Command handling: checks commands
- Relay agent → Incident analysis: analyzes incident
- Incident analysis → OpenAI API: requests analysis
- Incident analysis → Fallback classifier: uses without key or on error
- Incident analysis → Communication plan: returns severity and channels
- Relay agent → Incident IDs: creates incident ID
- Relay agent → Status tracking: updates incident
- Command handling → Status tracking: reads and updates
- Incident IDs → Incident state file: persists counter
- Status tracking → Incident state file: loads and saves
- Relay agent → Communication plan: includes plan in response
- Relay agent → Message handler: returns response
- Message handler → Caspian client: replies to message