Open Agent Loops
API Reference

TodoStore

@open-agent-loops/core


Defined in: tools/builtin/todo-list.ts:79

The to-do store seam — the state behind the three tools.

Remarks

Swap the shipped InMemoryTodoStore for a file/DB-backed implementation to persist or share a list. Structural violations throw; see the module remarks.

Methods

append()

append(
   id, 
   content, 
   status): TodoItem;

Defined in: tools/builtin/todo-list.ts:84

Add a new item.

Parameters

ParameterType
idstring
contentstring
status"done" | "pending" | "in_progress" | "cancelled" | "failed"

Returns

TodoItem

Throws

Error if status is invalid or id already exists.


read()

read(includeCompleted): TodoItem[];

Defined in: tools/builtin/todo-list.ts:86

Return the items; completed/cancelled are omitted unless includeCompleted.

Parameters

ParameterType
includeCompletedboolean

Returns

TodoItem[]


update()

update(
   id, 
   content, 
   status): TodoItem;

Defined in: tools/builtin/todo-list.ts:92

Update an item's content and/or status; moving failed → in_progress increments its retry count.

Parameters

ParameterType
idstring
contentstring | undefined
status"done" | "pending" | "in_progress" | "cancelled" | "failed" | undefined

Returns

TodoItem

Throws

Error if status is invalid or no item has this id.

On this page