Metadata-Version: 2.4
Name: pryxor
Version: 0.1.0
Summary: Runtime security for AI agents — client, framework adapters, and MCP
Author: Pryxor Contributors
License: Apache-2.0
Project-URL: Homepage, https://github.com/Pryxor/pryxor
Project-URL: Repository, https://github.com/Pryxor/pryxor
Project-URL: Issues, https://github.com/Pryxor/pryxor/issues
Keywords: ai,agents,security,runtime,guardrails,mcp
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.3; extra == "langchain"
Provides-Extra: crewai
Requires-Dist: crewai>=0.60; extra == "crewai"
Provides-Extra: openai-agents
Requires-Dist: openai-agents>=0.1; extra == "openai-agents"
Provides-Extra: mcp
Requires-Dist: python-dotenv>=1.0; extra == "mcp"
Provides-Extra: all
Requires-Dist: langchain-core>=0.3; extra == "all"
Requires-Dist: crewai>=0.60; extra == "all"
Requires-Dist: openai-agents>=0.1; extra == "all"
Requires-Dist: python-dotenv>=1.0; extra == "all"

# pryxor

The Python SDK for [Pryxor](https://github.com/Pryxor/pryxor) — runtime
security for AI agents. One package, three ways to protect an agent:

- **client** — call Pryxor from your agent (only depends on `requests`);
- **adapters** — protect LangChain, CrewAI, and OpenAI Agents tools;
- **mcp** — an MCP proxy and a standalone MCP server.

## Install

```bash
pip install pryxor                  # just the client
pip install "pryxor[langchain]"     # + LangChain adapter
pip install "pryxor[crewai]"        # + CrewAI adapter
pip install "pryxor[openai-agents]" # + OpenAI Agents adapter
pip install "pryxor[all]"           # everything
```

## Client

```python
from pryxor import Pryxor, PryxorHoldPendingError, PryxorBlockedError

pryxor = Pryxor()  # reads PRYXOR_AGENT_KEY and PRYXOR_URL from the environment

try:
    result = pryxor.execute(
        "send_payment",
        {"amount": 100.0, "recipient": "Fournisseur_A"},
    )
    print("Executed:", result)
except PryxorHoldPendingError as e:
    print("Waiting for human approval:", e.action_id)
except PryxorBlockedError as e:
    print("Blocked by policy:", e.reason)
```

## Framework adapters

Swap the tool class; nothing else changes. The adapter forwards the intent to
Pryxor, which decides and executes — the original function is never called.

```python
from pryxor.adapters.langchain import PryxorTool     # LangChain
from pryxor.adapters.crewai import PryxorTool        # CrewAI
from pryxor.adapters.openai_agents import PryxorTool # OpenAI Agents SDK
```

## MCP

Two entry points are installed with the package:

```bash
pryxor-mcp          # stdio proxy in front of an upstream MCP server
pryxor-mcp-server   # standalone MCP server exposing your Pryxor tools
```

```json
{
  "mcpServers": {
    "pryxor": {
      "command": "pryxor-mcp-server",
      "args": ["--agent-key", "pryxor_agent_my_agent_xxxxx", "--policy", "configs"]
    }
  }
}
```

## License

Apache 2.0.

