How the @todoist agent works

At Todoist, you can mention @todoist in Comms and ask it something: what was decided in a thread, which of your tasks are due this week, or to turn a discussion into a project. Agent Core is the service that answers. I co-lead it, and this series is about the changes that made it better, and how we proved they did.

What a run looks like

A question starts a run. Agent Core keeps the conversation, calls the model, and lets the model ask for tools: read a thread, search the workspace, read or change a task, draft an automation. Each tool calls a product’s API as the person asking, and that product’s backend checks permissions on every call. The model never sees a product credential.

A question in Comms reaches Agent Core. Its agent loop calls the model and the product tools, which act in Todoist, Comms and Automations. The answer is posted in Comms, then a judge grades it.

When the run ends, code posts the answer and a judge grades it. Both the run and the grade are traced, so a bad answer in an evaluation can be read step by step: what the model asked for, what each tool returned, and why the judge scored it the way it did.

One run, end to end

An evaluation case is one YAML file. This one, trimmed, puts the asker in the feast thread and asks about a greenhouse that thread never mentions:

id: baseline-3-needs-one-search
fixture:
    threads:
        - id: th-feast
          channel: ch-great-hall
          title: Start-of-term feast
          content: The feast is on September 1 in the Great Hall, starting at seven.
        - id: th-greenhouse
          channel: ch-herbology
          title: Greenhouse three
          content: Greenhouse three reopens on Monday after the repairs.
anchor:
    kind: thread
    object_id: th-feast
    asker: 101
question: When does greenhouse three reopen?
expect:
    must_say:
        - monday
    expected_tools:
        - comms.search_content
    must_cite_ids:
        - th-greenhouse

The fixture is the whole workspace the run can see. expect holds what code checks on the answer: a pattern it must contain, a tool it must call, a source it must link.

In one evaluation run, the model called three tools, in this order:

comms.load_thread
comms.search_content
comms.load_thread

It read the thread it was asked in, found no greenhouse, searched, then read the thread the search found. The run’s own search result isn’t in the evaluation record. The search tool’s test shows the shape the model gets for each result (trimmed, with an example source, workspace ID replaced):

{
  "type": "thread",
  "thread_id": "related-thread",
  "title": "Related related-thread",
  "snippet": "Synthetic search result for related-thread.",
  "channel": { "id": "related-channel", "name": "Test channel" },
  "source": "a3f2c1d4",
  "reference": { "url": "https://comms.todoist.com/<workspace>/ch/related-channel/t/related-thread/" }
}

The model passes source, a short handle, to read the thread, and the read checks access again. It cites reference.url. The answer:

Greenhouse three reopens on **Monday** after the repairs.

Source: https://comms.todoist.com/<workspace>/ch/ch-herbology/t/th-greenhouse/

Every check passed. The judge then read the question, the tools’ inputs and outputs, and the answer, and gave a score and a reason per dimension (trimmed):

{
  "composite": 5,
  "dimensions": { "helpful": 5, "source_support": 5, "invented_claims": 5,
                  "current_decision": 5, "audience_safe_sources": 5,
                  "cited_sources": 5, "member_tone": 5 },
  "comment": "source_support: Fully supported by the loaded thread content.; cited_sources: Properly cites the bare URL of the referenced thread at the end.; member_tone: Short, direct, and natural tone without fluff."
}

The judge grades what code can’t, such as whether each claim is supported and whether the answer reads like a colleague.

Three days earlier, before my prompt changes to answer like a teammate (agent-core#128) and to end answers with a bare source link (agent-core#138), the same question got:

According to a post by Pomona Sprout on October 12, 2026, Greenhouse three reopens on Monday after the repairs.

You can read the post in the [Greenhouse three thread](https://comms.todoist.com/<workspace>/ch/ch-herbology/t/th-greenhouse/).

Both answers were right. The old one opens with who posted it and when, which the question didn’t ask. After those changes, the answer gives the fact first and lets Comms web show the thread’s title on the link.

How we decide a change is better

Run one after the other, the same prompt can pass a question 3 times out of 20, then 12 times out of 20, because the model provider’s speed and behaviour drift. So a change to the prompt, a tool, or what a tool returns is checked like this:

  1. Play a set of questions against a synthetic workspace through the real service and the live model.
  2. Check each answer against hand-written expectations, and have the judge grade it against a rubric.
  3. Run the change and the main branch at the same time, several times each, and compare their pass rates.

The synthetic workspace is a school of magic, with its own members, channels and threads. It holds no real data, so every question and answer can be read and shared.

The series

Each post takes one idea, often one that Anthropic’s engineering articles describe, and shows what happened when we applied it to a production agent: