Policy
Connecting to the policy engine…
Tab indents. Shift+Tab, or Esc then Tab, leaves the editor.
TrustGraph is policy-as-code for what AI agents produce. Restrictions follow the data through every hand-off, and every output gets allow, needs approval or deny, with the reason.
Connecting to the policy engine…
Tab indents. Shift+Tab, or Esc then Tab, leaves the editor.
Loading the run…
Waiting for the policy engine.
Permission systems decide what an agent may read. They lose track once it writes something new. In May 2025, Invariant Labs showed what that costs.
A coding agent reads a user's private repositories. It is allowed to.
It reads an issue on a public repository and writes what it found into a pull request.
The pull request opens on the public repository. Every step was allowed; nothing checked that the second came from the first.
Taking access away does not fix it: the agent needs the private code. The playground above shows the missing rule, with two agents handing off.
Seeded runs drive the real runtime through policy changes, crashes and approval expiry, and check five safety invariants at every step. They cannot cover what your system does after allow.
Uses the policy in the playground above.
Agents draft the policy: every command has --json output with a stable code, a path and a did-you-mean suggestion. A person reviews the plain-English explanation and a diff that flags every widening.
$ trustgraph policy check --json trustgraph.policy.yaml
{
"diagnostics": [
{
"code": "unknown_name",
"message": "`leadrship` is not a group or person in this policy",
"path": "sources.comp_review.readers[1]",
"severity": "error",
"suggestion": "did you mean `leadership`?"
}
],
"ok": false
}
Approval adds a human check; it never widens who may read a source. Anything the policy does not name is denied.
readers(output) = readers(input 1) ∩ readers(input 2) ∩ … allowed = everyone the action reaches ⊆ readers(output)
No language model in the decision path. Same policy, same inputs, same answer.
Repeatable is not right: your tests say what right means.
The simulator runs the shipped runtime and checks five invariants after every step.
Evidence, not a proof over every execution.
Ten Kani proofs cover the decision ordering, the approval window and the reader rules. All pass in CI.
Those kernels within fixed bounds, not the whole system.
Put trustgraph gateway between your agents and their MCP servers. It records what each agent reads and checks every action before forwarding it; a person approves held calls and sees exactly what they approve. Agents cannot skip it, provided the gateway alone holds the servers' credentials and agents have no other route to them. Gateway guide
trustgraph serve is the decision service over HTTP and MCP, for stacks that report reads and ask before acting themselves. Serve guide
The CLI writes, tests and simulates policies. Python integrations are in the repository, but their session handling is being rebuilt after security review: do not rely on them yet.
cargo install --locked --git https://github.com/skishore23/trustgraph trustgraph-cli trustgraph gateway --policy trustgraph.policy.yaml --operator leo --config gateway.yaml trustgraph serve --policy trustgraph.policy.yaml --operator leo trustgraph policy init trustgraph policy check trustgraph.policy.yaml trustgraph policy test trustgraph.policy.yaml trustgraph policy simulate trustgraph.policy.yaml --seed 0
Permission databases such as SpiceDB or OpenFGA decide what your agent may read. TrustGraph decides where what it wrote may go.