Skip to main content
This example is available on GitHub: examples/01_standalone_sdk/28_ask_agent_example.py
Use ask_agent() to get quick responses from the agent about the current conversation state without interrupting the main execution flow:
examples/01_standalone_sdk/28_ask_agent_example.py
Running the Example

Key Features

The ask_agent() method provides several important capabilities:

Context-Aware Responses

The agent has access to the full conversation history when answering questions:

Non-Intrusive Operation

Questions don’t interrupt the main conversation flow - they’re processed separately:

Works During and After Execution

You can ask questions while the agent is running or after it has completed:

Use Cases

  • Progress Monitoring: Check on long-running tasks
  • Status Updates: Get real-time information about agent activities
  • User Interfaces: Provide sidebar information in chat applications

Next Steps