Ship with Matilda.
Install the CLI, run it against a real repo, get back to work. Short chapters for people who measure work in green builds, not slide decks.
Matilda Code.
Start here
Guides
Client SDK.
Start here
Chat
- 04Chat
Send messages and get complete responses from the chat API.
- 05Streaming
Full event streaming from the chat API.
- 06Text helpers
Filter a chat stream down to assistant text, with deduped deltas.
- 07Structured output
Constrain a chat response to a zod schema and get a typed object back.
- 08Durable streaming
Resume an interrupted stream from the last received event.
State and data
- 09Conversations
List, retrieve, rename, and rate the threads behind a conversationId.
- 10Multi-turn conversations
Carry context across turns with conversationId.
- 11Files
Upload one file or many, then attach the IDs to a chat request.
- 12Feedback and devices
Report harmful content and manage push notification devices.
Agent SDK.
Start here
Running agents
- 04Agent
Configure agents with instructions, tools, compaction, and resumable state.
- 05Run
Run a prompt to completion and get the final output.
- 06Stream
Full event streaming from an agent run.
- 07Text helpers
Filter a run's stream to assistant text, plus the module-level run and stream helpers.
- 08Structured output
Constrain an agent turn to a zod schema with runObject and streamObject.
Tools and sessions
State and data
Reference
- 15Error handling
Run and stream errors, exponential-backoff retries, and partial results after a failure.
- 16Multi-agent patterns
Compose, parallelise, and route between agents.
- 17Recipes
Six runnable examples, from a device-flow CLI agent to a multi-agent review pipeline.
- 18Exports
Classes, functions, constants, and types exported by the agent SDK package.