Authdog

Authorizing tool calls for Pydantic AI

Last updated Oct 22, 2026
View as Markdown

A tool result is what your API returned. The model does not grant access. A 200 with a subject is not an allow list for the next tool.

After the subject is known

Check Where
Bearer accepted The hook on Pydantic AI
Allowed tools Trust-store row, when your process enforces it
The action itself Authorization using the subject

Revoke in Agents stops new tokens when the subject is the OIDC client id. Tokens already issued last until expires_in unless a later check rejects them.

When the token is an RFC 8693 delegation, the person stays the subject and the agent stays the actor. Authorizing the agent as the user skips the delegation.

Read To learn how to
Custom channel auth for Pydantic AI Admit the caller
Enriching instructions for Pydantic AI What the model is allowed to see
Authorization Pick the check after the subject

Learn more