Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ory_pydantic_ai-0.12.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ory_pydantic_ai-0.12.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

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

Hashes for ory_pydantic_ai-0.12.1.tar.gz
Algorithm Hash digest
SHA256 61ce142801dab4e09545cb82f32ff4d585ea60c66c6fcdb367932dcf9479da91
MD5 a34de2b40a7753f2355c36b06a0520e1
BLAKE2b-256 1a0574d258c15884a0a1e5360036abe0afbdbb68b2492d7681277dc83a4be84b

See more details on using hashes here.

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

Hashes for ory_pydantic_ai-0.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d030b94c141e9f6113c93f583d62f4a5cd5fdddc7e4bf6a7b9eef5303a05be65
MD5 265f5c72ebda9fdc621131aeb2105e7a
BLAKE2b-256 133d95b7f30accbf59f70c3911e7d27b0603b10151bb086f30d1216d38f440f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page