Pydantic AI Todo Toolset

Add hierarchical task planning, dependencies, PostgreSQL persistence, and change events to Pydantic AI agents.

Stars
★ 76
Last updated
12d ago
FARS reviewed
Dec 02, 2026
License
MIT
Primary language
Python

At a glance

How it runs
Library / SDK
Works with
Universal · cross-platformOpenAI API
Cost
Free software; you pay for model usage
Setup effort
Low · running in minutes
You'll need
Python 3.10+Pydantic AIPostgreSQL (optional, for AsyncPostgresStorage)Network access
Typical use
Developers building a Pydantic AI agent that must show a multi-step plan and update task status as work progresses.
Not a fit if
  • Teams not building agents with Pydantic AI
  • Users who need built-in SQLite or Redis storage
Maintenance
Commits in the last 30 dayslast commit 2026-11-20

What does this agent do, and when should you use it?

Pydantic AI Todo is a Python toolset that gives Pydantic AI agents a structured todo list: agents can create, read, update, remove, and bulk-write tasks through registered tools. It ships as a high-level TodoCapability for one-line registration, plus a lower-level create_todo_toolset API and get_todo_system_prompt helper. Storage is pluggable: synchronous in-memory TodoStorage, AsyncMemoryStorage, or AsyncPostgresStorage for persistent multi-tenant tasks keyed by session_id. Optional subtasks and dependencies add add_subtask, set_dependency, and get_available_tasks with automatic cycle detection, while TodoEventEmitter emits CREATED, UPDATED, STATUS_CHANGED, DELETED, and COMPLETED events for callbacks. The project is not a standalone agent or hosted service; it runs inside your Pydantic AI application, and its functionality has been upstreamed to pydantic-ai-harness/planning, which supersedes it for new projects although this repository remains on PyPI.

When you construct Agent(..., capabilities=[TodoCapability(...)]), TodoCapability registers todo tools and injects a system prompt describing the workflow. Tools operate on a storage backend: add_todo adds one task, write_todos bulk writes or updates, read_todos lists tasks with a hierarchical view, update_todo_status changes status by ID, and remove_todo deletes by ID. With enable_subtasks=True, add_subtask creates child tasks, set_dependency links tasks with cycle detection, and get_available_tasks returns ready tasks. AsyncPostgresStorage uses create_storage("postgres", connection_string=..., session_id=...) and storage.initialize() to persist per-session tasks. The event system exposes TodoEventEmitter decorators such as on_completed and on_created; each emitted TodoEvent contains type, todo, and timestamp. The output is task state exposed through tools and storage plus callback events, not a UI or standalone service.

  1. Developers building a Pydantic AI agent that must show a multi-step plan and update task status as work progresses.
  2. SaaS teams needing per-user todo isolation by passing session_id to AsyncPostgresStorage.
  3. Workflow automation teams that want completion or creation callbacks to trigger their own notifications or webhooks.
  4. Agents handling complex projects that need subtasks, dependency links, and a get_available_tasks view.
  5. Teams defining agents in YAML with Agent.from_file() and enabling subtasks through TodoCapability configuration.
  6. Projects already on pydantic-ai-todo that need to evaluate migration to pydantic-ai-harness planning.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • pip install pydantic-ai-todo
  • uv add pydantic-ai-todo
  • pip install 'pydantic-ai-todo[postgres]'
Runtime
Python 3.10+

How do you install or deploy this agent?

Requires Python 3.10+. Install from PyPI; the PostgreSQL backend needs the postgres extra. Then configure credentials for the Pydantic AI model provider used in your agent; the documented quickstart uses openai:gpt-4.1.

pip install pydantic-ai-todo
uv add pydantic-ai-todo
pip install 'pydantic-ai-todo[postgres]'

How do you use this agent?

Use TodoCapability for one-line access with default in-memory storage:

from pydantic_ai import Agent
from pydantic_ai_todo import TodoCapability

agent = Agent("openai:gpt-4.1", capabilities=[TodoCapability()])
result = await agent.run("Create a todo list for building a REST API")

