async def test_workflow_execution_empty(empty_calculator_agent, retriever_agent):
    """Test basic workflow execution with agent handoff."""
    workflow = AgentWorkflow(
        agents=[empty_calculator_agent, retriever_agent],
        root_agent="retriever",
    )

    memory = ChatMemoryBuffer.from_defaults()
    handler = workflow.run(user_msg="Can you add 5 and 3?", memory=memory)

    events = []
    async for event in handler.stream_events():
        events.append(event)

    with pytest.raises(WorkflowRuntimeError, match="Got empty message"):
        await handler
Test basic workflow execution with agent handoff.
llama-index-core/tests/agent/workflow/test_multi_agent_workflow.py