Skip to main content

SidClaw governance integration for LangChain — policy evaluation, human approval, and audit trails for AI agent tools

Project description

langchain-sidclaw

PyPI version License: Apache-2.0

SidClaw governance integration for LangChain — policy evaluation, human approval, and audit trails for AI agent tools.

What it does

Wraps your LangChain tools with governance. Before any tool executes:

  • Allowed actions run immediately
  • High-risk actions require human approval (reviewer gets a notification)
  • Prohibited actions are blocked before execution
  • Every decision is logged with a tamper-proof audit trail

Installation

pip install langchain-sidclaw

Quick Start

Option 1: Enforce policies (recommended)

from langchain_sidclaw import govern_tools
from sidclaw import SidClaw

client = SidClaw(
    api_key="ai_...",
    base_url="https://api.sidclaw.com",
    agent_id="your-agent-id",
)

# Wrap your existing tools — no changes to tool code
governed = govern_tools(my_tools, client=client, data_classification="confidential")

# Use governed tools in your agent
agent = create_tool_calling_agent(llm, governed, prompt)

Option 2: Monitor only (audit without blocking)

from langchain_sidclaw import GovernanceCallbackHandler

handler = GovernanceCallbackHandler(client=client)
agent = create_tool_calling_agent(llm, tools, prompt, callbacks=[handler])
# Every tool call is logged to SidClaw, but nothing is blocked

Configure policies

Create policies in the SidClaw dashboard or via API. Example policy effects:

Policy Effect Behavior
allow Tool executes immediately
approval_required Blocks until a human approves in the dashboard
deny Raises ActionDeniedError, tool never executes

Links

Project details


Download files

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

Source Distribution

langchain_sidclaw-0.1.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

langchain_sidclaw-0.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file langchain_sidclaw-0.1.1.tar.gz.

File metadata

  • Download URL: langchain_sidclaw-0.1.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for langchain_sidclaw-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c0c596dfe457461bacec0c99aae43e7fa6583c91f9a0364355f3e09d83b9de22
MD5 2a920666f42dab8f7b945a7df83bd365
BLAKE2b-256 0b4731eb1855b2d0e78111fb34bb63fd855bccc2f6a05ec25c2d53aab803c63b

See more details on using hashes here.

File details

Details for the file langchain_sidclaw-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_sidclaw-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e70530a7cc5c06198759e42cfe0cf943ceba33d3c65291bd7b3ee3fbf30ce2b5
MD5 fe042c00a86bd8adab83fb6a44d6e22f
BLAKE2b-256 061153e9888c8f0bdbc230ee7e92c5a51a9e23a63573203395d6c7b398122fd0

See more details on using hashes here.

Supported by

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