Skip to main content

rends-agent-sdk

Runtime interception SDK for AI agent governance. Wraps agent tool calls with synchronous policy enforcement via the AgentCompliant/Rends platform.

Install

pip install rends-agent-sdk

# With framework adapters
pip install "rends-agent-sdk[langchain]"
pip install "rends-agent-sdk[crewai]"
pip install "rends-agent-sdk[autogen]"
pip install "rends-agent-sdk[all]"

Quick Start

from rends_sdk import RendsClient, RendsClientConfig, ActionContext

async with RendsClient(RendsClientConfig(
    api_key="ac_live_...",
    org_id="your-org-uuid",
    agent_id="your-agent-uuid",
    mode="enforce",  # "enforce" | "monitor" | "dry-run"
)) as client:
    result = await client.govern(
        ActionContext(
            action_type="database_query",
            action_name="select_users",
            resource_type="customer_records",
            input_summary="SELECT * FROM users WHERE region = us-east-1",
        ),
        tool_fn=lambda params: db.query("SELECT * FROM users"),
    )
    # result.allowed, result.status, result.result, result.check.violations

LangChain Integration

from rends_sdk.adapters import govern_langchain_tool

governed = govern_langchain_tool(client, search_tool, resource_type="web_search")
agent = create_react_agent(llm, tools=[governed])

CrewAI Integration

from rends_sdk.adapters import govern_crewai_tool

search = SerperDevTool()
governed = govern_crewai_tool(client, search, resource_type="web_search")
agent = Agent(tools=[governed], ...)

AutoGen Integration

from rends_sdk.adapters import govern_autogen_tool

def search_web(query: str) -> str:
    return tavily.search(query)

governed = govern_autogen_tool(client, search_web, "search_web", resource_type="web_search")
agent.register_function(function_map={"search_web": governed})

Enforcement Modes

Mode Behavior
enforce BLOCK → raises GovernanceBlockError, PASS/WARN → executes
monitor All decisions logged but never block execution
dry-run Policy checked, nothing executed, nothing logged

Pre-flight Check

check = await client.check_policy(ActionContext(
    action_type="data_export",
    action_name="export_pii",
    resource_type="user_data",
    input_summary="Export all PII to CSV",
))
# check.allowed, check.status, check.violations

Pipeline Stages

The SDK runs a 5-stage pipeline on every govern() call:

  1. beforeAction — validates action shape, computes input hash
  2. policyCheck — calls POST /v1/compliance/check-action synchronously
  3. decisionReturn — parses { allowed, status, violations, warnings }
  4. executionGate — executes tool if allowed, raises if blocked (in enforce mode)
  5. telemetryEmit — logs to POST /v1/telemetry/ingest (hash-chained audit trail)

Configuration

Field Type Default Description
api_key str required API key (ac_live_...)
org_id str required Organization UUID
agent_id str required Agent UUID
endpoint str https://agentcompliant.ai/api API base URL
mode str enforce Enforcement mode
timeout_ms int 10000 Policy check timeout
retries int 2 Retry count for transient failures
fail_open bool False Allow action if policy check fails

License

MIT

Release files for rends-agent-sdk 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rends-agent-sdk 1.0.0
File Size Uploaded
rends_agent_sdk-1.0.0.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rends-agent-sdk 1.0.0
File Interpreter ABI Platform
rends_agent_sdk-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.5 kB

Release files / rends_agent_sdk-1.0.0.tar.gz

Download URL rends_agent_sdk-1.0.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8e6752351cf1f93d7d66bf773038b0257554bbff150647fcfde1e65b38acbbef
BLAKE2b-256 checksum
How to use checksums
75b6fa2de49e8ab0d2237c479ab7b7267198d84d5c9e0f82739494369efb17a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / rends_agent_sdk-1.0.0-py3-none-any.whl

Download URL rends_agent_sdk-1.0.0-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ec7eec1a63970cd887d49b86198efe863e191192606692a9e1591d02bb9d402
BLAKE2b-256 checksum
How to use checksums
49c54e01f9bc7aa7da83fbd93c1ccf19513e7557a69c7b4759a8f83cfd66bf4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release 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