Skip to content

Plugins

Plugins change the typical behavior of an agent. They let you introduce concepts like Skills, steering, or other behavioral modifications into the agent loop by composing on the low-level primitives the Agent class exposes—model, system_promptsystemPrompt, messages, tools, and hooks. Attach the built-in plugins the SDK ships, or write your own.

The smallest useful setup passes a plugin to an agent’s plugins list. The agent runs the plugin’s logic as part of its loop:

from datetime import datetime, timezone
from strands import Agent
from strands.vended_plugins.context_injector import ContextInjector
agent = Agent(
plugins=[
ContextInjector(lambda context: f"<now>{datetime.now(timezone.utc).isoformat()}</now>"),
],
)
agent("What time is it right now?")

From here you attach the plugins your application needs, or build your own.

New to plugins? Attach a built-in one from the grid above—Skills, Context Offloader, Context Injector, or GoalLoop—and see it change the agent’s behavior.

Ready to write your own? Build a custom plugin walks through registering hooks and tools, managing state, and async initialization. Hooks covers how the hook system works, and Hook events is the reference for every lifecycle event a plugin can react to.