[RefImpl] acs-example-guardian: a policy-backend interface that every step reaches

Open
#745 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend, security

Research direction

Start with adapters/src/acs/guardian/example_guardian.py, especially _policy_backend_decision(), and trace the ACS_POLICY_BACKEND selection into the OPA backend. Identify how toolCallRequest, toolCallResult, and the informational steps such as sessionStart, userMessage, and knowledgeRetrieval are dispatched. Done means the Guardian exposes separate evaluate and record operations, OPA implements both, informational steps are audited without changing their responses, and the no-backend default behavior remains unchanged.

Written by the indexing model from the issue text.

Description

status:needs-triage type:refimpl
Target runtime or language

Python, adapters/src/acs/guardian (acs-example-guardian)

What this proves

Following Rock's note on #183: the example Guardian has a policy backend since #602, but example_guardian.py imports opa_backend directly in _policy_backend_decision(), and only toolCallRequest and toolCallResult reach it. A policy engine that decides on what happened earlier in the session also needs the other steps (sessionStart, userMessage, knowledgeRetrieval and so on), even if it may only allow them.

Proposal:

  1. A small backend interface in acs/guardian (evaluate for toolCallRequest and toolCallResult, record for the informational steps), selected by ACS_POLICY_BACKEND as now. opa_backend becomes the first implementation; the default path without a backend does not change.
  2. Informational steps reach the backend audit-only: the backend sees them, and the Guardian's answer for them stays as it is.

This shows that the reference Guardian can carry a stateful policy engine without changing the wire layer. We would use it for Kyvvu's policy engine, which now runs behind its own ACS Guardian, kyvvu-acs (announced in https://github.com/GenAI-Security-Project/agent-control-standard/discussions/617). With this interface we would maintain one backend plug-in instead of our own wire layer.

Do you intend to implement this yourself

Yes, I want this assigned to me

Current Priority Scope

Feeds the runnable Guardian reference implementation

Dominant language
TypeScript
Stars
183
Forks
56
Avg merge
3d 1h
Merged PRs (30d)
67

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GenAI-Security-Project/agent-control-standard

All issues in GenAI-Security-Project/agent-control-standard

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.