Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.orxhestra.com/llms.txt

Use this file to discover all available pages before exploring further.

Gate dangerous tool executions with CallContext.request_confirmation():
from orxhestra.tools import CallContext

async def confirm_dangerous(ctx, tool_name: str, tool_args: dict) -> None:
    if tool_name in ("delete_file", "drop_table"):
        call_ctx = CallContext(ctx)
        call_ctx.request_confirmation()
When request_confirmation() is called from a before_tool_callback, the tool execution is paused and a confirmation request event is yielded. The caller must approve or reject before execution continues.
agent = LlmAgent(
    name="SafeAgent",
    model=model,
    tools=[delete_file, drop_table, search],
    before_tool_callback=confirm_dangerous,
)