Integrations: Policy engines

Agents only retrieve what their owner may read

Argent runs OpenFGA to decide, document by document, what a retrieval may hand an AI agent. The agent inherits its human owner's access, nothing more, and anything the engine cannot answer comes back empty.

OpenFGA logo
01 / INTEGRATIONS: POLICY ENGINES

What Argent does with OpenFGA

Vector search finds what is relevant. OpenFGA decides what this person is allowed to see. Only that reaches the model.

OWASP's Top 10 for LLM applications names the risk directly: "Inadequate or misaligned access controls can lead to unauthorized access to embeddings containing sensitive information." Its first mitigation: "Implement fine-grained access controls and permission-aware vector and embedding stores" (OWASP LLM08:2025).

OpenFGA is a CNCF project that moved to the Incubating maturity level on October 28, 2025 (CNCF).

  • The owner's access, never more. An agent's relationships are those of its human owner. An agent with no owner, or one Argent cannot map to exactly one person, gets nothing.
  • Inheritance that matches your folders. Owners, viewers, groups inside groups, folders inside folders and collections: share a folder with a group and every member can retrieve what is under it, with no per-document grant.
  • Fail closed. An engine error returns an empty set with fail_closed: true, never the unfiltered candidates. Errors are never cached as an allow.
  • Gate at the gateway too. When the tenant's RAG authorization module is on, the gateway also asks OpenFGA whether the agent's owner may invoke the upstream endpoint the agent is calling, and denies on any doubt.
02 / INTEGRATIONS: POLICY ENGINES

How it connects

OpenFGA ships with Argent and runs next to it. Your pipeline asks Argent, and Argent asks OpenFGA.

EngineSelf-hosted OpenFGA with its own Postgres database, in the Compose overlay and the Kubernetes chart; its playground is off, for air-gapped sites
ModelProvisioned by Argent at start-up: user, group, folder, collection, document
FilterPOST /v1/rag-authz/filter-retrieval: candidate ids in, the authorized subset out
Point checkPOST /v1/rag-authz/check: one allow or deny
GrantsPOST and DELETE /v1/rag-authz/tuples, written by your ingestion pipeline
SDKsGo FilterRetrieval, Node filterRetrieval, Python filter_retrieval
TenantTaken from the credential only, never from the request body
03 / INTEGRATIONS: POLICY ENGINES

What you configure

Three changes to a RAG pipeline you already run, plus one option.

  1. Switch it on. Turn on RAG authorization in the install and set the SDK credential your pipeline will present.
  2. Mirror your sharing. When your pipeline indexes a document, it writes who owns or can view it, and which folder or collection it sits in. When it removes a document, it deletes those grants. Writes fail loudly, so a missed grant is seen.
  3. Filter before the prompt. Between vector search and building the prompt, call filter_retrieval with the candidate ids and send only allowed to the model. If the answer is empty, the context is empty.
  4. Optional: gate the endpoint. Turn on the tenant's RAG authorization module and grant each person the upstream endpoints they may call.

A lower admin tier cannot overwrite or remove a grant a higher tier wrote, and each refusal is signed.

04 / INTEGRATIONS: POLICY ENGINES

Proof of what was withheld

The leak that did not happen is evidence too.

  • Retrieval log. For each retrieval: who asked, which documents reached the model, which were withheld, and any fail-closed event, with names, not ids.
  • Console. The RAG Authorization page under Guardrails lists retrievals and shows each one's withheld documents and fail-closed warnings.
  • Who can read it. SuperAdmin, TenantAdmin and Auditor. Grants are written by administrators and the pipeline only.
  • Metrics. Decision and fail-closed counts are exported as metrics, so your monitoring can alert on a rise in fail-closed answers.
05 / INTEGRATIONS: POLICY ENGINES

Where this fits

Pages that go deeper.

Other policy engines

Argent decides with its built-in OPA engine or with the engine your team already runs, and filters retrieval with OpenFGA.

  • Open Policy Agent (built in)
  • Cerbos
  • AuthZed SpiceDB
  • Topaz