Test your own gate
A gate is the safety control that decides which actions an agent may take. Put yours on the same simulated incidents as a built-in control, and the report shows which harmful actions got through, which useful ones were blocked, and how often a person was asked.
Start here: five minutes
The shortest way in is a command that reads one JSON request and writes one JSON answer. After setup, from the repository root:
mkdir -p my-gate && cp -r examples/command-gate examples/mandate-verifier my-gate/
export ADC_GATE_COMMAND="python my-gate/command-gate/adapter.py" ADC_GATE_NAME=my_system
uv run agentic-datacenter gate check command_gate
uv run agentic-datacenter bench run --scenario OP-03 --tier quick --jobs 4 \
--gate command_gate --gate static_allowlist --out build/first-gate
Open build/first-gate/report.html. gate check says whether your gate answers correctly formed requests; the run shows what its decisions did in one simulated chiller trip, beside a built-in control.
Then replace decide() in my-gate/command-gate/adapter.py with a call into your system, and run the same two commands again. The copy is yours, under your own licence.
Starters
All under the MIT licence in examples/. Copy the whole folder: a starter loads files that sit beside it.
| Your system | Copy | ADC_GATE_COMMAND |
|---|---|---|
| Python | command-gate/ and mandate-verifier/ |
python my-gate/command-gate/adapter.py |
| TypeScript or JavaScript | command-gate-node/ |
node my-gate-node/adapter.mjs |
| Go | command-gate-go/ |
see its README |
| Rust | command-gate-rust/ |
see its README |
| A policy engine that decides on tool calls | tool-call-gate/ |
see its README |
| A long-lived service in any language | http-gate/ |
use http_gate and ADC_GATE_URL instead (details) |
| A Python package | python-gate/ |
loaded by name (below) |
examples/fixtures/ holds requests to try your gate with, each with the answer it should give: uv run python my-gate/command-gate/adapter.py < examples/fixtures/sound-step.json.
What your gate is given, and what it answers
For each step the agent proposes, Agentic-Datacenter establishes the facts itself, from the plant, and asks your gate:
| Your gate is given | What it is |
|---|---|
proposal |
The action the agent proposes (an intent contract from contracts/), its arguments, and the agent's stated reason. The reason is never evidence. |
premises |
Read from the plant, not from the agent: the simulated time, the exact writes the action would make, what limits it breaks, and each condition the contract needs, true, false or unknown. |
actor |
Who is proposing, as established by its credential. |
It answers with one verdict:
| Verdict | Meaning |
|---|---|
ALLOW |
Execute exactly these writes, once. |
DENY |
Do not execute. |
VERIFY |
A person must approve first; say how many. Optional. |
ABSTAIN |
The evidence is missing or stale; nothing is executed. Optional, scored as DENY. |
Only ALLOW and DENY are required. Your own words work too (permit, block, escalate and others): each is read as the verdict it means.
Three rules keep results comparable:
- Decide on simulated time (
premises.time_ms), never the wall clock, and give the same answer to the same input. - Keep nothing between runs. Each run gets a fresh gate. A service that keeps state sets
ADC_GATE_STATEFUL=1and keys what it keeps by the request'ssession. - Leave execution to Agentic-Datacenter. Your gate decides; the simulator writes.
A Python package
Copy examples/python-gate, rename it, and put your system behind evaluate. It is found through an entry point:
[project.entry-points."agentic_datacenter.gates"]
my_gate = "my_gate:create"
uv pip install -e ../my-gate
uv run agentic-datacenter gate check my_gate
Next steps
- The whole benchmark:
uv run agentic-datacenter bench run --tier quick --gate command_gate --gate static_allowlist --jobs 4 --out build/quick, thenbench check build/quick/result_card.json --gate command_gate. The tiers are in Tiers. - A result to report: register your gate with the "Gate registration" issue form and copy the participant workflow into your repository. Each month's result is then read from your own run, with nothing to send: the workflow runs it as three jobs, one seed each, and merges them. After each season closes it also makes the season's Track D by itself, once, at the version you registered, with your gate run from that checkout (ADR 0069). The rules are in Public test.
- More than this page: signed mandates, the HTTP binding and its settings, reason codes, receipts, and how to map your terms are in The gate interface in full. Which way in suits which kind of project is in Which way in.
A result card is a simulation result. It is not a claim about a facility.
Licence
Whose a gate is, and what you may do with what is here. This is how the licences are meant; it is not legal advice.
- A gate you wrote yourself is yours. A service that answers over HTTP, or a command run per decision, contains nothing of Agentic-Datacenter. It is under whatever licence you choose, and the licence of this repository does not reach it. Anyone may implement the wire format.
- The interface is under the MIT licence (
docs/reference/LICENSE): the wire format, the rule for signed mandate statements and its test vectors. Implement them, copy the vectors into your own tests, and ship them with your own work. - The examples are under the MIT licence (
examples/LICENSE). Copyexamples/http-gateorexamples/python-gate, change it, and keep the result under your own licence. Keep the MIT notice with what you copied. - Agentic-Datacenter itself is under the Business Source License 1.1 (
LICENSE). Running it to develop, test, evaluate or benchmark your gate is not production use, and needs no licence from anyone. Any other use needs a commercial licence. - A Python gate imports a little of Agentic-Datacenter, the types its
evaluatetakes and returns. Keep that in a thin adapter and your own logic behind it. Your product then runs without Agentic-Datacenter, and only the adapter is tied to it. - The contribution terms in
CONTRIBUTING.mdapply only to a change you ask to have merged into this repository. They do not apply to your gate, to a registration, to a result you report, or to an issue like the one that asked for this section.
Your gate stays in its own package or service. Agentic-Datacenter loads it through an entry point or calls it over HTTP, and nothing of it is added to this repository.