Metadata-Version: 2.4
Name: ory-adk
Version: 0.11.1
Summary: Ory Agent Security for the Google Agent Development Kit (ADK) — per-tool authorization, tracing, and identity propagation via before/after tool callbacks. Built on ory-argus.
Author: Ory
License-Expression: Apache-2.0
Keywords: adk,agent,agent-development-kit,ai,authorization,google,ory
Requires-Python: >=3.10
Requires-Dist: google-adk>=1.0
Requires-Dist: ory-argus<1,>=0.8
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# ory-adk

Ory Agent Security for the [Google Agent Development Kit (ADK)](https://google.github.io/adk-docs/).

Authorizes every tool call against Ory Permissions via ADK's before/after tool callbacks,
traces invocations, and propagates user → agent → sub-agent identity — built on
[`ory-argus`](https://pypi.org/project/ory-argus/).

```bash
pip install ory-adk
```

```python
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(),     # trace completions
)
```

In **enforce** mode (`ORY_PERMISSION_MODE=enforce`) 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` span is recorded. When the model delegates to a sub-agent
(`transfer_to_agent`), a sub-agent identity + agent→subagent delegation are recorded.

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](https://github.com/ory-corp/ory-agent-plugins/blob/main/docs/sdk-integrations.md).
