Transforms chaotic emergency voice notes into instant Asana tasks, Slack alerts, and client emails.
Crisis Commander is a voice-first crisis management backend for the SpeakSpace Annual Hackathon. When a user records a panicked voice note like "API is DOWN! John restart server! Sarah call Acme!", our system:
- Parses it with AI (Gemini 2.0 Flash) to extract structured actions
- Creates Asana tasks with priority labels
- Posts Slack alerts to your crisis channel
- Sends professional emails to affected clients
- Returns instantly (< 500ms) while processing continues in background
- Python 3.10+
- Redis (optional - for background processing)
cd crisis-commander
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # Linux/Mac
pip install -r requirements.txtCopy .env.example to .env and fill in:
# Required
API_AUTH_TOKEN=your-secret-token-here
GOOGLE_API_KEY=your-gemini-api-key
# Optional (for integrations)
ASANA_ACCESS_TOKEN=your-asana-pat
ASANA_PROJECT_ID=your-project-id
SLACK_WEBHOOK_URL=https://hooks.slack.com/...
SENDGRID_API_KEY=SG.your-key| Variable | Required | How to Get |
|---|---|---|
API_AUTH_TOKEN |
✅ | Create any secret string |
GOOGLE_API_KEY |
✅ | Google AI Studio (FREE) |
ASANA_ACCESS_TOKEN |
Optional | Asana Developer Console |
SLACK_WEBHOOK_URL |
Optional | Slack Incoming Webhooks |
SENDGRID_API_KEY |
Optional | SendGrid (100 emails/day free) |
# Terminal 1: Start API server
cd crisis-commander
uvicorn app.main:app --reload --port 8000Server will be available at: http://localhost:8000
curl -X POST http://localhost:8000/api/triage \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-secret-token-here" \
-d '{
"prompt": "API DOWN! John restart server! Sarah call Acme! Mike status page NOW!",
"note_id": "test-001",
"timestamp": "2025-12-14T10:00:00Z"
}'Expected Response:
{
"status": "accepted",
"noteid": "test-001",
"message": "Crisis triage queued for processing"
}curl http://localhost:8000/api/health| Field | Value |
|---|---|
| Method | POST |
| URL | /api/triage |
| Content-Type | application/json |
| Authorization | Bearer <API_AUTH_TOKEN> |
{
"prompt": "string - The crisis text (from SpeakSpace transcription)",
"note_id": "string - Unique identifier for the voice note",
"timestamp": "string - ISO 8601 timestamp"
}{
"status": "accepted",
"noteid": "test-001",
"message": "Crisis triage queued for processing"
}| Code | Reason |
|---|---|
| 401 | Missing or invalid Authorization header |
| 400 | Invalid request body |
| 422 | Missing required fields |
Copy-paste this into your SpeakSpace Action settings:
| Field | Value |
|---|---|
| Title | Crisis Commander |
| Description | Transforms chaotic emergency voice notes into instant Asana tasks, Slack alerts, and client emails. |
| API URL | https://your-deployment-url.com/api/triage |
| Method | POST |
| Authorization Type | Bearer Token |
| Authorization Value | your-secret-token-here |
You are an emergency response AI. Analyze this crisis voice note and output STRICT JSON with:
1. `urgency` as one of `CRITICAL`, `HIGH`, `MEDIUM`.
2. `actions`: list of objects { "person": string, "task": string, "deadline": string|null }.
3. `stakeholders`: list of people/entities to notify.
4. `escalation`: boolean indicating whether this should be escalated to leadership.
Now analyze: $PROMPT
Try these voice note examples:
| Scenario | Text |
|---|---|
| Server Outage | "API DOWN! John restart server! Sarah call Acme! Mike status page NOW!" |
| Client Escalation | "Client X furious about delayed delivery! Call them ASAP and offer 20% credit." |
| Security Breach | "System breach detected! Lock down network! Notify cybersecurity team immediately!" |
crisis-commander/
├── app/
│ ├── main.py # FastAPI entry point
│ ├── config.py # Environment configuration
│ ├── auth.py # Bearer token authentication
│ ├── schemas.py # Pydantic models
│ └── api/triage.py # POST /api/triage endpoint
├── services/
│ ├── llm_service.py # Gemini AI parsing
│ ├── asana_service.py # Asana task creation
│ ├── slack_service.py # Slack alerts
│ └── email_service.py # SendGrid emails
├── workers/
│ └── tasks.py # Background processing
├── requirements.txt
├── .env.example
└── README.md
SpeakSpace Annual Hackathon 2025 | Sponsored by Alpha AI
MIT License