Skip to main content

ory-adk

Ory Agent Security for the Google Agent Development Kit (ADK).

Authorizes every tool call against Ory Permissions via ADK's before/after tool callbacks, records invocation activity, and propagates user → agent → sub-agent identity — built on ory-argus.

pip install ory-adk
from google.adk.agents import Agent
from ory_adk import ory_before_tool_callback, ory_after_tool_callback

agent = Agent(
    name="assistant",
    model="gemini-2.5-flash",
    tools=[search, send_email],
    before_tool_callback=ory_before_tool_callback(),   # gate every tool call
    after_tool_callback=ory_after_tool_callback(),     # record completions
)

In enforce mode a denied tool is skipped — ADK returns the denial to the model and the tool never runs. In observe mode (default) the tool runs and a permission.observe_deny activity event is recorded. An agent that another agent delegates to (transfer_to_agent or an AgentTool) is registered as a sub-agent with one identity per session and agent name, and its tool calls (tool_context.agent_name) are checked and recorded as that sub-agent. ADK gives no id for an individual delegation, so two delegations to the same agent in one session share that identity, and an agent that delegates before anything delegates to it is always treated as a root agent.

MCP tools

Tools from an McpToolset are checked against the MCP server and tool (McpServer:<server> and McpTool:<server>:<tool>) with the raw MCP tool name, instead of as native tools. ADK does not expose an MCP server name, so the server is identified by:

  1. the name you give the toolset in mcp_servers, or
  2. the toolset's tool_name_prefix (ADK names prefixed tools <prefix>_<tool>).
from google.adk.tools.mcp_tool import McpToolset, StreamableHTTPConnectionParams

github = McpToolset(
    connection_params=StreamableHTTPConnectionParams(url="https://api.githubcopilot.com/mcp/"),
)

agent = Agent(
    ...,
    tools=[github],
    before_tool_callback=ory_before_tool_callback(mcp_servers={github: "github"}),
)

Agent Security resolves the reported name to a catalog server, so it need not match the catalog spelling exactly. The connection URL host or launched package (for stdio, such as npx -y @playwright/mcp) is sent only as a hash, which lets Agent Security recognize the server under any name. An MCP tool from an unprefixed toolset that is not in mcp_servers is checked as a native tool.

Credentials come from the shared ~/.config/ory-agent-plugins/config.json, so a login from any Ory harness or ory-argus login is reused automatically. See docs/sdk-integrations.md.

Metadata

Release files for ory-adk 1.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ory-adk 1.12.0
File Size Uploaded Provenance Actions
ory_adk-1.12.0.tar.gz 8.5 kB Without provenance Details for ory_adk-1.12.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ory-adk 1.12.0
File Interpreter ABI Platform Actions
ory_adk-1.12.0-py3-none-any.whl Python 3 none any Details for ory_adk-1.12.0-py3-none-any.whl

Total release size: 14.0 kB

Release files / ory_adk-1.12.0.tar.gz

Download URL ory_adk-1.12.0.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
518c3326542c632ea932125eb3b960c04fc94320e0d3caedcc607471a9a235e8
BLAKE2b-256 checksum
How to use checksums
dc6ada15fa1fe0c395b9ea178642ee3f2d68c9a8bf225e25962bbb575a65d44e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ory_adk-1.12.0-py3-none-any.whl

Download URL ory_adk-1.12.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6fd09d0a808cca3f619b62c73bd0edbec4547eac3668356d4e57878dd2da9b46
BLAKE2b-256 checksum
How to use checksums
df649c7c5eb167b769899e24dc14ba3b2012d3319782aec9d6c37d0f3f93ae08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for ory-adk 1.12.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.12.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page