Agent harness

Permissions

Permissions set what the agent may do on its own, per kind of action, across your whole app.

Copy page
View as Markdown

Every action the agent takes is checked against your app's permission settings. You set one of three modes for each kind of action. These settings apply app-wide.

The three modes

ModeWhat the agent does
Act without askingRuns the action when the agent decides to.
Ask the user firstPauses the action and waits for the person's yes.
Never allowedDoes not run the action.

The strictest setting wins

Some action kinds overlap. When they do, Harny applies the strictest setting that matches. If one kind is set to Act without asking and an overlapping kind is set to Ask the user first, the action waits for a yes.

How kinds are decided

Harny decides the kind of an action by what the action does: whether it affects nobody else, affects others, involves money, or cannot be undone. It never uses what the caller sends. You cannot lower a kind's risk by naming the action differently.

An email to an address the person never gave waits for the person's yes after the agent has read someone else's content.

Actions catalog and undo

ActionUndo available
calendar.create_eventYes
email.sendNo
ticket.createYes
slack.post_messageYes
notion.create_pageYes

Actions are limited to this catalog. Every action is recorded. Undo needs the action record id. email.send has no undo, so check its mode before you allow it to act without asking.

Pending confirmations

An action that waits for a yes comes back as a pending confirmation in the run result. Your code approves or refuses it with agent.confirm. It never goes through the model.

await agent.confirm(pending, approve=True)

Narrow actions with hooks

before_act is a hook that receives each action before it runs. Return an ActDecision to allow or block it. Use it to add checks in your own code.

Where to set permissions

Open the console at Actions, Automation, Permissions.

Next