Skip to content

[Bug]: Client hangs when implementing AgentExecutor and awaiting twice in execute method #367

@meoow113

Description

@meoow113

What happened?

A bug happened!
When implementing the AgentExecutor and calling await twice on the complete method within the execute method, the client consumption gets stuck. The queue does not return the second complete result to the client.
Specifically, the issue occurs in the demo_agent_executor.py file where the execute() method is called twice using await:

async def execute(
        self,
        context: RequestContext,
        event_queue: EventQueue,
    ) -> None:
        await updater.add_artifact(
            [Part(root=TextPart("hello! "))],
            name='conversion_result',
        )

        await updater.complete()
        await updater.complete()

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions