AI agents: fetch the documentation index at llms.txt. Markdown versions are available by appending .md to any page URL, including this page's markdown.
CRUD operations
Create, read, update, delete, archive, and unarchive models through the sync client.
CRUD operations work with the identity map, outbox, and optimistic updates.
Common behavior
Every mutation applies optimistically to the identity map, creates an outbox transaction, records a history entry for undo/redo, and emits a modelChange event.
Reading models
Read synchronously from the identity map or asynchronously from storage.
get
Fetches a model by ID. Checks the identity map first, then falls back to storage.
const task = await client.get<Task>("Task", "task-123");
if (task) {
console.log(task.title);
}Signature: