Skip to main content

langchain-deepkeep

LangChain middleware for the DeepKeep AI Firewall.

Installation

pip install langchain-deepkeep

Quick start

import os

from langchain.agents import create_agent
from langchain_deepkeep import DeepKeepMiddleware

agent = create_agent(
    model="gpt-5.5",
    tools=[],
    middleware=[
        DeepKeepMiddleware(
            api_key=os.environ["DEEPKEEP_API_KEY"],
            base_url=os.environ["DEEPKEEP_BASE_URL"],
            pre_model="input-firewall-id",
            post_model="output-firewall-id",
        )
    ],
)

pre_model and post_model are DeepKeep firewall IDs. Each value is sent to the matching moderation endpoint as the model field.

Download files

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

Source Distribution

langchain_deepkeep-0.2.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

langchain_deepkeep-0.2.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file langchain_deepkeep-0.2.0.tar.gz.

File metadata

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

File hashes

Hashes for langchain_deepkeep-0.2.0.tar.gz
Algorithm Hash digest
SHA256 95c07bc361cf46315be2d162ecd9f7875eaf304eef6378c197e17af3df34d52e
MD5 40e47fb8b434e9f472eae304a692f32f
BLAKE2b-256 9cd326278510795bc20115a8379b6c7396cadfd2d0b240ad11acf6c4747cda20

See more details on using hashes here.

File details

Details for the file langchain_deepkeep-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_deepkeep-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2ad9f0d4a10052adee9d25c53d85e82d854953a0445699086ae3a1b776590b8
MD5 9230a98f6f6c3d8431f02813381cbfd8
BLAKE2b-256 d497ec30f3c1f8e357f23bd841b769a07bd837bc4d6618100ff4ef5ff34030ab

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page