High-level integration guide for adding Agent Control safety guardrails to AWS Strands agents using plugins and steering. This keeps your agent code unchanged while enforcing centralized policies.
Agent Control integrates with Strands using two native extension points:
AgentControlPluginfor deny-style enforcement at model and tool stagesAgentControlSteeringHandlerfor steer-style guidance using StrandsGuide()
Use the plugin for hard blocks and the steering handler for soft guidance. You can run both together.
pip install agent-control-sdk[strands-agents]Use the plugin to enforce controls before and after model calls, tool calls, node transitions, and invocation.
from agent_control.integrations.strands import AgentControlPlugin
from strands import Agent
import agent_control
agent_control.init(agent_name="my-agent")
plugin = AgentControlPlugin(
agent_name="my-agent",
event_control_list=[BeforeToolCallEvent, AfterToolCallEvent],
enable_logging=True,
)
agent = Agent(
name="my_agent",
model=model,
tools=[...],
plugins=[plugin],
)Use the steering handler to convert steer actions into Guide() instructions for the next LLM call.
from agent_control.integrations.strands import AgentControlSteeringHandler
from strands import Agent
import agent_control
agent_control.init(agent_name="banking-agent")
steering_handler = AgentControlSteeringHandler(
agent_name="banking-agent",
enable_logging=True,
)
agent = Agent(
name="banking_agent",
model=model,
tools=[...],
plugins=[steering_handler],
)- Multi-stage protection across model calls, tool calls, and node transitions
- Centralized policy updates without redeploying agents
- Hard blocks and soft guidance depending on control action
- Zero code changes to existing Strands tools and workflows
ControlViolationErrorfor hard blocks (deny)ControlSteerErrorfor steer actions (plugin only)
from agent_control import ControlViolationError
try:
result = await agent.invoke_async("Send email with SSN 123-45-6789")
except ControlViolationError as exc:
print(f"Blocked by: {exc.control_name}")Read more about this integration and follow through examples:
- Docs: https://docs.agentcontrol.dev/integrations/strands
- Examples: ../../../../../../examples/strands_agents/