Metadata-Version: 2.4
Name: praxel
Version: 0.1.0
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

# Praxis

[![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)

Praxis — 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
```

> **Note — install name vs. import name.** Install the package as **`praxel`**, but import it as **`praxis`**:
>
> ```python
> from praxis import Praxis
> ```
>
> The distribution is published to PyPI as `praxel` (the name `praxis` is taken by an unrelated project), while the Python module remains `praxis` so existing imports keep working.

## Quickstart

```python
from praxis import Praxis, Policy, PraxisDeniedException

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 = Praxis.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

## Docs

[docs.trypraxis.com](https://docs.trypraxis.com)

## 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 Praxis

```python
from praxis import Praxis, 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 = Praxis.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.

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

## License

MIT. See [LICENSE](LICENSE).
