SidClaw governance integration for LangChain — policy evaluation, human approval, and audit trails for AI agent tools
Project description
langchain-sidclaw
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_sidclaw-0.1.0.tar.gz.
File metadata
- Download URL: langchain_sidclaw-0.1.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
316d38c3e1e66497f455f9fab48e2d3e57450fd6e55ea4aac4e07280d9f36371
|
|
| MD5 |
1c0fda295bf607406f0321234d647a5e
|
|
| BLAKE2b-256 |
493a2f026baa9478d4667b2260c5a7c285ffa6a97fb551a01db6f0edb9e73740
|
File details
Details for the file langchain_sidclaw-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_sidclaw-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e302d8d45c048c5fd96df0ec466ac57dd112522aed42a294a4909898057fc91
|
|
| MD5 |
4ffeeba648749f3d59b652663cc703c8
|
|
| BLAKE2b-256 |
dad027a7b1223eb970801537aa323a3d6134c4cbc2a5e1af5764162aeaad0a1a
|