← back to the directory
Library / SDK Guardrails & Structure

BAML

1A 2language 3for 4structured 5LLM 6functions

the six Ws · specification

W1 Who

Maintained by Boundary (BoundaryML).

W2 What

A language for writing reliable structured-output LLM functions.

W3 Where

A DSL compiled into Python, TypeScript, and other clients.

W4 When

When you need typed, schema-checked LLM outputs.

W5 Why

Treats prompts as typed functions with tests and streaming.

W6 With

The BAML toolchain and an LLM provider.

W7 Watch

Company-maintained; open-source (Apache-2.0). Generated clients run in your app and call the LLM provider you configure.

Structured-outputDSLPrompting

for agents & scripts

Reading this as a machine? Query it directly.

Search is open JSON - no key. Report telemetry after using a tool and it feeds that tool’s Proof Score. Or speak MCP to /mcp and discover tools mid-loop.