Community extensions for the Strands Agents SDK — session managers and plugins in one package with optional extras.
Install the base package:
pip install strands-agents-extensionsInstall with specific extras:
# SQLite session manager
pip install strands-agents-extensions[sqlite]
# All plugins
pip install strands-agents-extensions[plugins]
# All session managers
pip install strands-agents-extensions[session-managers]
# Everything
pip install strands-agents-extensions[all]from strands_agents_extensions.session_managers import SQLiteSessionManager
# Create a SQLite-backed session manager
session_manager = SQLiteSessionManager(
session_id="chat-session-001",
db_path="sessions.db",
)
# Use with Strands Agent
agent = Agent(
session_manager=session_manager,
# ... other config
)from strands_agents_extensions.plugins import BudgetPlugin, RateLimiterPlugin
# Add budget control to your agent
budget_plugin = BudgetPlugin(max_cost_per_session=10.0)
# Add rate limiting
rate_limiter = RateLimiterPlugin(model_calls_per_minute=60)
agent = Agent(
plugins=[budget_plugin, rate_limiter],
# ... other config
)| Extra | Description | Dependencies |
|---|---|---|
sqlite |
SQLite session manager | None (stdlib) |
budget |
Budget control plugin | litellm<=1.82.6 |
rate-limiter |
Rate limiting plugin | None |
redaction |
PII redaction plugin | None |
fallback |
Model fallback plugin | None |
session-managers |
All session managers | sqlite |
plugins |
All plugins | budget + rate-limiter + redaction + fallback |
all |
Everything | session-managers + plugins |
- SQLiteSessionManager: Local SQLite-backed session storage with full conversation history
- BudgetPlugin: Track and enforce token budget limits
- RateLimiterPlugin: Control request rate to avoid API throttling
- MessageRedactionPlugin: Automatically redact PII from messages
- ModelFallbackPlugin: Implement model fallback strategies on failures
This project uses Hatch for environment management and pytest for testing.
# Install Hatch if you don't have it
pip install hatch
# Run all tests
hatch run test
# Run with verbose output
hatch run test -v
# Run a specific test file
hatch run test tests/plugins/test_budget.py
# Run tests matching a pattern
hatch run test -k test_budgetIf you already have a virtual environment with dev dependencies installed, you can run pytest directly:
pytest tests/Apache-2.0
Contributions welcome! This is a community-maintained package for extending the Strands Agents SDK.