Skip to main content

No project description provided

Project description

Agentic Layer Python SDK for Google ADK

SDK for Google ADK that helps to get agents configured in the Agentic Layer quickly.

Features

  • Configures OTEL (Tracing, Metrics, Logging)
  • Converts an ADK agent into an instrumented starlette app
  • Configures A2A protocol for inter-agent communication
  • Offers parsing methods for sub agents and tools
  • Set log level via env var LOGLEVEL (default: INFO)

Usage

Dependencies can be installed via pip or the tool of your choice:

pip install agentic-layer-sdk-adk

Basic usage example:

from agenticlayer.agent_to_a2a import to_a2a
from agenticlayer.config import parse_sub_agents, parse_tools
from agenticlayer.otel import setup_otel
from google.adk.agents import LlmAgent

# 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)

Configuration

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
  }
}

OpenTelemetry Configuration

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/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentic_layer_sdk_adk-0.8.1.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentic_layer_sdk_adk-0.8.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file agentic_layer_sdk_adk-0.8.1.tar.gz.

File metadata

  • Download URL: agentic_layer_sdk_adk-0.8.1.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentic_layer_sdk_adk-0.8.1.tar.gz
Algorithm Hash digest
SHA256 92dddc51c070d0ab8b8f17177c8496556df35de156c8ba73eea43e4bd864f18a
MD5 dc54d5307e6ad3c909e5453e58e46ca8
BLAKE2b-256 bae9ebcdb0a602b6baf0fa337a52bfc800d9476ae7ef349af324574af8882cd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_layer_sdk_adk-0.8.1.tar.gz:

Publisher: publish.yml on agentic-layer/sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentic_layer_sdk_adk-0.8.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agentic_layer_sdk_adk-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c8a60ece1d0b649f1176a2633936ffdd61e3b8d2cf2acf69eeda82ddc00ea2b
MD5 00c5516872baf45b23f5d00bd538f11a
BLAKE2b-256 7cc5bc60010514e8d6ffc0b2c20f931603ed01899b059b0e0af7d4b69d4a56ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_layer_sdk_adk-0.8.1-py3-none-any.whl:

Publisher: publish.yml on agentic-layer/sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page