Skip to content

agentix.confirm

confirm

Human-in-the-loop confirmation.

A ConfirmFn receives a human-readable description of a pending action and returns True only on an explicit "yes". It may be sync or async — async lets a web/server app await a real user decision without blocking the event loop.

always_approve

always_approve(description: str) -> bool

Approve everything. For tests/automation only — never in production.

always_deny

always_deny(description: str) -> bool

Decline everything. The safe default when no human is available.

console_confirm

console_confirm(description: str) -> bool

Prompt on the terminal. Blocks for real stdin input — CLI use only.