Pre-tool intervention · PyPI 0.1.1 · Alpha · Apache-2.0
strands-acgs for Strands Agents.
Implements a Strands Agents intervention handler that checks tool arguments against an ACGS-Lite constitution before execution.
Package Specification · Inspected HEAD f2aa974
- Framework maintainer
- AWS · strandsagents.com
- Upstream repository
- strands-agents/harness-sdk
- PyPI release
- strands-acgs==0.1.1
- Python requirement
- >=3.10
- Framework constraint
- strands-agents>=1.43.0
- Governance engine pin
- acgs-lite>=3.0.1,<4
- Integration mechanic
- Pre-tool veto / intervention hook
- Hook entry point
- ACGSIntervention.before_tool_call
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
pip install "strands-acgs==0.1.1"Python · Strands Agents integration
src/strands_acgs/intervention.py#L23from strands import Agent
from strands_acgs import ACGSIntervention
agent = Agent(
model=model,
tools=[send_email],
interventions=[ACGSIntervention()],
)02 · Verdict & Review Mapping
How ACGS-Lite verdicts map to Strands Agents.
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 the native Strands Proceed intervention action.
Returns the native Strands Deny action with the violated ACGS rule explanation.
Returns the native Strands Confirm action to trigger the Strands interrupt/confirmation flow.
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 · strands-acgs
src/strands_acgs/intervention.py#L23 ↗ACGSInterventionGovernanceDecisionToolCallFormatterVerdictformat_tool_callPrimary hook surface: ACGSIntervention.before_tool_call. 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 strands-acgs into an evaluation workflow.
- 01
Requires strands-agents>=1.43.0 where the InterventionHandler protocol was introduced.
- 02
Does not wrap the agent or tools directly; only tool calls routed through the agent's intervention pipeline are evaluated.
- 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.