All articles
    pydantic
    pydantic-ai
    agent-frameworks
    typed-agents
    context-runtime
    closure-resolution
    mission-runtime
    governance
    verification
    reference-implementation
    benchmarks

    PydanticAI Validates the Shape. ReDevOps Decides If It May Act.

    August 31, 2026redevops.io
    PydanticAI Validates the Shape. ReDevOps Decides If It May Act.

    The nicest thing about PydanticAI is that the agent hands you a typed object. You get a validated Pydantic model or you get a ValidationError: no brittle JSON parsing, no "the model returned prose again". It is a real ergonomic win, and it is exactly why the framework is easy to like.

    It also invites a quiet mistake: treating schema-valid as safe to act on. Those are different guarantees, and the difference is the whole point of this integration.

    We started, as with the NVIDIA slice, by checking feasibility. pydantic-ai-slim[openai] installs clean into the same environment that already holds the Mission SDK, Closure Resolution, and nvidia-nat: it brings pydantic-graph and touches nothing else. So a real pydantic-ai typed Agent runs in-process with the runtime: Agent("openai:gpt-4o-mini", output_type=StrategyIntent, …).run_sync(...) returns a validated model, and that model is what the Mission governs. No mock, no sidecar.

    What PydanticAI owns, what ReDevOps adds

    PydanticAI owns the typed agent loop, typed dependencies, the output_type contract, and the local pydantic-graph control flow. We do not re-implement any of it. The Pydantic model stays the local application type; ReDevOps emits its canonical contracts only at the Mission boundary, and never forces runtime types back into the Pydantic node.

    PydanticAI                         →   ReDevOps Runtime
      typed Agent · output_type              Mission · Context / Closure
      deps · pydantic-graph                  Authority · Replay · Verification · Governance
    

    What ReDevOps adds is everything that decides whether a well-typed output may become an action, and that is where the interesting result lives.

    The flagship: valid is not admissible

    Here is the experiment that matters most, and it uses no LLM at all, precisely so the mechanism is unambiguous. We construct five StrategyRecommendation objects. Every one of them is schema-valid: Pydantic accepts all five without complaint. Then the runtime evaluates admissibility:

    • Unsupported. The recommendation's cited claim is not in the retrieved evidence. Verification refuses.
    • Stale. The evidence is real but older than the freshness bound. Verification refuses.
    • No authority. The action needs a portfolio:rebalance grant the mission was never given. Authority refuses.
    • Governance-denied. The security is on the restricted list. Deny-by-default refuses.
    • Admissible. Supported, fresh, authorized, permitted. Both layers agree it may proceed.

    Four schema-valid outputs the runtime correctly refuses to act on; one it admits. Pydantic's answer to all five is identical (valid) because validity is a statement about shape, and none of these four failures are shape failures. That is what type validation is for. It is simply not the same question as "should this run against the book."

    The intent is typed; the action is governed

    The second experiment lets the LLM back in. A real pydantic-ai agent turns a market note into a typed StrategyIntent (on our run, rebalance TLT, confidence 85). That typed intent is the verified input to a Mission that governs the consequential action. Missing grant ⇒ zero unauthorized actions. Granted but unapproved ⇒ the Mission parks at a human gate with zero side effects. Approved ⇒ it fires exactly once. And when we replay the sealed run, the typed state reconstructs to an identical content hash and fires zero duplicate side effects: the property a stateless re-run loses on every crash.

    So the typed object survives the trip through the runtime without being flattened into an untyped blob, and it gains an execution guarantee it never had on its own.

    Closure, measured, and the same on two frameworks

    Finally we gave the same typed verdict agent naive versus Closure-Resolution context on SciFact, at equal model and budget: verification accuracy 0.800 → 0.867, evidence recall 0.841 → 0.877, selective autonomy 0.889 at 90% coverage. Those numbers are close to what the NVIDIA slice's NV-A reported, because it is the same closure mechanism, measured on a different framework's agent. That cross-framework agreement is the point. It is conformance: the runtime value is portable across the agent you happen to be using.

    SciFact is content-saturated, so the closure gain there is modest and we report it as such. The decisive result is the deterministic one: validity and admissibility are orthogonal, and only one of them keeps a well-typed but unsupported, stale, unauthorized, or forbidden recommendation from becoming an action.


    The reference implementation, the full PA-A…PA-E result matrix, the frozen environment, and the acceptance-bundle hashes are on the benchmark page, and the code (a real pydantic-ai agent, one Python env) is on GitHub. Same provider-neutral contract as every other integration in the reference set; new framework support is a conformance exercise in the same architecture.

    Want ReDevOps in your Google Top Stories & AI results?Follow ReDevOps on Google