The BAML book

Table of contents · Learn the language, build agents, and integrate BAML into your applications.

Reading perspective

The book is being published chapter by chapter. Linked chapters are available to read; the remaining titles show the planned outline.

For a working project, start with Get started.

Table of contents

I. Start

  1. Getting Started
  2. Building Your First Agent

II. The Language

  1. Common programming concepts
  2. Unions, match, and Pushing Left
  3. Classes, Enums, and Methods
  4. Namespaces and Project Structure
  5. Collections
  6. Handle errors
  7. Generics
  8. Lambdas and Iterators
  9. Interfaces
  10. Run work concurrently
  11. Logging, Tracing, and Pushing Right
  12. Testing
  13. The Standard Library

III. The AI Layer

  1. Prompts, Clients, and AI Functions
  2. Tools and Agents
  3. Tracing an Agent
  4. Sub-Agents and Background Workers
  5. Streaming
  6. Evals

IV. Going Deeper

  1. Patterns, matching, and destructuring
  2. Reflection and Dynamic Types
  3. Code Mode

V. The Coding Loop

  1. The Edit-Check Loop
  2. The Playground

VI. Crossing the Boundary

  1. Adopting BAML Incrementally

Capstone

  1. A Self-Improving Agent

Appendices

  • A. Keywords
  • B. Operators and Symbols
  • C. Diagnostics Catalogue
  • D. Standard Library Map
  • E. CLI Reference
  • F. Glossary