baml  by BoundaryML

AI framework for reliable workflows and agents

created 1 year ago
4,964 stars

Top 10.2% on sourcepulse

GitHubView on GitHub
Project Summary

BAML is a prompting language designed to bring structure and reliability to AI workflows, targeting developers who build applications leveraging Large Language Models (LLMs). It transforms prompt engineering into a schema engineering process, enabling type-safe, maintainable, and robust AI integrations across multiple programming languages.

How It Works

BAML treats prompts as functions, defining inputs, outputs, and associated models within a dedicated syntax. This approach allows for explicit schema definition, enabling static analysis and type safety. It utilizes a proprietary Schema-Aligned Parsing (SAP) algorithm to reliably extract structured data from LLM responses, even when models lack native tool-calling capabilities or return unstructured formats like markdown or chain-of-thought.

Quick Start & Requirements

Highlighted Details

  • Enables type-safe LLM function calls and streaming interfaces in Python, TypeScript, Ruby, Go, Java, C#, and Rust.
  • Features IDE tooling (VSCode initially) for prompt visualization and faster iteration.
  • Supports retry policies, fallbacks, and model rotations for resilient AI integrations.
  • Fully open-source (Apache 2.0) and designed for offline, private use.

Maintenance & Community

Licensing & Compatibility

  • Apache 2.0 License.
  • Permissive for commercial use and integration with closed-source applications.

Limitations & Caveats

  • JetBrains and Neovim IDE support is listed as "coming soon."
  • While many companies use it in production, the "basically made-up language" aspect implies a learning curve for the new syntax.
Health Check
Last commit

20 hours ago

Responsiveness

1 day

Pull Requests (30d)
126
Issues (30d)
32
Star History
1,752 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.