Skip to content

Parameter Manager

Supported in ADKPython v1.31.0Experimental

The Parameter Manager integration provides a small client for retrieving rendered parameter values from Google Cloud Parameter Manager. Use it when your agent needs configuration values that should be managed outside the agent process.

Initialize the client

If you do not pass credentials explicitly, ParameterManagerClient uses default Google Cloud credentials.

from google.adk.integrations.parameter_manager.parameter_client import (
    ParameterManagerClient,
)

client = ParameterManagerClient()

You can also initialize the client with a service account JSON string:

client = ParameterManagerClient(
    service_account_json='{"type": "service_account", "...": "..."}',
)

Or with an existing authorization token:

client = ParameterManagerClient(auth_token="ya29...")

To use a regional Parameter Manager endpoint, pass location:

client = ParameterManagerClient(location="us-central1")

Retrieve a parameter

Call get_parameter with the full parameter version resource name. Use versions/latest when you want the latest version.

value = client.get_parameter(
    "projects/my-project/locations/global/parameters/my-param/versions/latest"
)

The method returns the rendered parameter payload as a string.

Authentication notes

Provide only one of service_account_json or auth_token. If neither is provided, the client attempts to use Application Default Credentials with the https://www.googleapis.com/auth/cloud-platform scope.

For broader guidance on credential handling in ADK agents, see Authenticating with Tools.