Proposes an RFC for implementing 'Invocation Specs' as a reusable per-run user-space pattern within Pydantic AI to better manage agentic tasks and runtime ephemeral dependencies.
# RFC: Invocation Specs as a User-Space Pattern in PydanticAI PydanticAI already provides the primitives needed to build many sophisticated agentic applications: - typed agents - typed outputs - toolsets - per-run overrides - hooks - capabilities - graph-based orchestration Because of that, this RFC is **not** arguing that PydanticAI needs a built-in `Task` abstraction in order to model real systems well. In many cases, it clearly does not. The narrower claim is: > a reusable per-run invocation object is a recurring user-space pattern, and PydanticAI may benefit from making that pattern easier to implement without necessarily standardizing it as a core abstraction In this document, I use `AgenticTask` as a convenient label for that kind of invocation object, but the name is not important. ## Position A reasonable objection to this idea is: - shared capabilities plus narrow subagents can replace tasks in many architectures - a service plus explicit orchestration can replace tas