What is a governed action for an AI agent?
A governed action is an agent action that Anlyon puts under a shared limit, a bound approval and a graded receipt. What makes an action governed, how it differs from a plain hosted action, and what it does not cover.
A governed action is an action an AI agent invokes through Anlyon that carries an adapter or a declaration, so it draws from a shared limit, its approval is bound to the exact request, and it returns a receipt with a grade.
What makes an action governed?
One of two things:
- An adapter. Three exist:
stripe.refundfor Stripe refunds,github.file_updatefor one existing text file on a configured branch that is not the default branch, andresend.email_sendfor one email from a designated sending domain. - A declaration on an HTTPS action you define.
impactsays how much one call changes, in money or a unit you declare.verifyis aGETon the action's own host that reads the result back.governed: trueopts in without either.
What does a governed action get?
| Plain hosted action | Governed action | |
|---|---|---|
| Credential held by Anlyon | Yes | Yes |
| Policy on every invocation | Yes | Yes |
| Approval | Of the request snapshot | Bound to a digest of the request, target, versions, preconditions and expiry |
| Shared limit | No | Yes, when it declares or an adapter counts an impact |
| Outcome | The HTTP result, or unknown | A receipt with a grade |
| Retried by Anlyon | No | No |
Example
A team's agent sends emails through its own mail API. Declaring the action makes each send count against a daily limit and read back after the write.
import { Client } from '@anlyonhq/sdk';
const ops = new Client({ apiKey: process.env.ANLYON_OPERATOR_KEY! });
await ops.actions.declare('send-email', {
// Counted before dispatch. `emails` is a unit this workspace declares.
impact: { dimension: 'emails', amount: 'count(input.to)', bound: 'exact' },
// A GET on the action's own host, issued after the write.
verify: {
url: 'https://api.example.com/v1/emails/{{response.id}}',
status: 200,
match: [{ path: 'status', equals: 'sent' }],
},
});
await ops.impactLimits.create({ name: 'Daily emails', dimension: 'emails', period: 'day', amount: 500 });
From then on, every agent, session and key in the environment draws from the same 500 emails a day. A receipt grades confirmed when the read-back matched.
Where does it stop?
- A declared amount is the one you wrote. For an API you declare, you write what the action counts, and Anlyon enforces it before dispatch. It does not check that the expression describes what the provider does.
- A declared action has no provider idempotency, no atomic stale-state protection and no replay of a lost write.
confirmedon a declared action means your own verify rule matched. Point it at something the write creates.- The host is fixed by the definition and must be https.
- Calls outside Anlyon are not governed. A tool your own code calls directly is not routed through Anlyon.
Related terms
Read next
Frequently asked questions
What makes an Anlyon action governed?
An adapter or a declaration. The three adapters are stripe.refund, github.file_update and resend.email_send. A declaration is impact, verify or governed: true on an HTTPS action you define. An action with neither keeps the template executor and gets none of the three guarantees.
Can any HTTP API be a governed action?
Any HTTPS API you can describe as an action. Declare what an action changes, and Anlyon puts it under a shared limit, binds every approval to the exact request, and grades the outcome. A declared action has no provider idempotency, no atomic stale-state protection and no replay of a lost write.
