NewIntroducing Integrations
All guides
Glossary
Updated
3 min read
by Anlyon Team

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.

glossarydeclared actionsgoverned actionsexecution

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.refund for Stripe refunds, github.file_update for one existing text file on a configured branch that is not the default branch, and resend.email_send for one email from a designated sending domain.
  • A declaration on an HTTPS action you define. impact says how much one call changes, in money or a unit you declare. verify is a GET on the action's own host that reads the result back. governed: true opts in without either.

What does a governed action get?

Plain hosted actionGoverned action
Credential held by AnlyonYesYes
Policy on every invocationYesYes
ApprovalOf the request snapshotBound to a digest of the request, target, versions, preconditions and expiry
Shared limitNoYes, when it declares or an adapter counts an impact
OutcomeThe HTTP result, or unknownA receipt with a grade
Retried by AnlyonNoNo

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.
  • confirmed on 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.

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.

Continue with a related task

Free tier, no credit card. One command if you use Claude or Cursor.

$ claude mcp add anlyon -- npx -y @anlyonhq/mcp-server