Skip to content
focoit.com
04Canvas

Diagrams that explain a system better than a paragraph.

Architecture, sequence and state diagrams from my own designs and from the writing.

An agentic Q&A assistant, end to end WORKFLOW · CODE-DEFINED GRAPH · CHECKPOINTED PII screen Prompt Shield Cache lookup SHA-256 key Retrieve claims-scoped Draft persona: site Content filter + safety verdict Review port human in the loop Deliver / Refuse MISS HIT Site user asks a question Model router Azure OpenAI · PHI Claude · non-PHI Reviewer UI accept · edit · reject REQUEST / RESPONSE KNOWLEDGE LAYER · AZURE AI SEARCH Query planning (LLM) effort: minimal · low · medium Parallel subqueries + semantic rerank Study A source Study B source Synthesis + references + activity log GROUNDING Other enterprise agents MCP ENDPOINT Checkpoint store pending requests persisted Audit App Insights + compliance store EVERY STEP LEGEND Safety gate Human review step Store Audit
01

An agentic Q&A assistant, end to end

A code-defined workflow with safety gates, a cache, claims-scoped retrieval, a human review step, model routing, checkpoints and audit.

Architecture
One question, from screen to audit trail Site user Workflow code-defined graph Knowledge layer Model router Reviewer Audit 1 question + study + persona 2 PII screen → Prompt Shield 3 gates passed 4 cache lookup (SHA-256 key) CACHE HIT 5 reviewed answer · 0 LLM calls 6 retrieve (claims-scoped) 7 plan → subqueries → rerank 8 grounding + references 9 draft (Azure OpenAI · PHI path) 10 cited draft 11 content filter → safety verdict 12 review request (event) The workflow idles. A checkpoint keeps the pending request: it survives a restart or a deploy. 13 accept · edit · reject · escalate 14 full trail: question, spans, draft, verdict, action 15 deliver or refuse CACHE MISS LEGEND Call Return / audit Human review
02

One question, from screen to audit trail

What happens to one question: gates, cache, retrieval, draft, verdict, review, delivery, and what is written to audit on the way.

Sequence
Orchestration and agentic retrieval CONSUMERS Callers site users · other agents agents come in through a governed MCP tool Workflow graph code-defined order · checkpointed … → Draft → Verdict → Review → Deliver SHARED SERVICES Determinism cache reviewed answers only a hit costs no model call Model router Azure OpenAI: PHI (BAA) Claude: non-PHI reasoning pinned version → cache key Audit App Insights + compliance store every step · activity log token counts AGENTIC RETRIEVAL · KNOWLEDGE LAYER Query planning LLM decomposes the question into subqueries effort: min · low · med Parallel subqueries keyword · vector · hybrid + semantic rerank Synthesis merged grounding + citations + activity log Per-study sources one index per study REQUEST CACHE LOOKUP RETRIEVE (MISS) GROUNDING + REFERENCES MODEL PER STEP LEGEND Request path Audit Orchestrator Service Store / cache
03

Orchestration and agentic retrieval

A workflow graph that drives a knowledge layer: query planning, parallel subqueries over per-study sources, and synthesis with references.

Architecture
The durable reviewer pause Workflow executor graph Review request port typed request / response Reviewer UI separate process Checkpoint store durable 1 draft · citations · verdict · versions 2 request event → pause 3 checkpoint at superstep: pending request persisted workflow paused: steady state while a person reviews PROCESS RESTART OR DEPLOY, MID-REVIEW · without a checkpoint the run is lost 4 restore: executor state + pending requests 5 request event emitted again 6 response · edited text · identity idempotent by request id action: accept · edit · reject · escalate → safety reviewer port 7 response routed to the executor Deliver | Refuse: never unreviewed LEGEND Call Return / restore / persist Event (async, one-way) Request port
04

The durable reviewer pause

A reviewer step that survives a restart: the pending request is checkpointed and handed back to the reviewer when the workflow is restored.

Sequence
Security, tenancy and responsible-AI enforcement UNTRUSTED INGRESS COMPLIANCE BOUNDARY · GA SURFACES ONLY PRIVATE INFRASTRUCTURE · RBAC Authenticated caller site user · MCP agent Entra ID Preview / remote source outside the boundary Ordered safety gates PII → Shield → filter → verdict the order is the graph's topology, not a convention Draft → verdict → deliver least-privilege identity read and retrieve only Claims-based filter server-side built from claims, never from user text Per-study sources 1 index / study Retrieved-span shield screens spans for indirect injection, before the draft Checkpoint store a trust boundary: encrypted, no untrusted load Audit + compliance store App Insights · immutable activity log + tokens REQUEST SCREENED QUESTION CLAIMS-SCOPED SCREENED SPANS PERSIST EVERY STEP SCOPE FROM TYPED TEXT PREVIEW SOURCE: BLOCKED LEGEND Permitted route Blocked at the boundary Audit / persist Safety gate Enforcement point Private store
05

Security, tenancy and responsible-AI enforcement

Where each defence sits, which route is permitted, and which ingress stops at the boundary.

Security
Phased-autonomy rollout It ratchets one way: forward only on sustained evidence, back only by kill-switch. SAFE DEFAULT Phase 1 · Mandatory review every answer goes to a reviewer before delivery AUTONOMY BEGINS Phase 2 · Selective autonomy low-risk answers auto-deliver (sampled) high-risk answers are still reviewed PHASE 3 CANDIDATE Phase 3 · Expanded scope cross-study pharmacovigilance separate role · audit · queue START groundedness + citations sustained, accept rate stable per-category evals sustained; new role + audit model approved KILL-SWITCH KILL-SWITCH One state machine per answer category. The kill-switch is configuration: it returns any advanced phase to mandatory review. LEGEND Advance: evidence-gated, one way Kill-switch: configuration, per category Safe default Future candidate
06

Phased-autonomy rollout

Autonomy advances one way, per answer category, only on sustained evidence, with a switch that returns any phase to mandatory review.

State machine
LLM, agent and MCP
07

LLM, agent and MCP

How a question travels: an agent holds the model and reaches your systems through MCP.

Architecture
Enterprise chat on Azure
08

Enterprise chat on Azure

A private chat front end on Azure: gateway, private network, agent, search and model.

Architecture
The four-seat loop
09

The four-seat loop

Plan, execute, review and gate, with the reviewers kept independent of the executor.

Process
The gate
10

The gate

What the repository gate checks before a commit, and what blocks.

Process