# Astraea โš–๏ธ A constellation of **Washington State family-law specialist agents**, backed by a local Ollama semantic-RAG pipeline. Eight specialists, each grounded in its own cited corpus of Washington law (RCW), answer questions with inline citations โ€” never from thin air. > For educational purposes only โ€” not legal advice. ## The eight specialists | Agent | Domain | Primary source | |---|---|---| | ๐Ÿงญ Navigator | Court process, residency, intake, routing | RCW 26.09 (overview) | | โš–๏ธ Divorce & Dissolution | No-fault dissolution, legal separation, the 90-day wait | RCW 26.09 | | ๐Ÿง’ Child Custody & Parenting | Parenting plans, best-interest factors, relocation | RCW 26.09 / 26.10 | | ๐Ÿ’ต Child Support | Income-shares model, the economic table | RCW 26.19 | | ๐Ÿ•Š๏ธ Spousal Maintenance | Maintenance factors & duration | RCW 26.09.090 | | ๐Ÿ  Property & Debt | Community vs. separate property, division | RCW 26.16 / 26.09.080 | | ๐Ÿ›ก๏ธ Protection Orders | DV, anti-harassment, ERPO | RCW 7.105 | | ๐Ÿค Mediation & ADR | Mandatory mediation, settlement, collaborative law | RCW 26.09.015 | ## Architecture ``` Flask (gunicorn + nginx) Ollama host (nightmare, RTX 4080 SUPER) app.py โ”€โ”€ /api/chat โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ granite4.2 (RAG answer, think:false, num_ctx<=16K) rag.py โ”€โ”€ embed + retrieve โ”€โ”€โ”€โ–บ nomic-embed-text-v2-moe (semantic embeddings) agents.py (8 specialist defs) books/*.md (8 cited WA-law corpora, chunked -> embedded -> index.json) ``` The RAG engine chunks each book on heading + sentence boundaries, embeds every chunk with `nomic-embed-text-v2-moe`, and retrieves the top-5 by cosine similarity. The answer model (`granite4.2`) is an instruction-follower that answers strictly from the retrieved context and says so when the answer isn't in the corpus. ## Deploy (Proxmox LXC) ```bash # On CT 150 "astraea" (10.30.20.160) /opt/astraea/venv/bin/gunicorn --workers 2 --threads 4 --bind 0.0.0.0:5000 --timeout 240 app:app # systemd: astraea.service ยท nginx: /etc/nginx/sites-enabled/astraea (80 -> 5000) ``` Redeploy: `tar czf /tmp/a.tar.gz app.py rag.py agents.py templates/ && scp โ†’ proxmox โ†’ pct push 150 โ†’ extract โ†’ systemctl restart astraea`. Reindex (after editing a book): `curl -X POST http://:5000/api/reindex` (or restart the service). The vector index is cached at `/opt/astraea/index.json` and rebuilt only when a book changes. ## API - `GET /api/agents` โ€” list specialists - `POST /api/chat` โ€” `{agent_id, message, history?}` โ†’ `{answer, citations, grounded, latency_ms}` - `GET /api/health` โ€” agent count + index status - `POST /api/reindex` โ€” rebuild the vector index ## Public https://astraea.thetempleofdoom.com (Cloudflare fleet tunnel `1aeb1ac0` โ†’ 10.30.20.160:80)