backends • AI Agent SDK

Built-in approval backends for PraisonAI Agents.

backends

AI Agent

Built-in approval backends for PraisonAI Agents.

Provides lightweight backends that ship with the core SDK:

  • AutoApproveBackend — always approves (bots, trusted envs).
  • ConsoleBackend — interactive Rich terminal prompt (CLI default).
  • AgentApproval — delegates approval decision to another AI agent.

Import

python
from praisonaiagents.approval import backends

Classes

Constants

NameValue
_COMMAND_ARG_KEYSfrozenset({'command', 'cmd', 'commands', 'script', 'shell', 'code', 'source', 'program'})
_SHELL_OPERATORS`frozenset({‘;’, ‘&’, ‘\‘, ‘(‘, ‘)’, ‘{‘, ‘}’, ‘<’, ‘>’, ‘'})
_VERDICT_TOKEN_REre.compile('[A-Z]+')
_NEGATIONSfrozenset({'NOT', 'NO', 'NEVER', 'DONT', 'DON', 'CANT', 'CAN'})
_ARGUMENTS_TAG_REre.compile('<\\s/?\\sarguments\\s*>', re.IGNORECASE)