approval="presentation" on your Agent and run a Telegram bot — Allow/Deny buttons render on chat, resolve against a SQLite store, and survive a restart.
Quick Start
Auto-wire from the agent
Set The bot detects the backend on the agent and connects it to the chat automatically. Unknown decision values (anything outside
approval="presentation" on the Agent — the bot wires the durable backend to the chat on start(). No register_approval_backend() call needed.allow, deny, always) are rejected before reaching the backend — fail closed.How It Works
An agent tool call persists to the store, renders Allow/Deny buttons, and unblocks only when an authorised tap resolves the approval ID. Each decision binds to an unguessableapproval_id, not a message id — so a late tap after a redeploy still resolves against the SQLite store instead of falling through as an unhandled callback.
What the user sees
The whole point of the feature — a non-developer only ever sees two buttons and a result. The original message updates in place: ✅ Approved, ❌ Denied, or ⚠️ Approval could not be processed.Configuration Options
Backend construction lives on the secure-backend page — this page only wires it to Telegram.Secure Approval Backend
PresentationApprovalBackend constructor args (store, allowed_actors, timeout)Durable Approvals
The SQLite
ApprovalStore schema behind the durable pathCommon Patterns
Auto-wire from agent (default). Setapproval="presentation" on the Agent and run the bot — nothing else. This is the Quick Start path.
rehydrate_approvals() runs automatically on start() and returns the restored count.
Best Practices
Set PRAISONAI_APPROVAL_ACTORS
Set PRAISONAI_APPROVAL_ACTORS
The backend is fail-closed — set the actor allowlist so only your approvers can resolve a tap. Without it, no actor is authorised.
One transport per backend
One transport per backend
Do not pass an already-wired backend from Slack to Telegram. When a backend already owns a sender, the coupling guard leaves it untouched so it never renders on one transport while addressing another.
Prefer the auto-wire path
Prefer the auto-wire path
Reserve
register_approval_backend() for tests or custom bootstrap. In normal deployments, approval="presentation" on the Agent is enough.Log the rehydrated count on startup
Log the rehydrated count on startup
start() logs how many approvals were restored. Watch that number to catch a broken deploy where pending approvals never come back.Related
Durable Approvals
The SQLite store behind the durable path
Secure Approval Backend
The
PresentationApprovalBackend this page wiresGateway Approval Durability
The gateway sibling of this transport wiring
Messaging Bots
Deploy agents to chat channels

