Deal ex Machina · Product
01 — Why
Every regulated decision has to be defensible. Most AI systems can't defend theirs.
Approving an acquisition, validating a regulatory capital position, running an AML investigation — each involves many experts, many documents, information that contradicts itself, and a conclusion someone must be able to defend.
Two common answers both fail. A single generalist agent reads everything and hands back one number no reviewer can unpick. Let agents coordinate without governance and it degrades into chaos — documented at scale, and for a regulated enterprise a show-stopper.
Scaling AI in the enterprise demands the opposite: a shared, governed context that agents can write to — not just retrieve from. Three structural problems sit underneath.
Problem I
No audit trail
You can't tell which part of the reasoning produced which conclusion, which source was decisive, or why a contradiction was resolved one way and not the other.
Problem II
No separation of duties
The agent that extracts the facts is the one that assesses the risk, is the one that approves the decision. In regulated sectors that absence of "four eyes" is a problem by construction.
Problem III
A strong score hides a weak one
High confidence on evidence can carry an overall-good answer through — even with an unverified sanctions hit — once every score is folded into one weighted number.
And today's frameworks don't close the gap
DAG coordination
LangGraph, CrewAI, Mastra, AutoGen hardcode coordination into topology. Every new rule, exception, or agent means rewiring the graph — and when one agent stalls, the whole downstream pipeline stalls with it.
Prompt-chaining & role-play
ChatDev, MetaGPT lean on LLM self-regulation. No proof the system converges, no record of why a decision was made, and no mechanism to catch contradictory evidence being silently absorbed.
So we built a governed coordination layer — an architectural answer to all three.
02 — How it works
Agents propose. Governance decides. State stays auditable.
Coordination emerges from shared state and declarative policy — not a hardwired call chain. No agent knows any other agent exists.
Read context
Agents read shared context from documents, events, and prior decisions.
Propose updates
Facts, contradictions, risk changes — proposed, never written to state directly.
Gate on policy
Governance reviews each proposal against policy, approval mode, and convergence conditions.
Commit auditably
Approved updates become auditable state in a bitemporal causal graph.
Certify finality
Finality is certified, not terminal — new evidence can reopen the scope and continue safely.
Reasoning roles
Agents
Facts · Drift · Resolver · Planner · Status · Governance. Each owns its own scope.
→
Shared, bitemporal
State
Causal semantic graph + WAL. Coordination lives here — not in prompts.
→
Deterministic kernel
Governance
Checks every transition against policy & lattice. Zero LLM tokens. Always available.
→
Signed, chained
Finality certificates
Attest the process ran in full — and chain over time as new evidence arrives.
↺ what never flows between agents: reasoning, prompts, or source documents — only numeric signals
Finality is a vector, not an average.
Every cycle scores four independent dimensions. The decision closes only when each one clears its own threshold — a strong score on one can never compensate for a weak score on another.
CCEvidence quality
Do active claims rest on reliable, recent, sufficient sources?
CRInternal consistency
Are there unresolved contradictions between the pieces in play?
GCGoal progress
Are the completeness criteria set at the start actually met?
RIResidual risk, inverted
At this stage, is risk exposure within acceptable limits?
If a dimension fails its threshold but the case is in the human-review band, the system hands off to an operator with a structured file: which dimension is blocking, why, and which agent holds the position. Not a degraded mode — a designed, traceable handoff.
You choose who owns each decision.
Every contribution runs under an explicit governance mode. The level can only tighten, never loosen on its own — a scope that detects critical drift drops to a harder mode and stays there.
YOLO
PERMISSIVEThe agent decides freely within its policy rules; the deterministic kernel decides alone unless oversight escalates to a human. For routine, low-stakes extraction.
MITL
HUMAN IN THE LOOPEvery proposal goes to the human queue and the process suspends until an operator explicitly approves or rejects. For significant-stakes steps.
MASTER
STRICTLY DETERMINISTICNo LLM, no human, no queue. The proposal respects every rule and is accepted, or it is rejected on the spot. A hard gate, not an escalation path.
03 — Introducing
SGRS
Swarm of Governed Agents — the governed coordination layer, productized for regulated operations.
Formal convergence, bitemporal auditability, and policy-bound decisions in one self-hostable stack. No miracles. No detours.
Contradiction as a signal
Contradictions are explicit graph edges that can block closure until resolved — never silently averaged away.
Bitemporal state model
Two clocks on every claim — valid time and transaction time. Reconstruct any decision exactly as it was made.
Separation of duties
Specialized agents with contexts partitioned by construction — the four-eyes principle, structural not procedural.
Formal convergence gates
Diffusion converges at a rate set by the graph — you know in advance how many cycles reach stability.
Same engine, any scale
A single file and a whole portfolio run the identical engine — compose scopes up, drill back down to the source claim.
Framework-compatible
Run standalone or alongside LangGraph / CrewAI / Mastra stacks where governance depth is missing.
A scope never runs forever, or stops arbitrarily.
Four terminal states, each with defined semantics and recovery paths.
RESOLVED
All conditions met, no blockers.
Recovery: none needed.
ESCALATED
Risk or contradiction thresholds exceeded.
Recovery: human review before re-opening.
BLOCKED
Progress stopped with open issues.
Recovery: new context, resolution, or escalation.
EXPIRED
Inactive for 30 days.
Recovery: archived; reopen with new context.
Proven across:M&A due diligenceSolvency II · ORSAAML / KYCCorporate creditLegal discovery
04 — The stack
Open core. Your infrastructure. Real SDKs.
The orchestration kernel and the full docker compose stack are open-access. Self-host in minutes, then talk to it from Python or TypeScript.
DealExMachina/open-governed-swarm-of-agentsAGPL-3.0 · self-host# clone, configure, and bring up the whole stack
git clone https://github.com/DealExMachina/open-governed-swarm-of-agents
cd open-governed-swarm-of-agents
cp .env.example .env
docker compose up -d # postgres · nats · s3 · workers
pnpm install && pnpm run swarm # agents + governance + kernel
The engine
A NATS JetStream event bus, a deterministic Rust reduction kernel, and a shared bitemporal store. Agents never call each other — they publish and consume.
Reasoning agents · durable pull consumers
factsdriftresolverplannerstatusgovernance
↑↓ publish proposals · consume jobs
NATS JetStreamstream · SWARM_JOBS · file storage · explicit ack
swarm.jobs.>swarm.proposals.>swarm.actions.>swarm.events.>swarm.finality.>
↓ every transition reduced deterministically
sgrs-coreRust reduction kernel · NAPI native
Product lattice M = L × A · convergence V(t) · ISS small-gain check · content-addressed hashing. Zero LLM tokens, always available.
↓ approved state committed, append-only
Shared bitemporal state
Postgres WAL · context_eventspgvector · semantic graphS3 · object store
Client libraries
Permissively-licensed (MIT) kernel clients for the control-plane API — embed them in proprietary or open stacks that talk to your own swarm.
TypeScript@sgrs/kernel-client
$ npm install @sgrs/kernel-client
import { createKernelClient } from "@sgrs/kernel-client";
const client = createKernelClient({
baseUrl: "https://cp.example.com",
apiKey: process.env.SWARM_API_KEY!,
});
await client.runtimeStart("scope-id");
Pythonsgrs-kernel-client
$ pip install sgrs-kernel-client
from sgrs_client import KernelClient
with KernelClient(url, api_key) as client:
client.runtime_start("scope-id")
client.subscribe_events("scope-id", print)
Richer product SDKs — @sgrs/client-ts and sgrs-client — plus the browser Studio and multi-tenant REST API live in the companion DealExMachina/sgrs repo.
05 — Foundations
Grounded in current research, with a formal backbone.
The reliability properties aren't hoped for — they're proven. Convergence, non-compensability, and contradiction handling each rest on an established mathematical structure, and the system ships as the open-access companion to a research publication.
Product lattice · M = L × A
Order theory governs every transition
Governance level and convergence rank form a product lattice with explicit meet and join. The rule "governance can only tighten" is an algebraic constraint checked at each step — not a policy suggestion.
Lyapunov convergence · V(t)
Provable, measurable convergence
A disagreement function decreases monotonically toward finality, with plateau detection and divergence escalation. You know in advance how many cycles reach stability.
Sheaf diffusion · ISS stability
Beliefs propagate along a role topology
Evidence diffuses only across shared dimensions, stabilized by an input-to-state-stable cascade. Contexts stay partitioned by construction, not by discipline.
Belnap bilattice · four states
Contradiction ≠ ignorance
Two independent channels — support and refutation — separate a genuine conflict from a simple absence of evidence. Key properties are being machine-checked in Lean.
∑
Read the math tutorial
Lattice-State Graph — a beginner's walkthrough
The four structures behind the engine, the ordering rules, and the convergence guarantees — from first principles.
→
Get started
Bring governed coordination to your regulated decisions.
Self-host the open-access core with docker compose, or talk to us about production deployment, advisory, and the extended kernel.