|
| 1 | +# Demo environment profiles |
| 2 | + |
| 3 | +Summary of **environment variables** for running the Live HackRF + LLM demo suite. For full WSL/HackRF setup and Option C env, see [scripts/demo/demo-hackrf-full.md](../scripts/demo/demo-hackrf-full.md). |
| 4 | + |
| 5 | +**Live demos use real hardware and real LLM:** HackRF RX/TX and LLM providers are not stubbed in the documented demo flows. Set the env below and attach a HackRF; use `--require-hardware` in the relevant demo scripts to fail fast if SDR TX is not configured. |
| 6 | + |
| 7 | +## Agent and API hooks (how demos drive the system) |
| 8 | + |
| 9 | +- **radio_tx (RadioTransmissionAgent):** Invoked via `POST /radio/send-audio` (multipart WAV) and `POST /radio/send-tts` (JSON body with `message`, optional `frequency_hz`, `mode`). Requires `radio.sdr_tx_enabled=true` and `radio.sdr_tx_backend=hackrf` for HackRF; when not set or no hardware, the TX agent may still run and return success/false (e.g. "Rig manager not configured"). Compliance checks run before TX. |
| 10 | +- **radio_rx_audio (RadioAudioReceptionAgent):** No one-off "start monitor" HTTP endpoint. The **voice listener** (server lifespan) starts the agent when `radio.audio_input_enabled` and `radio.voice_listener_enabled` (or `audio_monitoring_enabled`) are true. Demos that need voice RX either run HQ with that config and poll `GET /api/v1/audio/pending` and `GET /transcripts`, or use `POST /messages/from-audio` to simulate inbound voice. |
| 11 | +- **radio_rx (RadioReceptionAgent):** Used by the band listener (injection queue consumer) or by tasks submitted via the orchestrator. Demos inject via `POST /inject/message` or `POST /messages/inject-and-store`; the band listener (when enabled) or a process-driven task consumes from the queue. |
| 12 | +- **Orchestrator / Judge:** `POST /messages/process` (body: `message` or `text`, optional `channel`, `chat_id`, `sender_id`) runs the REACT loop and routes to agents. Used by run_orchestrator_judge_demo and run_scheduler_demo. |
| 13 | +- **WhitelistAgent:** Invoked via `POST /messages/whitelist-request` (JSON or multipart with audio). Orchestrator evaluates and may call the whitelist agent; result in response or completed_tasks. |
| 14 | +- **SchedulerAgent:** No direct HTTP endpoint; reached when the orchestrator selects it for a scheduling request (e.g. "Schedule a call for X with Y at Z"). Requires DB with coordination_events for persistence. |
| 15 | + |
| 16 | +## HQ process (`uv run radioshaq run-api`) |
| 17 | + |
| 18 | +- **Mode + JWT:** `RADIOSHAQ_MODE=hq`, `RADIOSHAQ_JWT__SECRET_KEY` (must match receiver `JWT_SECRET`). |
| 19 | +- **Receiver uploads:** `RADIOSHAQ_RADIO__RECEIVER_UPLOAD_STORE=true`, `RADIOSHAQ_RADIO__RECEIVER_UPLOAD_INJECT=true`. |
| 20 | +- **HackRF SDR TX:** `RADIOSHAQ_RADIO__SDR_TX_ENABLED=true`, `RADIOSHAQ_RADIO__SDR_TX_BACKEND=hackrf`. |
| 21 | +- **Message bus consumer:** `RADIOSHAQ_BUS_CONSUMER_ENABLED=1`. |
| 22 | +- **LLM:** e.g. `RADIOSHAQ_LLM__PROVIDER=mistral`, `MISTRAL_API_KEY` / `RADIOSHAQ_LLM__MISTRAL_API_KEY`. |
| 23 | +- **ASR/TTS:** e.g. `ELEVENLABS_API_KEY`, `RADIOSHAQ_TTS__PROVIDER=elevenlabs`. |
| 24 | +- **Voice listener (for voice_rx_audio demos):** `RADIOSHAQ_RADIO__AUDIO_INPUT_ENABLED=true`, `RADIOSHAQ_RADIO__VOICE_LISTENER_ENABLED=true`, `RADIOSHAQ_RADIO__DEFAULT_BAND=2m`. |
| 25 | +- **Twilio:** Omit or leave unset for no-Twilio demos; set for Option C with SMS/WhatsApp. |
| 26 | + |
| 27 | +## Remote receiver process (`uv run radioshaq run-receiver`) |
| 28 | + |
| 29 | +- **JWT:** `JWT_SECRET` = same as HQ `RADIOSHAQ_JWT__SECRET_KEY`. |
| 30 | +- **Identity:** `STATION_ID=HACKRF-DEMO`. |
| 31 | +- **HackRF:** `SDR_TYPE=hackrf`, `HACKRF_INDEX=0`. |
| 32 | +- **HQ upload:** `HQ_URL=http://localhost:8000`, `HQ_TOKEN=<from POST /auth/token>`. |
| 33 | +- **Demod:** `RECEIVER_MODE=nfm`, `RECEIVER_AUDIO_RATE=48000`. |
| 34 | + |
| 35 | +## Demo scripts |
| 36 | + |
| 37 | +- **Base URL:** Pass `--base-url http://localhost:8000` (or remote). Scripts obtain a JWT via `POST /auth/token` (subject/role/station_id). |
| 38 | +- **Extras:** `uv sync --extra hackrf` (receiver + stream), `uv sync --extra voice_tx` (HackRF TX from HQ), `uv sync --extra audio` (ASR) as needed. |
| 39 | + |
| 40 | +## Database |
| 41 | + |
| 42 | +- **Postgres:** `RADIOSHAQ_DATABASE__POSTGRES_URL` or default (e.g. Docker on 5434). Run `uv run radioshaq launch docker` then `cd radioshaq && uv run alembic upgrade head` before demos that use transcripts or registry. |
0 commit comments