cleandataengineering.aiDrug-Safety Agent on Databricks, drawn simply
You are here: Architecture › The suite behind it

Drug-Safety Agent on Databricks · Architecture · The suite behind it

How the specification, the harness and the gates fit

The agent is not built alone. A written specification states what must hold. A shared library enforces what it can. A simulated world lets scenarios try to break the rest, and four gates say pass or fail. A failure points back at the layer that should change.

The specificationsays what mustbe true (AOAS)The harness libraryenforces what it can:loop, limits, contractsThis agentrules, tools,checks (Z)Open: A simulated worldA simulated worldAgentTwin: data, amodel twin, scenarioszoom in ›Open: Four gatesFour gatesbehaviour, features,structure, harnesszoom in ›A verdictpass or fail,and where to fix it
Read left to right along the top, then right to left along the bottom. The dashed arrow is the fix going back to the specification.

The specification (an Application Operation Agent Spec) is a 396-line file in the clean-ai-engineering repository. It lists the operations, the state machine for a draft, the refusals and the required properties such as "every number equals a tool result". It is still a draft: it carries assumptions the owner has not confirmed.

A finding goes upstream. When we built this agent we found two things the specification did not say (who owns the assessment store, and that every row needs a key). Those were written back into the specification, not worked around in code.