Documentation

HomeBAMLCLICloudTutorialsExamples

BAML documentation

  • Overview
  • Get started
  • Book
    • 3. Common programming concepts
    • 8. Handle errors
    • 11. Interfaces
    • 12. Run work concurrently
    • 22. Patterns, matching, and destructuring
  • Language reference
    • Functions
  • Standard packages
  • Language bridges
    • TypeScript

Products

  • BAML CLI
  • Cloud

Resources

  • Tutorials
    • Structured extraction
  • Examples
    • Classify support tickets
    • Images and vision models
HomeBAMLCLICloudTutorialsExamples
Start

Sections

  • Overview
  • Get started
  • Book
    • 3. Common programming concepts
    • 8. Handle errors
    • 11. Interfaces
    • 12. Run work concurrently
    • 22. Patterns, matching, and destructuring
  • Language reference
    • Functions
  • Standard packages
  • Language bridges
    • TypeScript

Products

  • BAML CLI
  • Cloud

Resources

  • Tutorials
    • Structured extraction
  • Examples
    • Classify support tickets
    • Images and vision models
BAMLStandard packagesv0.22.3-nightly.20261020.aaievents

ai.events

namespace in the ai package.

Reference version

Contents

  • ai.events._sum_count function
  • ai.events._sum_usage function
  • ai.events.AssistantMessage class
  • ai.events.call_usage function
  • ai.events.Event type_alias
  • ai.events.FinalProduced class
  • ai.events.guard function
  • ai.events.HttpResponse class
  • ai.events.merge_usage function
  • ai.events.ModelCall class
  • ai.events.ModelKey class
  • ai.events.ModelUsage class
  • ai.events.RunStarted class
  • ai.events.SseEventRecord class
  • ai.events.Timing class
  • ai.events.ToolCompleted class
  • ai.events.ToolFailed class
  • ai.events.ToolRequested class
  • ai.events.Usage class
  • ai.events.usage_for function
  • ai.events.UserMessage class

On this page

  • Contents

Build with BAML

Start with the language guide and a checked BAML function.

Continue into generated package and CLI references for the exact selected toolchain.

Get started
Developer documentation for BAML and Boundary products. Source available on GitHub. View release notes