strands-deepkeep
Strands Agents hook provider for the DeepKeep AI Firewall.
DeepKeep runs before a Strands invocation reaches the model and after the model returns. It can block unsafe content, pass safe content through, and apply redacted or modified text returned by DeepKeep.
Installation
pip install strands-deepkeep
Quick start
import os
from strands import Agent
from strands_deepkeep import DeepKeepGuardrail
agent = Agent(
plugins=[
DeepKeepGuardrail(
api_key=os.environ["DEEPKEEP_API_KEY"],
base_url=os.environ["DEEPKEEP_BASE_URL"],
pre_model="input-firewall-id",
post_model="output-firewall-id",
)
]
)
result = agent("Summarize this customer support request")
pre_model and post_model are DeepKeep firewall IDs. Each value is sent to the matching moderation endpoint as the model field.
Behavior
allowandalertdecisions let the invocation continue.blockdecisions cancel the invocation before the model or clear blocked model output after the model call.redactandmodifydecisions replace the latest user text before the invocation or replace generated assistant text after the model call.- DeepKeep API decisions are stored in
invocation_stateasdeepkeep_preanddeepkeep_postfor audit and logging.
Environment
You can pass credentials directly or set:
export DEEPKEEP_API_KEY="dk-..."
export DEEPKEEP_BASE_URL="https://your-deepkeep-instance.example"
Strands catalog entry
Submit the integration to Strands by adding site/src/content/catalog/strands-deepkeep.yaml to strands-agents/harness-sdk:
name: strands-deepkeep
description: DeepKeep AI Firewall guardrails for Strands Agents using lifecycle hooks around model input and output.
integrationType: plugin
languages:
python:
package: strands-deepkeep
github: https://github.com/Deepkeepai/strands-deepkeep
docsUrl: https://github.com/Deepkeepai/strands-deepkeep#readme
addedDate: 2026-08-26
maintainedBy: partner
Metadata
Release files for strands-deepkeep 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| strands_deepkeep-0.1.0.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| strands_deepkeep-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.1 kB
Release files / strands_deepkeep-0.1.0.tar.gz
| Download URL | strands_deepkeep-0.1.0.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
febe11f8dfc77f2157a27a49d276a056c8a8bd41fc8b19f5ab8a88dfff32d2d3
|
|
BLAKE2b-256 checksum How to use checksums |
0500ffd05a4d34243e9fe9dd78efd89bb44eb981037229d1115ff0486b128ffe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / strands_deepkeep-0.1.0-py3-none-any.whl
| Download URL | strands_deepkeep-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e9969bff83423774c325b0573af1113ac9a56920d025755eab59ac9860b1c03
|
|
BLAKE2b-256 checksum How to use checksums |
49779ed408c866c72105f708f4d47c30e886eac85c4129d5db1e6997ae8aff6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|