Case study
Multi-agent PR intake & routing gatekeeper
Classification, routing, and compliance for public-sector communications intake
Production multi-agent system that ingests inbound communications requests, classifies and validates them against policy, and routes each to the right downstream workflow — behind a strict state machine and data-residency guarantees.
Problem
Inbound public-sector communications requests arrived unstructured and high-volume, with no consistent triage. Routing was manual, inconsistent, and hard to audit. Arabic and English requests needed identical guarantees, and compliance required all processing to stay inside an approved data-residency boundary.
My responsibility
Architected and built the AI backend end-to-end on an enterprise agent framework — the agent orbit, the domain models, the status state machine, and the test suite. Designed the system so the LLM is bounded by typed contracts and explicit states, not trusted to free-run.
Key decisions
- Model the entire intake lifecycle as an explicit multi-state status machine, so every request has a known, auditable position and no agent can skip a required step.
- Run a fixed orbit of specialized agents behind duck-typed Protocols, so each agent is swappable and independently testable.
- Parse every LLM output into Pydantic v2 models and reconcile against a registry — reject or repair anything that fails validation rather than passing raw model text downstream.
- Pin the Azure client to explicit endpoint, api_version, api_key, and model so all inference stays inside the approved data-residency boundary — no implicit defaults.
Architecture
- Deterministic / validated
- LLM / generative (bounded)
- Orchestration / boundary
- Neutral component
Stack
- Python 3.12
- FastAPI
- Microsoft Agent Framework
- Azure OpenAI
- Pydantic v2
- pytest
Outcome
- · A multi-agent intake orbit shipped with an explicit multi-state status machine and a comprehensive end-to-end test suite.
- · Deterministic, auditable routing — every request lands in a known state with a typed decision.
- · Bilingual (Arabic / English) intake behind the same contracts and guarantees.
Known limitations
- · Sanitized details only — client policy logic and routing taxonomy are not public.
- · The orbit is tuned to a specific intake taxonomy; new request types require schema and test updates.
- · Classification quality is bounded by labeled examples; edge-case intents still benefit from human review.
- · Client details and specific figures are sanitized and available under NDA during a technical interview.
Sanitized details available during technical interview.