Dev.to Security 🔐 Cybersecurity 👁 0 📖 3 min read

Letting AI Agents Propose Actions: What a Policy Gate and Signed Records Can and Can't Do

AI agents are moving from answering questions to taking actions. They issue refunds, pay vendors, update CRM deals, merge pull requests and post to team channels. Before any of that reaches production, two questions need

AI agents are moving from answering questions to taking actions. They issue refunds, pay vendors, update CRM deals, merge pull requests and post to team channels. Before any of that reaches production, two questions need answers:

  1. What is this agent allowed to do?
  2. Can we prove afterwards what it actually did?

This post describes one approach to both questions, the limits of that approach, and where I'd like feedback. The project is an open source prototype called Parmana.

Why a prompt isn't a control

A common first step is to put a rule in the prompt: "only refund up to 500." That's guidance, not enforcement. The agent can ignore it, and so can any text injected into its context, such as a support ticket or a web page it reads.

Logs don't solve this either. If the same system that took the action also writes the log, the log is that system's account of itself. It's a claim, not evidence.

The approach: propose, then decide

Parmana sits between whatever calls it (an agent, an application, or a person) and the systems it acts on. The caller proposes an action, and the gateway decides whether it runs.

  • Before an action. Each request is checked against an explicit, versioned policy. If the policy requires it, the action waits for a signed approval from a person whose key you trust. No approval, no action. This applies to reads as well as writes.
  • When it runs. On the supported paths, the gateway resolves the credentials for the connector that performs the action. An agent calling the API never receives those credentials. The gateway releases one approved action, once, through a connector.
  • After it runs. A signed record captures what was authorized and what happened. Anyone can verify the record offline, using only the public key they choose to trust.

How a proposed action flows through Parmana:

  1. An agent or caller proposes an action.
  2. The gateway checks it against policy.
  3. If policy says no, the action is rejected.
  4. If policy says it needs approval, the action waits for a signed approval.
  5. Once allowed or approved, the connector runs the action once.
  6. A signed record of what happened is written.

Parmana doesn't decide what the agent should do. It decides whether the agent was allowed to do it, and it keeps a record that someone other than the acting system can check.

What the verifier can't prove

A signature shows that a record was made with a particular key. It doesn't show who controls that key. The verifier can't prove that a key belongs to Parmana, or that it belongs to the person you think approved an action. Trust in the key has to come from outside the system, such as your own key management process.

Known limits

I'd rather state these up front than have you find them later:

  • Only gateway traffic is checked. If an agent calls one of your systems directly, without going through Parmana, that action isn't covered. Closing that gap is planned work, not something that exists today.
  • Same-host credential access. Code running on the same host that can read the server's environment can still read connector credentials. The gateway protects credentials from the API caller, not from anyone with access to the host.
  • Prototype status. The project is not ready for public use. Interfaces, policies and storage formats may change without notice.

How the claims are tracked

Each statement about what Parmana does is written down as a numbered claim. Every claim names the code and tests behind it, states the scope its evidence supports, and lists what isn't yet true. Changes to claims are tracked in the repository's change log, so a change to what the project says it does shows up in review. If you think a claim is wrong, the project has a process for recording that challenge against the claim.

I think this kind of traceability matters more than any single feature, because it lets you check the project instead of trusting it.

Where I'd like feedback

  • If you've run agents against real systems, where would a check like this have helped, and where would it have got in the way?
  • How do you currently audit the decisions your agents make? What would you need from a record to trust it?
  • Would you accept a gateway-only check as a first step, given the limit on direct calls? Or is that a deal-breaker for your use case?

The code is at https://github.com/pavancharak/parmana-core. The README has a quick start, and the overview document explains the design and its limits.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.