Metadata-Version: 2.4
Name: praxel
Version: 0.1.4
Summary: Runtime control plane for AI agents. Vendor-neutral SDK for signed audit logs, policy enforcement, and continuous compliance.
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: anthropic>=0.40
Requires-Dist: httpx>=0.27
Requires-Dist: openai>=1.50
Requires-Dist: pydantic>=2.0
Requires-Dist: pynacl>=1.5
Description-Content-Type: text/markdown

# Praxel

[![PyPI version](https://img.shields.io/pypi/v/praxel.svg)](https://pypi.org/project/praxel/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![CI](https://img.shields.io/github/actions/workflow/status/praxel-dev/praxel/sdk-test.yml?branch=main)](https://github.com/praxel-dev/praxel/actions)

Praxel — the runtime control plane for AI agents. Wrap any agent in 3 lines, get signed audit logs and policy enforcement.

## Install

```bash
pip install praxel
```

```bash
uv add praxel
```

## Quickstart

```python
from praxel import Praxel, Policy, PraxelDeniedException

def agent(prompt: str, *, tool_name: str, tool_input: dict):
    return f"Executed {tool_name} with {tool_input}"

policies = [
    Policy(
        policy_id="limit-1000",
        name="Dollar Limit",
        kind="dollar_limit",
        config={"field_path": "amount", "max_amount": 1000.0},
        enabled=True,
    )
]

wrapped = Praxel.wrap(agent, workspace="demo-workspace", policies=policies)
print(wrapped("Pay vendor", tool_name="transfer_money", tool_input={"amount": 500.0}))
```

## What It Does

- Signed audit logs for every tool call (tamper-evident event trail).
- Runtime policy enforcement (allow, deny, require approval).
- Continuous compliance evidence for investigations, audits, and controls.

## Supported Providers

- Anthropic
- OpenAI
- Google
- Custom agents

## Before / After

### Before: basic Claude agent, no governance

```python
from anthropic import Anthropic

client = Anthropic(api_key="...")

def transfer_money(amount: float, to_account: str) -> str:
    return f"Transferred ${amount:.2f} to {to_account}"

# Tool call executes directly.
result = transfer_money(5000, "acct-risky-001")
```

### After: wrapped with Praxel

```python
from praxel import Praxel, Policy

policies = [
    Policy(
        policy_id="limit-1000",
        name="Dollar Limit",
        kind="dollar_limit",
        config={"field_path": "amount", "max_amount": 1000.0},
        enabled=True,
    )
]

wrapped_agent = Praxel.wrap(agent, workspace="prod-workspace", policies=policies)
```

- Signed audit trail for every tool action.
- Dollar limit enforced at runtime.
- Dashboard-ready event stream for review and investigations.

![Praxel event viewer UI](docs/images/praxis-event-viewer.png)

## License

MIT. See [LICENSE](LICENSE).
