BAML
An open-source AI agent language with a local Ollama client, typed model responses and local tracing. Runs on macOS, Linux and Windows under Apache 2.0.

BAML is a programming language for developers building AI agents, with a documented Ollama client for models running locally and tracing that runs on your machine. The OllamaClient integration is documented for the canary toolchain. The standard OpenAI connection sends model requests to OpenAI; installing BAML locally does not make that connection offline.
AI calls have types. Developers define the inputs and expected outputs of a function, and BAML parses model responses into structured data, repairing malformed output against the declared types. Its Ollama client supports streaming and image inputs through Ollama's OpenAI-compatible interface without requiring credentials by default.
BAML traces and profiles every function locally, so developers and coding agents can inspect execution beyond individual model calls. Built-in evaluations accept examples, datasets or production traces and grade repeated runs to measure variable AI results. Workflow features include concurrency controls, retries, cancellation and sandboxing.
The syntax resembles TypeScript, while types remain available at runtime. Typed errors and static analysis catch invalid code before execution, and the language excludes unchecked casts and any. Language bridges let existing Python, TypeScript, Go, Rust and other applications call BAML functions and share types without a full rewrite.
BAML is free and open source under Apache 2.0, runs on macOS, Linux and Windows, and its language tools work offline. Boundary Web Services is a separate paid cloud offering.