Todoist

Create and manage Todoist tasks, with current adapter limits for updates and projects.

TodoistTools enables an Agent to interact with Todoist.

Prerequisites

The following example requires the todoist-api-python library and a Todoist API token, which you can get from the Todoist Developer Portal.

uv pip install agno todoist-api-python google-genai
export TODOIST_API_TOKEN=***
export GOOGLE_API_KEY=***

Example

The following agent will create a new task in Todoist.

cookbook/91_tools/todoist_tools.py
"""
Example showing how to use the Todoist Tools with Agno

Requirements:
- Sign up/login to Todoist and get a Todoist API Token (get from https://app.todoist.com/app/settings/integrations/developer)
- uv pip install todoist-api-python

Usage:
- Set the following environment variables:
    export TODOIST_API_TOKEN="your_api_token"

- Or provide them when creating the TodoistTools instance
"""

from agno.agent import Agent
from agno.models.google.gemini import Gemini
from agno.tools.todoist import TodoistTools

todoist_agent_all = Agent(
    name="Todoist Agent - All Functions",
    role="Manage your todoist tasks with full capabilities",
    instructions=[
        "You have access to all Todoist operations.",
        "You can create, read, update, delete tasks and manage projects.",
    ],
    id="todoist-agent-all",
    model=Gemini("gemini-3.5-flash"),
    tools=[TodoistTools()],
    markdown=True,
)

print("\n=== Create a task ===")
todoist_agent_all.print_response(
    "Create a todoist task to buy groceries tomorrow at 10am"
)

Toolkit Params

ParameterTypeDefaultDescription
api_tokenOptional[str]NoneTodoist API token. Uses the TODOIST_API_TOKEN environment variable if not set.

Toolkit Functions

FunctionDescription
create_taskCreates a new task in Todoist with optional project assignment, due date, priority, and labels.
get_taskFetches a specific task.
update_taskUpdates an existing task with new properties such as content, due date, priority, etc.
close_taskMarks a task as completed.
delete_taskDeletes a specific task from Todoist.
get_active_tasksReturns only the first SDK page of active tasks; additional pages are discarded.
get_projectsCurrently fails to serialize the paginated SDK response; see compatibility below.

You can use include_tools or exclude_tools to modify the list of tools the agent has access to. Learn more about selecting tools.

Current SDK compatibility

The example creates a task. Restrict its toolkit to supported task operations by replacing the tools argument with:

tools=[TodoistTools(include_tools=["create_task", "get_task", "close_task", "delete_task"])],

The current provider SDK returns pages from get_tasks and get_projects. Agno's get_active_tasks keeps the first page, while get_projects fails when treating a page as a Project object. update_task can successfully modify a task and then return a serialization error because the SDK now returns a Task object. Check the task with get_task before considering any retry; the error does not prove the update failed. These adapter paths need upstream fixes. The toolkit lists projects but does not provide general project creation or editing.

Developer Resources