Pass TodoStorage when you need direct access to stored tasks:

from pydantic_ai_todo import TodoCapability, TodoStorage

storage = TodoStorage()
agent = Agent("openai:gpt-4.1", capabilities=[TodoCapability(storage=storage)])

result = await agent.run("Plan a blog application")

for todo in storage.todos:
    print(f"[{todo.status}] {todo.content}")

Enable subtask and dependency tools:

agent = Agent(
    "openai:gpt-4.1",
    capabilities=[TodoCapability(enable_subtasks=True)],
)

Use PostgreSQL persistence and multi-tenancy:

from pydantic_ai_todo import TodoCapability, create_storage

storage = create_storage(
    "postgres",
    connection_string="postgresql://user:pass@localhost/db",
    session_id="user-123",  # Multi-tenancy
)
await storage.initialize()

agent = Agent("openai:gpt-4.1", capabilities=[TodoCapability(async_storage=storage)])

React to task events:

from pydantic_ai_todo import TodoCapability, TodoEventEmitter, AsyncMemoryStorage

emitter = TodoEventEmitter()

@emitter.on_completed
async def notify_completed(event):
    print(f"Task done: {event.todo.content}")

@emitter.on_created
async def notify_created(event):
    print(f"New task: {event.todo.content}")

storage = AsyncMemoryStorage(event_emitter=emitter)
agent = Agent("openai:gpt-4.1", capabilities=[TodoCapability(async_storage=storage)])

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

FARS trust-control audit

Not found in source — apply before daily use
  • confirmation before acting — Turn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • rollback or recovery path — Back up first, or work on a git branch or snapshot, so its changes can be undone.

What are this agent's strengths and limitations?

Pros
  • TodoCapability registers tools and the system prompt in one line, avoiding manual wiring.
  • Supports subtasks, dependencies, and get_available_tasks with built-in cycle detection.
  • Storage backends are switchable, and AsyncPostgresStorage supports multi-tenant persistence via session_id.
  • TodoEventEmitter exposes created, updated, status-changed, deleted, and completed events for notifications or webhooks.
  • Works with Pydantic AI Agent, YAML agent definitions, and Agent.from_file().
Limitations
  • The project has been superseded by pydantic-ai-harness/planning, so new adopters face migration cost.
  • Tool names differ from the harness (for example, write_todos becomes write_plan), requiring prompt and call-site changes.
  • PostgreSQL persistence requires the postgres extra and a database you operate yourself.
  • The repository does not include SQLite or Redis storage; the harness adds those options.
  • Only applies to Pydantic AI; projects using another agent framework cannot adopt it directly.

How does this agent compare with similar options?

Compared with pydantic-ai-harness/planning, this repository keeps older names: TodoCapability maps to Planning, write_todos to write_plan, and AsyncPostgresStorage to PostgresPlanStore; the harness adds SqlitePlanStore, RedisPlanStore, and a blocked status. Compared with Pydantic Deep Agents, this is a focused planning toolset rather than a full agent framework with filesystem, subagents, and skills.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Pydantic AI Todo Toolset This agent 48 · Major gaps Library / SDKFree + model costs ★ 76 12d ago Python OpenAI API
Marvin – A Python Framework for AI Workflows 53 · Major gaps Library / SDKFree + model costs ★ 6.2k 2d ago Python OpenAI API
Pydantic AI Skills 74 · Some gaps Library / SDKFree + model costs ★ 382 2d ago Python OpenAI API
Chorus Agent Harness 72 · Some gaps CLIFree + model costs ★ 1.2k 19d ago TypeScript Codex · Claude Code

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
48/ 100 5-point scale 2.4 / 5
Trust 10/29
Reliability 6/14
Adaptability 12/18
Convention 10/18
Effectiveness 6/13
Verifiability 4/8
Why each dimension lost points
Trust10 / 29 · 1.7/5

