Skip to main content

The Mochi Manual

The Mochi Manual is the end-to-end guide to the language. It moves from a first print statement to reactive agents that call language models, with each page focused on a single concept.

To suggest a change, open an issue or send a pull request.

Get started

Already comfortable with another language?

If you know Python, Go, or TypeScript, the language basics page condenses the syntax into a single tour. The reference is a terser, concept-by-concept index.

Language basics

Variables, functions, types, and the constructs every program uses.

Agents and streams

Agents hold state and react to events. Streams give those events a typed shape.

Generative AI

The generate block, model declaration, and structured output are part of the language. A call to a language model uses the same syntax as any other function call.

Working with data

Load files, query lists like a database, and save the results.

Standard library and built-ins

Beyond the manual