Skip to content

Tutorial: Updated call_agent_async function not provided #93

Closed

Description

@garrettlove8

In step 1.4 a call_agent_async is provided. Late on, in step 2.2 the doc mentions that this function now accepts additional arguments, however the updated function isn't provided. Following steps will not run as a result.

Activity

  1. changed the title [-]Tutorial: Updated call_agent_async function not provided[/-] [+]Tutorial: Updated `call_agent_async` function not provided[/+] on Apr 11, 2025
  2. added
    documentation
    on Apr 11, 2025
  3. hangfei commented on Apr 12, 2025

    @hangfei
    Collaborator

    we have updated the issue template and process.

    This issue should go to adk-docs repo. Maybe you can also specify which tutorial you are referring too.

    Closing now.

  4. ruochenliao commented on Apr 20, 2025

    @ruochenliao

    refer this tutoria:
    https://google.github.io/adk-docs/get-started/tutorial/#4-interact-with-the-agent-team
    there is no define of the function
    await call_agent_async(query = "Hello there!",
    runner=runner_agent_team,
    user_id=USER_ID,
    session_id=SESSION_ID)

  5. ruochenliao commented on Apr 20, 2025

    @ruochenliao

    refer this tutoria: https://google.github.io/adk-docs/get-started/tutorial/#4-interact-with-the-agent-team there is no define of the function await call_agent_async(query = "Hello there!", runner=runner_agent_team, user_id=USER_ID, session_id=SESSION_ID)

    async def call_multi_agent_async(query: str, runner: Runner, user_id: str, session_id: str):
    content = types.Content(role='user', parts=[types.Part(text=query)])

    final_response_text = "Agent did not produce a final response." # Default
    async for event in runner.run_async(user_id=user_id, session_id=session_id, new_message=content):
        if event.is_final_response():
            if event.content and event.content.parts:
                final_response_text = event.content.parts[0].text
            elif event.actions and event.actions.escalate:
                final_response_text = f"Agent escalated: {event.error_message or 'No specific message.'}"
            break
    
    print(f"<<< Agent Response: {final_response_text}")
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions