Terminal
Terminal/Skill
Moves Python Agno agents, teams, workflows, and memory over to Pydantic AI, adding Pydantic AI Harness only where needed.
By Pydantic
Works with
npx skills add pydantic/skills --skill migrating-agno-to-pydantic-aiPreserve observable behavior, not Agno's object model. Migrate the smallest complete caller path and keep application infrastructure in place.
Agent.run() / arun(), Team.run() / arun(), a Workflow, or an AgentOS endpoint through instructions, model and tool calls, hooks, session loading, memory or knowledge retrieval, events, results, state, and side effects. Establish a focused baseline or characterization test.Read Research and concept mapping for the detected features. Read Verification and cutover before implementation.
pydantic_ai.Agent for the agent loop, typed dependencies, tools, outputs, normalized messages, generic hooks, streaming, MCP clients, approvals, usage limits, instrumentation, realtime, and durable-runtime integrations.pydantic_graph only when explicit typed nodes, branches, and joins remain useful; use plain async Python for simple fixed control flow.pydantic-ai-harness only for observed reusable policy such as memory notebooks, planning, model-directed subagents, Agent Skills, coding tools, guardrails, model-agnostic compaction, or step persistence. Harness capabilities compose through the core agent loop; Harness is not a second runtime.pydantic-evals package for observed datasets and evaluators.The normal migration is one reusable Agent, application services supplied through typed dependencies, typed tools and output, and application-owned storage of serialized result.all_messages() for later turns. Preserve an existing HTTP, job, or UI boundary with a small adapter and its current field names.
dependencies, user_id, session_id, and authenticated identity are trusted runtime context, not model arguments. Put them in typed dependencies and authorize storage or effects in application code.Memory as separate contracts. Choose and test record conversion, a read-through adapter, or starting fresh as an accepted change.Team's actual delegation mode and caller-visible member events. Use Harness SubAgents only for model-directed, isolated task delegation. Keep routing, broadcast, deterministic fan-out, shared-context collaboration, aggregation, and retries in application or graph code unless parity is proved.Workflow steps, conditions, routers, loops, and parallel joins deterministic. Do not move them into an agent prompt. Graph state alone is not a persisted checkpoint.Skills loads SKILL.md instructions on demand but does not load bundled resources or execute scripts; add explicit FileSystem, Shell, or application tools only for observed, trusted behavior.pydantic_graph, Harness, Evals, or a durable runtime only after a source contract requires it.agno, AgentOS setup, and Agno storage or event adapters only after no retained path needs them.Explain any consequential semantic change before implementing it: state the source behavior, target behavior, caller impact, recommended choice, and remaining risk.
Apply the completion criterion in Verification and cutover. Label evidence from fakes, recordings, live providers, and operational tests accurately.