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
Status (2026-11-05): Strands #3996 merged. Catalog entry below uses the current canonical repository URLs:
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/deepkeep-integrations/tree/main/integrations/strands
docsUrl: https://github.com/Deepkeepai/deepkeep-integrations/tree/main/integrations/strands#readme
addedDate: 2026-08-26
maintainedBy: partner
Metadata
Release files for strands-deepkeep 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| strands_deepkeep-0.1.1.tar.gz | 7.7 kB | With provenance | Details for strands_deepkeep-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| strands_deepkeep-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for strands_deepkeep-0.1.1-py3-none-any.whl |
Total release size: 13.8 kB
Release files / strands_deepkeep-0.1.1.tar.gz
| Download URL | strands_deepkeep-0.1.1.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a7498545477e3d0619d4a94b58d8a2ec140cf099e8a22012e8fdfd4db553711
|
|
BLAKE2b-256 checksum How to use checksums |
81b589714847c4617d6224ccde5552c8383d67341577750f4e5fbed1aa7e2267
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logRelease files / strands_deepkeep-0.1.1-py3-none-any.whl
| Download URL | strands_deepkeep-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71ea7166939f3f72d6dac533cf83866e44b9b4ff519a95185a759c939edff8df
|
|
BLAKE2b-256 checksum How to use checksums |
c04352e6321e51e3ab9a1973dd76ed9bf5fc43d2e6c68d2eb02b67e578c29004
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logSecurity for strands-deepkeep 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for strands_deepkeep-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.