v0.1.0 — Local-first, zero dependencies

Boundwr Python SDK

Agent governance that runs anywhere. Register agents, enforce policies, log every action, and export compliance reports — all stored locally as JSON. No server required.

Installation

Up and running in seconds

Install from source

$ pip install boundwr

Requires Python 3.10+. Zero external dependencies.

Download archive

boundwr-0.1.0.tar.gz16 KB

Extract and run pip install . inside the directory.

Quick start

Five minutes to governance

Register agents, define policies, log actions, and export compliance reports — all running locally with zero configuration.

quickstart.py
from boundwr import Boundwr

# Initialize — all data stored locally in .boundwr/
client = Boundwr(project="my-project")

# 1. Register an agent
agent = client.register_agent(
    name="support-bot",
    description="Handles tier-1 support tickets",
    permissions=["read_tickets", "send_replies"],
    owner="cs-team"
)

# 2. Define a policy — deny dangerous actions
client.define_policy("no-delete", rules=[
    {  
        "action":"delete_user",
        "deny": True,
        "message":"Agents cannot delete users"
    }
])

# 3. Check before acting
result = client.check_policy(agent["id"], "delete_user")
if not result["allowed"]:
    print("Blocked!", result["violations"])

# 4. Log actions to the audit trail
client.log_action(agent["id"], "send_reply", details={  "ticket": "T-1234" })

# 5. Export compliance report
report = client.export_compliance_report()
print(report["summary"])

Features

Everything you need for agent governance

Pure Python. No external dependencies. No server. Just import and go.

Agent Registry

Register agents with names, descriptions, permissions, and ownership. Every agent gets a UUID and timestamp.

Policy Engine

Define deny rules for dangerous actions. Check policies before execution and get detailed violation reports.

Audit Logging

Append-only, immutable log of every action with timestamps, agent IDs, status, and details. ISO 8601 everywhere.

Delegation Tracking

Record agent-to-agent delegations with reasons and permission grants. Full chain of authority.

Compliance Reports

Export JSON or CSV reports with agent inventory, full audit log, policy list, and status breakdowns.

Thread-safe

All file operations are guarded by a threading lock. Safe for multi-threaded applications and concurrent agents.

Storage

Local-first, transparent

All data is stored as plain JSON files in a .boundwr/ directory. No database, no cloud, no lock-in. Inspect and version-control your governance data.

File
Contents
agents.json
Registered agents with UUIDs, permissions, ownership
audit_log.json
Append-only action log with timestamps and details
policies.json
Defined policies with deny rules
delegations.json
Agent-to-agent delegation chain records

API Reference

Every method, documented

Boundwr(project, api_key=None, storage_dir=".boundwr")

Initialize the client. api_key reserved for future cloud mode.

register_agent(name, description, permissions, owner)

Register a new agent. Returns dict with generated UUID and timestamps.

list_agents()

Return all registered agents as a list of dicts.

log_action(agent_id, action, details=None, status="success")

Append an action to the immutable audit log.

log_delegation(from_agent, to_agent, reason, permissions_granted)

Record a delegation between agents with permissions granted.

define_policy(name, rules)

Define a policy. Each rule needs action (str) and deny (bool).

check_policy(agent_id, action)

Check if an action is allowed. Returns {allowed: bool, violations: [...]}.

get_audit_trail(agent_id=None, since=None)

Query audit entries with optional agent and time filters.

export_compliance_report(format="json")

Generate a full compliance report in JSON or CSV format.

Start governing
your agents today.

Download the Boundwr SDK, register your first agent, and have a compliance report ready in five minutes.