DEV Community

Cover image for Why AI agents need runtime permissions?
Amer Yahya
Amer Yahya

Posted on

Why AI agents need runtime permissions?

When AI agents were mostly text generators, the main failure mode was bad output.

Now agents are becoming execution systems.

They call tools.
They invoke APIs.
They interact with MCP servers.
They read and write data.
They trigger workflows.
They modify state.

That creates a different class of risk.

The question is no longer only:

“Did the model answer correctly?”

The question becomes:

“Was this agent allowed to take this action, with these parameters, in this context, at this moment?”

That is a runtime permissions problem.

For production agents, control needs to happen before execution, not only after logs are reviewed.

A serious runtime layer should be able to evaluate:

• Tool-level permissions
• Parameter-level constraints
• MCP action policies
• Sensitive workflow approvals
• Data access boundaries
• Human-in-the-loop rules
• Audit logs for every meaningful action

System prompts are useful, but they are not enough.

They describe intended behavior.

They do not reliably enforce execution boundaries.

This is the thesis behind Enforra (enforra.com).

As agents become more capable, developers need a lightweight control layer that sits between the agent and the action, enforcing what the agent can and cannot do at runtime.

The next phase of agent infrastructure will not just be about orchestration.

It will be about governed execution.

GitHub: github.com/enforra/enforra

Top comments (1)

Collapse
 
armorer_labs profile image
Armorer Labs

One thing we learned the hard way at Armorer Labs (we maintain Armorer Guard, a local Rust MCP-side scanner): "runtime permissions" is a great term, but the implementation question is where in the MCP boundary the decision happens. A few patterns that have worked and a few that have not:

What worked:

  • Scoping permissions at the MCP tool call (tool+verb+target) rather than at the agent session. Same "scope at the call, not the session" point as elsewhere in this thread.
  • Issuing a receipt per call (request, granted scope, target, decision, outcome). The receipt is the durable artifact a reviewer can read later; the prompt log is not.
  • A local-first guard that runs before the tool call, with sub-millisecond hot path, so it does not become the thing that gets bypassed under load.

What did not work:

  • Trying to do the decision purely in the LLM via prompt framing. The model will rationalize around the prompt given enough context.
  • Reusing session-level OAuth scopes for everything. The blast radius of one MCP tool hijack ends up being whatever that scope can touch.
  • "Ask the user" as the default. With multiple agents in flight, the user just learns to confirm.

The MCP tag on this post is a useful reminder that the boundary layer is probably the MCP gateway itself, not the agent runtime. Curious which side of that boundary your runtime check sits on.

(Side note from the agent dev perspective: an MCP-side guard also has the nice property of working across different agent runtimes without each one needing to reinvent the same policy.)