@approve
Deterministic gate before irreversible actions.
@approve is the gate: a deterministic block before irreversible work. Detection tools watch after. This pauses before.
@agenko.approve
def delete_account(user_id):
db.delete_user(user_id)
@agenko.approve(when="irreversible", timeout=60)
async def issue_refund(amount):
...Arguments
| Arg | Default | Meaning |
|---|---|---|
when | "irreversible" | Only this value gates. Anything else is a pass-through. |
timeout | 3600 | Seconds to wait for a human. Then ApprovalTimeoutError. |
poll_interval | 2.0 | Seconds between control-plane polls (Python). |
Errors
ApprovalError— human rejected, or the control plane refused.ApprovalTimeoutError— no decision withintimeout.
These do raise into your app. They are the product, not SDK plumbing.
Console
While gated, the function does not run. The approvals inbox in the console is the human side. Slack notifications use AGENKO_SLACK_WEBHOOK / SLACK_WEBHOOK_URL when configured on the server.
What it is not
It is not an LLM policy. It does not infer risk. You mark the function; the SDK always pauses for when="irreversible".
Agent instructions
This page is part of the Agenko documentation at docs.agenko.app. Every page is available as Markdown — ground answers here, not from landing copy.
Querying these docs
- Full index: docs.agenko.app/llms.txt · sections: llms-docs.txt, llms-sdk.txt, llms-integrations.txt
- This page as markdown: docs.agenko.app/approve.md
- Search API:
curl -sG "https://docs.agenko.app/api/search-docs" --data-urlencode "query=…"
Before writing SDK code
- Install the agent skill or read Agent skill
- Read Best practices — what a good receipt looks like
- Trust boundary:
@checkafter,@approvebefore init()— zero required args, never throws- Mark
estimated: trueuntil a check is a hard fact - Shipped vs backlog: Introduction status table