Google ADK Governance Adapter — PolicyEvaluator implementation ready for testing #302
Replies: 4 comments
-
|
Thanks @imran-siddique — this is fast execution, and the fact that you built it around the On your three questions: 1. Interface alignment — the lifecycle mapping table looks right.
2. Additional hooks — the four you have (before/after for tool and agent) cover the critical path. Two additions worth considering:
3. Packaging — standalone PyPI package. It decouples your release cycle from the toolkit's, and makes adoption easier for teams that want ADK governance without the full AGT stack. Same reasoning behind keeping the GovernancePlugin in google/adk-python-community rather than bundling it. One concrete suggestion: if both Happy to test once it's on PyPI. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @sunilp -- really thoughtful feedback. Let me address each point: 1. Interface alignment
2. Additional hooks -- great suggestions:
3. Packaging -- agreed, standalone PyPI package (adk-agentmesh). On PolicyDecision schema alignment -- key insight. If we align return types, any PolicyEvaluator backend (APS, AGT, YAML, LDP) becomes a drop-in replacement. Happy to adjust fields to match what you and @aeoess have. Will publish to PyPI and share here once it's up. |
Beta Was this translation helpful? Give feedback.
-
|
@imran-siddique — congrats on shipping this. Concrete answers to your three questions: 1. PolicyEvaluator interface alignment Yes, it aligns well. I just posted APS's full PolicyDecision schema on google/adk-python#4910 for comparison. The core fields map cleanly:
The one structural difference: APS wraps the decision in an Ed25519 signature as part of a 3-artifact chain (intent → decision → receipt). For the common interface, I proposed a minimal 2. Additional lifecycle hooks Two suggestions:
3. Standalone PyPI Standalone. Three reasons: (a) composability — users should be able to Would be interested in testing APS as an alternative backend for your |
Beta Was this translation helpful? Give feedback.
-
|
Great to see a governance adapter for ADK. The PolicyEvaluator protocol is the right abstraction — declarative YAML policies evaluated before tool execution is cleaner than embedding governance logic in every agent. From running governance middleware for 31 agents in production (KinthAI, built on OpenClaw): The Most-Triggered Policy: Budget Enforcement In our deployment, budget checks outnumber access-control checks 10:1. Every tool call gets: "does this agent have enough remaining budget?" We use pessimistic allocation (deduct ceiling before execution, credit back after). This turns economic limits into hard governance boundaries — no amount of clever prompting bypasses If the PolicyEvaluator supports custom policy types, budget enforcement should be a first-class built-in: policies:
- type: budget_enforcement
mode: pessimistic
hierarchy: [namespace, user, agent, conversation]Details: Your AI Agent Needs a Wallet Delegation Chain Context in Policy Evaluation For multi-agent ADK deployments, the policy engine needs the full delegation chain (parent → child → grandchild) to evaluate capability narrowing. A sub-agent spawned by a high-trust orchestrator should have different policies than the same agent spawned by an untrusted external caller. The PolicyEvaluator should accept a delegation chain hash alongside the tool call context. Behavioral Drift Detection Beyond per-action static policies, we track KL divergence on each agent's action distribution. An agent that shifts from 90% reads to 50% writes triggers an alert even when every action passes policy. The audit trail from the governance adapter is the perfect data source for this. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Following the discussion on google/adk-python#4764 about governance callbacks for ADK agents, we've shipped an initial implementation.
What's new
New package: adk-agentmesh (source)
Implements the PolicyEvaluator protocol from @sunilp's GovernancePlugin proposal (#4897), backed by our toolkit's policy engine:
ADK Lifecycle Mapping
Quick Start
Sample policy: examples/policies/adk-governance.yaml
Looking for feedback
cc @sunilp @aeoess @razashariff — would love your input since you drove the design discussion on the ADK side.
33 tests passing. Community preview — feedback welcome.
Beta Was this translation helpful? Give feedback.
All reactions