One session per run
A Sentience Governor session is created for each Pydantic AI run.
Pydantic AI integration · released 0.1.0
Record governance evidence at the Pydantic AI runtime boundary against the objective and scope declared before the run.
Python 3.10+ · local traces by default · records and flags, does not block
What you receive
A Sentience Governor session is created for each Pydantic AI run.
The run’s declaration state is recorded before execution begins.
Scope assertion, dispatch, return, and context are kept in runtime order.
Measured token usage, model, provider, and tool-use IDs stay attributable.
Traces are local by default. No Sentience account or API key is required.
Concurrent runs and parallel tool calls retain their own evidence.
Works alongside observability
Explains application events and messages.
Connects operations across a workflow.
Helps diagnose system behavior.
Records governance-oriented execution evidence against declared context.
This integration does not replace Pydantic Logfire, OpenTelemetry, logging, or tracing.
Attaching the capability
Install the released distribution, attach the capability to your agent, and keep using the Pydantic AI runtime you already have.
Read the integration documentation ↗from pydantic_ai import Agent
from pydantic_ai_governor import SentienceGovernor
agent = Agent(
"openai:gpt-4o",
capabilities=[SentienceGovernor()],
)
result = await agent.run("Reconcile the August invoices")Execution evidence
Separately recorded
Tool-context evidence is estimated. Model-turn token usage is measured.
Evidence boundaries
target_system establishes object-level scope.Compatibility
pydantic-ai-governor ==0.1.0pydantic-ai-slim >=2.37.0,<2.38sentience-governor >=0.3.1.2,<0.3.2Python 3.10+Tested behavior
Across the execution paths tested for version 0.1.0, attaching the capability did not change agent output, message count, token usage, exception propagation, retries, deferral, streaming, or control flow.
Tested paths include normal returns, text-only runs, parallel tool calls, retries, raised tools, validation failures, streaming, deferred and resumed execution, and concurrent runs.
Evaluate the boundary
Independent distributions: pydantic-ai-governor on PyPI · source on GitHub