Ory Agent Security for Pydantic AI — per-tool authorization, tracing, and identity propagation via a WrapperToolset. Built on ory-argus.
Project description
ory-pydantic-ai
Ory Agent Security for Pydantic AI.
Wraps any toolset in an Ory-gating WrapperToolset so every tool call is authorized
against Ory Permissions, traced, and tied to the user → agent identity — built on
ory-argus.
pip install ory-pydantic-ai
from pydantic_ai import Agent
from ory_pydantic_ai import wrap_toolset
agent = Agent(model, toolsets=[wrap_toolset(my_toolset)])
In enforce mode (ORY_PERMISSION_MODE=enforce) a denied tool raises ModelRetry with
the denial, so the model is told the call was refused and the tool never runs. In observe
mode (default) the tool runs and a permission.observe_deny span is recorded.
Credentials come from the shared ~/.config/ory-agent-plugins/config.json.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ory_pydantic_ai-0.12.1.tar.gz.
File metadata
- Download URL: ory_pydantic_ai-0.12.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61ce142801dab4e09545cb82f32ff4d585ea60c66c6fcdb367932dcf9479da91
|
|
| MD5 |
a34de2b40a7753f2355c36b06a0520e1
|
|
| BLAKE2b-256 |
1a0574d258c15884a0a1e5360036abe0afbdbb68b2492d7681277dc83a4be84b
|
File details
Details for the file ory_pydantic_ai-0.12.1-py3-none-any.whl.
File metadata
- Download URL: ory_pydantic_ai-0.12.1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d030b94c141e9f6113c93f583d62f4a5cd5fdddc7e4bf6a7b9eef5303a05be65
|
|
| MD5 |
265f5c72ebda9fdc621131aeb2105e7a
|
|
| BLAKE2b-256 |
133d95b7f30accbf59f70c3911e7d27b0603b10151bb086f30d1216d38f440f2
|