Skip to content

symfonic.core.tools.ask_user

ask_user

Built-in elicitation tool — ask_user.

Allows the agent to pause execution and request structured clarification from the user.

ask_user async

ask_user(request: AskUserRequestInput) -> AskUserResponse

Sentinel for tool-schema registration.

The react node intercepts calls to ask_user BEFORE invocation; if this body ever runs, it indicates a bug in the interrupt routing and we raise loudly.

Source code in src/symfonic/core/tools/ask_user.py
async def ask_user(request: AskUserRequestInput) -> AskUserResponse:
    """Sentinel for tool-schema registration.

    The react node intercepts calls to ``ask_user`` BEFORE invocation;
    if this body ever runs, it indicates a bug in the interrupt routing
    and we raise loudly.
    """
    raise RuntimeError(
        "ask_user body invoked directly — the react interrupt path "
        "should have intercepted this. This is a framework bug."
    )