@rshah88/antibody
flwr new @rshah88/antibodyAntibody: an immune system for buildings
Antibody is a swarm of 11 specialist agents and one coordinator. Each specialist watches one way a building fails; the coordinator ranks every problem, looks up the governing safety standard with web_search, and writes an alert that says what is wrong, who to call, the fix and the deadline.
| Agent | Watches | Agent | Watches |
|---|---|---|---|
| PWR | UPS battery bank | HVAC | Rooftop chiller |
| ELEC | Main switchgear | H2O | Pipe leaks |
| WIRE | Wall wiring | ENV | Facade |
| FIRE | Sprinkler riser | AIR | Air quality |
| STR | Structural column | CYBER | Building control system (BMS) |
| LIFT | Elevator |
Demo data. Sensor readings are simulated for a demo tower modelled on Stanford's Hoover Tower (agent/building_data.py). The agents' reasoning, ranking, web searches and alerts are real.
Try it in Flower chat
Select Antibody in the agent picker and send:
Check the building.
About two to three minutes later you get the building health out of 100, all 11 areas ranked, and the top three alerts with cited standards (for example NFPA 855 for battery rooms, NIST SP 800-82 for building-control security).
Follow-ups use the same run series, so Antibody reports the trend:
The leak got worse. {"H2O": {"night_flow_lpm_building_empty": 14}}
Patch the BMS. {"CYBER": {"default_admin_password": false, "open_ports_to_internet": [], "failed_logins_24h": 0}}
Check the building, then keep watching it: scan every 10 minutes for the next 24 hours.
Pasting JSON overrides any reading for that scan. The last prompt schedules recurring scans with start_automation.
How a scan works
- Sense. The 11 specialists assess their own system in parallel and each return a JSON report: risk 0–1, confidence, finding, evidence, time to failure, fix.
- Rank. Plain code scores risk × consequence × urgency and computes building health, so the ranking is auditable.
- Investigate. The coordinator runs up to three web_search calls in parallel for the top problems. If you bind Slack, Notion or GitHub to the run, it also searches them for tenant reports, open work orders or BMS configuration. Unbound account connectors are never offered.
- Alert. The alert streams back with its sources.
- Remember. Health history and the last exchange are kept in run-series state (context.state).
Flower features used
| Feature | Use |
|---|---|
| AgentApp, parallel specialist calls on the Flower Runtime model | The swarm |
| web_search connector | Cites the governing standard for each top problem |
| slack, notion, github connectors (when bound) | Human evidence and open work orders |
| start_automation | Round-the-clock watch on request |
| Run-series state | Health trend and follow-up memory |
| Structured run events (antibody.*) | Drive a live web console: 3D building, agent cards, health gauge, sources |
Files
| File | What it holds |
|---|---|
| agent/agent_app.py | The scan flow: sense, rank, investigate, alert, remember |
| agent/specialists.py | One job description and consequence weight per agent. Add an entry to add a building system |
| agent/building_data.py | The demo building and its simulated sensor snapshot |
Run from source
uv sync uv run flwr build uv run flwr login supergrid uv run flwr chat # then: /load . and Check the building.
To run fully on premises with a local model, start a local SuperLink with FLWR_MODEL_API_ENDPOINT pointing at an Open Responses endpoint (for example Ollama) and set ANTIBODY_MODEL to that model's name.