Skip to main content
Shows the convenience path for ask-once-and-wait conversational flows. agent.run() dispatches on agent type: functional agents stay sync, conversational agents return a coroutine that creates a hidden session, sends one turn, waits for the final message, and cleans up. For streaming, approvals, or multi-turn context, keep using agent.create_session() explicitly.
Source: examples/agents/08_conversational_agent_run.py in the SDK repo.