Useful ToolsTodo List

TodoList

Task tracking tool for agents to manage complex, multi-step tasks.

Installation

main.py
from connectonion import TodoList todo = TodoList()

Want to customize? Run co copy todo_list to get an editable copy.

Why Use TodoList?

  • Track progress on complex tasks with multiple steps
  • Show users what the agent is working on
  • Organize multi-step workflows
  • Prevent forgetting steps in complex tasks

When to Use

Use when:

  • • Task requires 3+ distinct steps
  • • User provides multiple tasks
  • • Task requires careful planning
  • • You want to show progress

Don't use when:

  • • Task is trivial (1-2 simple steps)
  • • Task is purely conversational

API

add(content, active_form)

Add a new pending task.

main.py
todo.add("Fix authentication bug", "Fixing authentication bug") todo.add("Run tests", "Running tests") todo.add("Update docs", "Updating docs")

start(content)

Mark a task as in_progress. Only one task can be in_progress at a time.

main.py
todo.start("Fix authentication bug") # Shows: ◐ Fixing authentication bug

complete(content)

Mark a task as completed.

main.py
todo.complete("Fix authentication bug") # Shows: ● Fix authentication bug

remove(content)

Remove a task from the list.

main.py
todo.remove("Update docs")

list()

Get all todos as text.

main.py
print(todo.list()) # ○ Fix authentication bug # ◐ Running tests # ● Update docs

Task States

IconStatusDescription
pendingNot yet started
in_progressCurrently working on
completedFinished

Visual Display

When tasks change, TodoList shows a panel:

╭─── Tasks (1/3) ───────────────────────────────╮
│ ● Fix authentication bug │
│ ◐ Running tests │
│ ○ Update docs │
╰────────────────────────────────────────────────╯

Use with Agent

main.py
from connectonion import Agent, TodoList todo = TodoList() agent = Agent("worker", tools=[todo]) agent.input(""" Implement user authentication: 1. Create User model 2. Add login endpoint 3. Add logout endpoint 4. Write tests """) # Agent will: # 1. Add all tasks to todo list # 2. Start each task before working on it # 3. Complete each task when done # 4. Show progress throughout

Best Practices

Task Naming

Use both forms:

main.py
todo.add("Fix authentication bug", "Fixing authentication bug") # ^-- content ^-- active_form

One In-Progress at a Time

Only one task should be in_progress. Complete current before starting next.

main.py
todo.add("Task A", "Doing A") todo.add("Task B", "Doing B") todo.start("Task A") todo.start("Task B") # Error: Another task is in progress todo.complete("Task A") todo.start("Task B") # Now works

Mark Complete Immediately

Complete tasks as soon as done, don't batch.

Star us on GitHub

If ConnectOnion saves you time, a ⭐ goes a long way — and earns you a coffee chat with our founder.