Pre-tool plugin callback · PyPI 0.1.1 · Alpha · Apache-2.0
adk-acgs for Google ADK.
Registers an ADK plugin callback that evaluates proposed tool calls before the Google Agent Development Kit runner invokes the tool.
Package Specification · Inspected HEAD e8f75cf
- Framework maintainer
- Google · adk.dev
- Upstream repository
- google/adk-python
- PyPI release
- adk-acgs==0.1.1
- Python requirement
- >=3.10
- Framework constraint
- google-adk>=2.0.0,<3
- Governance engine pin
- acgs-lite>=3.0.1,<4
- Integration mechanic
- Pre-tool veto / intervention hook
- Hook entry point
- ACGSPlugin.before_tool_callback
01 · Local Setup & Quickstart
Attach governance to one tool-calling agent.
Install the pinned release from PyPI alongside acgs-lite>=3.0.1,<4. Rule evaluation uses deterministic keyword and regex matching locally in Python—no external model or network call is made by the governance check.
Shell · PyPI installation
Alphapip install "adk-acgs==0.1.1"Python · Google ADK integration
src/adk_acgs/plugin.py#L34from google.adk.agents import LlmAgent
from google.adk.apps import App
from adk_acgs import ACGSPlugin
root_agent = LlmAgent(
name="assistant",
model="gemini-flash-latest",
instruction="Help the user.",
)
app = App(name="my_app", root_agent=root_agent, plugins=[ACGSPlugin()])02 · Verdict & Review Mapping
How ACGS-Lite verdicts map to Google ADK.
When a tool call is proposed, the adapter formats the tool name and arguments via format_tool_call and evaluates them against the configured Constitution. Blocking rules always take precedence over review rules.
Returns None from before_tool_callback so the ADK Runner proceeds with tool execution.
Returns {'error': "Tool call '<name>' was not executed. <reason>"} which ADK surfaces as the tool result.
Requests ADK tool confirmation (tool_context.request_confirmation) or invokes a custom ReviewHandler.
03 · Public API Surface
Exported symbols and source entry points.
Each adapter keeps its public surface minimal and re-exports the shared GovernanceDecision, Verdict, and ToolCallFormatter types alongside the framework-specific hook or middleware class.
__all__ exports · adk-acgs
src/adk_acgs/plugin.py#L34 ↗ACGSPluginPLUGIN_NAMEBeforeToolCallbackReviewHandlerGovernanceDecisionToolCallFormatterVerdictformat_tool_callPrimary hook surface: ACGSPlugin.before_tool_callback. Custom ToolCallFormatter functions may be supplied if your tool arguments require custom canonical serialization before rule matching.
04 · Scope & Bypass Boundaries
What this adapter does and does not cover.
Verify these framework-specific boundaries when integrating adk-acgs into an evaluation workflow.
- 01
Register ACGSPlugin on the ADK App so plugin callbacks run before agent-level callbacks across all managed sub-agents.
- 02
Google ADK 2.12+ requires Python 3.11+.
- 03
In the current
0.1.xadapter series, rule evaluation runs throughacgs-lite'sToolCallGovernorpath. If your workflow requiresSignedReceipt,ExecutionGrant, or SQLiteEffectStorereservations, wire those contracts explicitly at the tool executor boundary.
Put one real workflow under your control.
Choose one tool. Define what it may do. Inspect what happens when a request crosses the boundary.