Observed since 20 Oct, 22:17 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
SDK for Google ADK that helps to get agents configured in the Agentic Layer quickly.
LOGLEVEL (default: INFO)X-External-Token headerDependencies can be installed via pip or the tool of your choice:
pip install agentic-layer-sdk-adk
Basic usage example:
from agenticlayer.config import parse_sub_agents, parse_tools
from google.adk.agents import LlmAgent
from agenticlayer.adk.agent_to_a2a import to_a2a
from agenticlayer.adk.otel import setup_otel
# Set up OpenTelemetry instrumentation, logging and metrics
setup_otel()
# Parse sub agents and tools from JSON configuration
sub_agent, agent_tools = parse_sub_agents("{}")
mcp_tools = parse_tools("{}")
tools = agent_tools + mcp_tools
# Declare your ADK root agent
root_agent = LlmAgent(
name="root-agent",
sub_agents=sub_agent,
tools=tools,
# [...]
)
# Define the URL where the agent will be available from outside
# This can not be determined automatically,
# because the port is only known at runtime,
# when the starlette app is started with Uvicorn.
rpc_url = "http://localhost:8000/"
# Create starlette app with A2A protocol
app = to_a2a(root_agent, rpc_url)
The JSON configuration for sub agents should follow this structure:
{
"agent_name": {
"url": "http://agent-url/.well-known/agent-card.json",
// Optional: interaction type, defaults to "tool_call"
// "transfer" for full delegation, "tool_call" for tool-like usage
"interaction_type": "transfer|tool_call"
}
}
The JSON configuration for AGENT_TOOLS should follow this structure:
{
"tool_name": {
"url": "https://mcp-tool-endpoint:8000/mcp",
"timeout": 30, // Optional: connect timeout in seconds (default: 30)
"propagate_headers": ["X-API-Key", "Authorization"] // Optional: list of headers to propagate (default: [])
}
}
You can configure which HTTP headers are passed from the incoming A2A request to each MCP server using the propagate_headers field. This provides fine-grained control over which headers each MCP server receives.
Key features:
propagate_headers is not specified or is empty, no headers are passedExample configuration:
{
"github_api": {
"url": "https://github-mcp.example.com/mcp",
"propagate_headers": ["Authorization", "X-GitHub-Token"]
},
"stripe_api": {
"url": "https://stripe-mcp.example.com/mcp",
"propagate_headers": ["X-Stripe-Key"]
},
"public_tool": {
"url": "https://public-mcp.example.com/mcp"
// No propagate_headers - no headers will be passed
}
}
The SDK automatically configures OpenTelemetry observability when running setup_otel(). You can customize the OTLP
exporters using standard OpenTelemetry environment variables:
https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
By default, HTTP request/response bodies are not captured in traces for security and privacy reasons. To enable body
logging for debugging purposes, pass enable_body_logging=True to setup_otel().
When enabled, body logging applies to both:
Body logging behavior:
Note: Starlette body logging is more limited than HTTPX because it must avoid consuming request/response streams. Bodies are only captured when already buffered in the ASGI scope.
The SDK supports passing HTTP headers from A2A requests to MCP tools. This enables MCP servers to authenticate with external APIs on behalf of users, and provides flexible header-based configuration.
propagate_headers listheader_provider hook to retrieve the configured headers from the session and inject them into tool requestsConfigure which headers to propagate using the propagate_headers field in your MCP tool configuration:
{
"weather_api": {
"url": "https://weather-mcp.example.com/mcp",
"propagate_headers": ["X-API-Key", "X-User-Location"]
},
"database_tool": {
"url": "https://db-mcp.example.com/mcp",
"propagate_headers": ["Authorization"]
}
}
Include the headers you want to propagate in your A2A requests:
curl -X POST http://localhost:8000/ \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-H "Authorization: Bearer your-token" \
-H "X-User-Location: US-West" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "message/send",
"params": {
"message": {
"role": "user",
"parts": [{"kind": "text", "text": "What is the weather?"}],
"messageId": "msg-123",
"contextId": "ctx-123"
}
}
}'
Based on the configuration above:
weather_api MCP server will receive X-API-Key and X-User-Location headersdatabase_tool MCP server will receive only the Authorization headerLimitations: Header propagation is only supported for MCP servers. Propagation to sub-agents is not currently supported due to ADK limitations in passing custom HTTP headers in A2A requests.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.18.1 | 27 May 2026 | 11 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:17 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:c004a32ec0d1a00a7cab344fcb8ae183a47b5da98fbd1fce8838f90dbcc8684b