This release is a pre-release and may not be stable for production use.
ppx-google-adk
Google Agent Development Kit (ADK) integration for the Preference Profile Exchange (PPX).
Install
pip install ppx-google-adk
Requires Python 3.11+. Published version: 0.1.0a1 (PyPI).
Alpha, tracking a draft specification. Expect breaking changes. The version is
0.1.0a1on PyPI and0.1.0-alpha.1on npm — the same release in each ecosystem's required format.
Use PPX from an ADK agent
Two complementary patterns.
Pattern 1 — Inject preferences as context at session start
from ppx_client import PpxClient
from ppx_google_adk import fetch_preference_context
from google.adk.agents import LlmAgent
client = PpxClient("https://api.provider.app")
preferences = fetch_preference_context(
client,
grant_token=my_grant_token,
context={"climate": "hot_humid"},
requested_namespaces=["core", "fragrance"],
)
agent = LlmAgent(
name="scent_advisor",
model="gemini-2.0-flash",
instruction=(
"You recommend fragrances. Use the user's preferences below when suggesting.\n\n"
+ preferences
),
)
The agent sees a deterministic, grant-scoped block of claims — no tool call needed — and the model can cite specific preferences in its output.
Pattern 2 — Let the agent call PPX on demand
from google.adk.agents import LlmAgent
from google.adk.tools import FunctionTool
from ppx_google_adk import build_preference_tool
lookup = build_preference_tool(client, grant_token=my_grant_token)
agent = LlmAgent(
name="scent_advisor",
model="gemini-2.0-flash",
instruction="When relevant, call lookup_user_preference to check the user's preferences.",
tools=[FunctionTool(lookup)],
)
Every tool invocation is grant-scoped. The agent can never see claims the user hasn't authorized; out-of-scope keys are silently redacted by the provider.
Combining both patterns
For long-running agents, inject a small baseline preference context (pattern 1) and register the tool (pattern 2) so the agent can refine its understanding with targeted queries without re-reading the full profile on every turn.
License
Apache-2.0.
Metadata
Release files for ppx-google-adk 0.1.0a4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ppx_google_adk-0.1.0a4.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ppx_google_adk-0.1.0a4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.9 kB
Release files / ppx_google_adk-0.1.0a4.tar.gz
| Download URL | ppx_google_adk-0.1.0a4.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16c4c3a42d153162957d8017ec1766ec362765d3b4a6f74387469d344bf66a47
|
|
BLAKE2b-256 checksum How to use checksums |
83cb39de117c5bcffbf7601ad3ed8b7146b80e2a912c581941b66e4394c09db2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / ppx_google_adk-0.1.0a4-py3-none-any.whl
| Download URL | ppx_google_adk-0.1.0a4-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43bedf25db3f72de450a5451b85f1f716cf4c618e2193cf5d77734764faea7a5
|
|
BLAKE2b-256 checksum How to use checksums |
bb4657ce9b0916c0b3a204072db60c341a244025418fe080c2150ac879bf7fcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|