Overview
Modular's AI API has two halves. A mod declares reusable capabilities when it
Tools
A tool is a typed capability the model can call during a turn. The model reads
Agents
An agent gives a model one reusable role: a name, a system prompt, and an
Prompts
A prompt is named text a person can insert into the composer. It has no model,
Sessions
A session owns a durable conversation: history, model, working directory,
Turns
A session owns conversation history. A turn owns one submitted unit of work.
Lineage
Lineage records how a session came to exist. It is a closed union with three
Models
ctx.ai.models exposes the model routes currently available to the workspace.
Attachments
Attachments carry typed context beside prompt text. They do not become part of
Transcription
Transcription composes two owners. ctx.media acquires audio. ctx.ai selects