async def test_basic_workflow(calculator_agent, retriever_agent):
    """Test basic workflow initialization and validation."""
    workflow = AgentWorkflow(
        agents=[calculator_agent, retriever_agent],
        root_agent="retriever",
    )

    assert workflow.root_agent == retriever_agent.name
    assert len(workflow.agents) == 2
    assert "calculator" in workflow.agents
    assert "retriever" in workflow.agents
Test basic workflow initialization and validation.
llama-index-core/tests/agent/workflow/test_multi_agent_workflow.py