@@ -22,13 +22,25 @@ Basic usage example:
2222
2323``` python
2424from agenticlayer.agent_to_a2a import to_a2a
25+ from agenticlayer.config import parse_sub_agents, parse_tools
2526from agenticlayer.otel import setup_otel
27+ from google.adk.agents import LlmAgent
2628
2729# Set up OpenTelemetry instrumentation, logging and metrics
2830setup_otel()
2931
32+ # Parse sub agents and tools from JSON configuration
33+ sub_agent, agent_tools = parse_sub_agents(" {} " )
34+ mcp_tools = parse_tools(" {} " )
35+ tools = agent_tools + mcp_tools
36+
3037# Declare your ADK root agent
31- root_agent = ...
38+ root_agent = LlmAgent(
39+ name = " root-agent" ,
40+ sub_agents = sub_agent,
41+ tools = tools,
42+ # [...]
43+ )
3244
3345# Define the URL where the agent will be available from outside
3446# This can not be determined automatically,
@@ -40,6 +52,30 @@ rpc_url = "http://localhost:8000/"
4052app = to_a2a(root_agent, rpc_url)
4153```
4254
55+ ## Configuration
56+
57+ The JSON configuration for sub agents should follow this structure:
58+ ``` json5
59+ {
60+ " agent_name" : {
61+ " url" : " http://agent-url/.well-known/agent-card.json" ,
62+ // Optional: interaction type, defaults to "tool_call"
63+ // "transfer" for full delegation, "tool_call" for tool-like usage
64+ " interaction_type" : " transfer|tool_call"
65+ }
66+ }
67+ ```
68+
69+ The JSON configuration for ` AGENT_TOOLS ` should follow this structure:
70+ ``` json5
71+ {
72+ " tool_name" : {
73+ " url" : " https://mcp-tool-endpoint:8000/mcp" ,
74+ " timeout" : 30 // Optional: connect timeout in seconds
75+ }
76+ }
77+ ```
78+
4379## OpenTelemetry Configuration
4480
4581The SDK automatically configures OpenTelemetry observability when running ` setup_otel() ` . You can customize the OTLP
0 commit comments