The toolset exposes only todo CRUD, subtasks and dependency operations, a narrow scope consistent with least privilege (2). However destructive operations like remove_todo have no user confirmation mechanism (0); data flow is only described in README prose about storage and system-prompt injection, with no explicit account of what is sent to the LLM (1); examples inline postgresql://user:pass connection strings with no secrets-management guidance (1); dependencies only set lower bounds with no lockfile or audit evidence (1); the event system can trigger webhooks/callbacks (external effects) without isolation notes (1); task deletion has no rollback/undo (0); MIT license, Vstorm copyright and upstreaming note are clear (2).

Reliability6 / 14 · 2.1/5

README says PostgreSQL needs the postgres extra, while docs/installation.md says PostgreSQL and Redis ship by default, and pyproject shows redis as a core dep and asyncpg as an optional extra — three sources contradict each other (1). Dependencies are common PyPI packages with good availability (2). Failure messages are barely visible in the sampled source, only test fragments, so error-handling evidence is thin (1).

Adaptability12 / 18 · 3.3/5

Targets developers building Pydantic AI agents with a clear scenario (2); the tool list and enable_subtasks flag clearly bound capabilities (2); tools are explicit function tools guided by a system prompt, giving reasonable trigger precision (2); requires Python 3.10+ and pydantic-ai, a clear environment fit (2).

Convention10 / 18 · 2.8/5

README, docs/, AGENTS.md and CLAUDE.md give a clear structure (2); install notes cover pip/uv/poetry but the PostgreSQL dependency statement is self-contradictory (1); tools are renamed in the harness with a mapping table, so naming stability is acceptable (2); examples are plentiful but there is no FAQ (2); limitations are only noted via the 'upstreamed, superseded by harness' banner, lacking systematic known-limitations (1); the MIT LICENSE is complete (3); version 0.2.7 exists but there is no CHANGELOG file, only an external releases link (1); maintenance responsibility has moved to pydantic-ai-harness with this repo merely 'keeps working', and the publisher is unverified (1).

Effectiveness6 / 13 · 2.3/5

Tools return formatted text and storage is directly accessible, so output is usable (2); but the project is superseded by the official pydantic-ai-harness, sharply reducing marginal value (1); though a lightweight one-line integration, cost-benefit is only moderate once superseded (1).

Verifiability4 / 8 · 2.5/5

The upstreaming claim cites a PR link and test files exist, so claims are traceable (2); but dependency statements conflict between README and installation.md, weakening cross-source corroboration (1); docs mostly separate facts from guidance but are imprecise on facts like default dependencies (1).

Risks and how to mitigate them
  • Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • README and docs/installation.md contradict each other on whether PostgreSQL/Redis are default dependencies; verify against pyproject.toml before installing.
  • Destructive operations like remove_todo have no confirmation or rollback; add your own safeguards before production use.
  • Examples inline database connection strings (with user:pass); do not copy them, use a secrets manager instead.
  • The project is superseded by the official pydantic-ai-harness; prefer the harness for new projects, this library only keeps working.
  • Publisher Vstorm is unverified and maintenance has shifted, so long-term support is uncertain.
Evidence confidence: Low Reviewed Dec 02, 2026 Reviewed revision f173b2497fa5
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/pydantic-ai-todo.svg)](https://followagents.com/en/agents/pydantic-ai-todo)
<a href="https://followagents.com/en/agents/pydantic-ai-todo"><img src="https://followagents.com/badge/pydantic-ai-todo.svg" alt="FARS review"></a>

FAQ

Is this repository itself an agent?
No. It is a TodoCapability and toolset for Pydantic AI Agent instances; you still supply the model and agent runtime.
Do I have to deploy PostgreSQL?
No. TodoStorage and AsyncMemoryStorage work by default; only AsyncPostgresStorage needs the postgres extra and a database.
Does it send webhooks directly?
The documented usage registers TodoEventEmitter callbacks such as on_completed and on_created. The actual webhook HTTP request must be made inside your callback.
How are tasks isolated per user?
When using AsyncPostgresStorage, pass a session_id to isolate tasks by session or tenant.
Should new projects use this or pydantic-ai-harness?
The README recommends pydantic-ai-harness/planning for new projects; this repository stays on PyPI and keeps working for existing dependents.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts