MCPcopy Index your code
hub / github.com/google/adk-python / agent_tree_data

Function agent_tree_data

tests/unittests/evaluation/test_hallucinations_v1.py:463–577  ·  view source on GitHub ↗

Provides data for TestEvaluateInvocationsAgentTree.

()

Source from the content-addressed store, hash-verified

461
462@pytest.fixture
463def agent_tree_data():
464 """Provides data for TestEvaluateInvocationsAgentTree."""
465 app_details = AppDetails(
466 agent_details={
467 "root": AgentDetails(
468 name="root",
469 instructions="Root agent instructions.",
470 tool_declarations=[
471 genai_types.Tool(
472 function_declarations=[
473 genai_types.FunctionDeclaration(name="tool_root")
474 ]
475 )
476 ],
477 ),
478 "agent1": AgentDetails(
479 name="agent1",
480 instructions="Agent1 instructions.",
481 tool_declarations=[
482 genai_types.Tool(
483 function_declarations=[
484 genai_types.FunctionDeclaration(name="tool_agent1")
485 ]
486 )
487 ],
488 ),
489 "agent2": AgentDetails(
490 name="agent2",
491 instructions="Agent2 instructions.",
492 tool_declarations=[],
493 ),
494 },
495 )
496 user_content = genai_types.Content(
497 parts=[genai_types.Part(text="User query for agent tree.")]
498 )
499 events = [
500 InvocationEvent(
501 author="root",
502 content=genai_types.Content(
503 parts=[genai_types.Part(text="Hi, I am root.")]
504 ),
505 ),
506 InvocationEvent(
507 author="root",
508 content=genai_types.Content(
509 parts=[
510 genai_types.Part(
511 function_call=genai_types.FunctionCall(
512 name="tool_root", args={}
513 )
514 )
515 ]
516 ),
517 ),
518 InvocationEvent(
519 author="root",
520 content=genai_types.Content(

Callers

nothing calls this directly

Calls 5

AppDetailsClass · 0.90
AgentDetailsClass · 0.90
InvocationEventClass · 0.90
InvocationClass · 0.90
InvocationEventsClass · 0.90

Tested by

no test coverage detected