Docs menu

@approve

Deterministic gate before irreversible actions.

@approve is the gate: a deterministic block before irreversible work. Detection tools watch after. This pauses before.

python
@agenko.approve
def delete_account(user_id):
    db.delete_user(user_id)

@agenko.approve(when="irreversible", timeout=60)
async def issue_refund(amount):
    ...

Arguments

ArgDefaultMeaning
when"irreversible"Only this value gates. Anything else is a pass-through.
timeout3600Seconds to wait for a human. Then ApprovalTimeoutError.
poll_interval2.0Seconds between control-plane polls (Python).

Errors

  • ApprovalError — human rejected, or the control plane refused.
  • ApprovalTimeoutError — no decision within timeout.

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

Before writing SDK code

  • Install the agent skill or read Agent skill
  • Read Best practices — what a good receipt looks like
  • Trust boundary: @check after, @approve before
  • init() — zero required args, never throws
  • Mark estimated: true until a check is a hard fact
  • Shipped vs backlog: Introduction status table

Page: @approve
HTML: https://docs.agenko.app/approve
Markdown: https://docs.agenko.app/approve.md