CreateWithAIHub

Framework Boundary

BAML

Boundary's open-source language for type-safe LLM functions and structured outputs, callable from Python, TypeScript, Go and more.

Visit website ↗
Save

What it is

BAML is an open-source language from Boundary for working with LLMs. The established version (v0) is a domain-specific language for writing typed LLM functions and prompts that generate a baml_client you call from Python, TypeScript, Go, Ruby, Rust, Elixir or over REST, with streaming, testing and model switching. BAML v1, now in public beta, is a separate full programming language for agents with a Rust-like type system, typed errors and built-in tests. Boundary Cloud is an optional hosted service with a free tier.

What it's useful for

Defining a typed extraction function once in BAML, testing it in the editor, and calling it from both a Python service and a TypeScript app.

Key features

  • Typed LLM functions and prompts in .baml files that generate a client library
  • Host-language support for Python, TypeScript, Go, Ruby, Rust and Elixir, plus a REST API
  • Streaming, testing of functions and switching between LLMs
  • Editor extensions for VS Code, Cursor, JetBrains and Zed
  • BAML v1 (public beta): standalone language with built-in tests and agent stdlib
  • Docs MCP server for coding agents

How to use it

Python (v0)
pip install baml-py
baml-cli init
TypeScript (v0)
npm install @boundaryml/baml
npx baml-cli init
BAML v1 (README)
brew install baml
baml init

Commands are copied from the official documentation. Check the docs for the latest version before running them.

Limitations to know

  • docs.boundaryml.com documents v0 (the legacy DSL); v1 is a separate language in public beta with different docs
  • Requires a code-generation step (baml-cli generate) when using v0 from a host language

Alternatives

Python library for getting validated, typed structured output from LLMs using Pydantic models.

FreeOpen source

Python library from .txt that constrains LLM generation so outputs match JSON schemas, regexes, choices or grammars.

FreeOpen source

MCP servers for this

Datadog's remote MCP server that lets AI agents query logs, metrics, traces, monitors, dashboards and other Datadog data.

Free plan + paid

Google Chrome team's MCP server and CLI that let coding agents control, debug and profile a live Chrome browser.

FreeOpen source

Docker Desktop's MCP Toolkit and Catalog that run MCP servers in containers and connect them to clients through one gateway.

Free plan + paidOpen source

Skills for this

Hugging Face's Agent Skills for the Hub CLI, datasets, model training, evaluation, Spaces and SageMaker deployment.

FreeOpen source

Design skill for coding agents with 24 commands to steer, critique and audit UI, plus a rule-based detector for AI-slop patterns.

FreeOpen source

Anthropic skill that guides Claude through designing, building and evaluating MCP servers in TypeScript or Python.

FreeOpen source

Related resources

Factory's Droid coding agent for the terminal, desktop app, IDEs and Slack, with BYOK on a free plan.

Free plan + paid

Open-source coding agent for VS Code, JetBrains, the terminal and a desktop app, with 500+ models and no inference markup.

Free plan + paidOpen source

Coding agent that runs each thread in a cloud sandbox, with a CLI, web, desktop and mobile apps.

Free plan + paid

Actions runtime for AI agents: user OAuth and authorization, 7,500+ agent-optimized tools as MCP servers, and an MCP gateway.

Free plan + paid

Type to search. Use ↑ ↓ and Enter.