Skip to main content

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

  • allow and alert decisions let the invocation continue.
  • block decisions cancel the invocation before the model or clear blocked model output after the model call.
  • redact and modify decisions replace the latest user text before the invocation or replace generated assistant text after the model call.
  • DeepKeep API decisions are stored in invocation_state as deepkeep_pre and deepkeep_post for 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strands_deepkeep-0.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strands_deepkeep-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file strands_deepkeep-0.1.0.tar.gz.

File metadata

  • Download URL: strands_deepkeep-0.1.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.5

File hashes

Hashes for strands_deepkeep-0.1.0.tar.gz
Algorithm Hash digest
SHA256 febe11f8dfc77f2157a27a49d276a056c8a8bd41fc8b19f5ab8a88dfff32d2d3
MD5 bd2373739331de96cfd3d2544339d3bf
BLAKE2b-256 0500ffd05a4d34243e9fe9dd78efd89bb44eb981037229d1115ff0486b128ffe

See more details on using hashes here.

File details

Details for the file strands_deepkeep-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for strands_deepkeep-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e9969bff83423774c325b0573af1113ac9a56920d025755eab59ac9860b1c03
MD5 f63281ac75922062344569b8e0af7485
BLAKE2b-256 49779ed408c866c72105f708f4d47c30e886eac85c4129d5db1e6997ae8aff6c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page