TrustFlow — agents negotiate, code enforces
- Problem
- European enterprises are stuck between banning AI tools and uncontrolled GDPR / EU-AI-Act exposure. In Germany a works council can turn weeks of approval into months.
- Solution
- Agents negotiate; a compiler — pure code, same input, same policy — signs; humans activate; a gateway enforces. No model anywhere in the enforcement path.
- Result
- Hackathon demo, deployed live on Alibaba Cloud. I originated the concept and co-built it with a software engineer, both of us directing AI agents.
Every new AI use case in a European enterprise needs sign-off from compliance, IT, procurement, and worker representatives.
TrustFlow turns that negotiation into software. Built for the Qwen Cloud Global AI Hackathon (Track 3, Agent Society): I owned the product, design and evidence side, and my teammate led the engine implementation.
Agents can propose; only deterministic code can decide. Where that line falls:
- The agents emit structured proposals, never executable rules.
- No LLM sits in the enforcement path. PII scanning, model routing and audit logging are pure code.
- Humans activate. Nothing enforces until the data-protection officer (DPO) and IT sign the compiled policy.
- A rejection gets an explainable appeal path instead of a dead end.
Negotiate, compile, sign, enforce
The pipeline has one hard hand-off in the middle: creative negotiation above it, hard guarantees below it.
View full size- 01
Agent boardroom
Qwen-powered specialists debate the request in structured rounds — proposals only.
- 02
Deterministic compiler
Pure code merges demands, floor-checks them against the org's red lines, validates the schema, hashes and signs.
- 03
Human sign-off
DPO and IT sign to activate the compiled policy.
- 04
Edge gateway
PII scanning, model routing and audit logging on every inference.
Five specialists, structured disagreement
The demo models a German fintech's approval lanes with five agents, each with a real mandate: a workflow runner advocating the business case, corporate compliance holding GDPR and EU-AI-Act red lines, IT owning routing and data residency, procurement gating on vendor contracts, and a works-council liaison tracking the worker-representation agreement.
They debate in structured rounds (opening, lane statements, rebuttals, finals; up to 15 turns), reacting to the shared transcript rather than answering isolated prompts. Every turn returns a schema-validated envelope: stance, demands, concessions. Disagreement resolves into one of three deterministic outcomes: approved, denied, or pending an external gate.
The glass-box view makes the whole thing inspectable for judges: the debate transcript, the pipeline strip, and a live gateway panel where you can send a prompt through the compiled policy and watch an email get masked or an IBAN get blocked.
View full sizeMeasured against a single agent
Why five agents instead of one well-prompted 'AI governance advisor'? Same request packet, same qwen-max model: a tool request with the vendor's data-processing agreement still unsigned.
The single agent conditionally approved, with audit controls only, and never mentioned the unsigned contract. The specialist boardroom caught it in round one: procurement vetoed, the debate explored workarounds, and the compiled outcome stayed DENIED. The comparison is committed to the repo and reproducible with one command.
View full sizeThe product around the agents
Governance software fails when only lawyers can read it. The employee portal gives a plain answer: what's approved, what's blocked, and exactly which gate is missing. A compliance-readiness meter shows the signed gates (vendor contract, works-council agreement, compiled policy hash) and what's still pending; the full boardroom trace is one tab away.
An employee can appeal a denial, which re-opens the boardroom with an advocate agent arguing their case.
View full sizeWhere it stands
A hackathon build, not a product. The test suite asserts five demo scenarios: happy path, works-council gate, high-risk denial, sovereign routing, vendor-contract veto. Replay mode runs the full pipeline on recorded live transcripts, so judges could see everything without an API key.