skillfed

baml-py

BAML v0 — Python runtime for baml_client

baml-py v0.225.0 489.9K downloads/30d#6,372 on PyPI9,006
License unclear Active released

What it is and what it does

baml-py is the Python runtime component for BAML, a language designed specifically for building agents with a strong type system. It allows you to execute BAML code from Python, bridging the gap between BAML's compile-time safety guarantees and Python's runtime ecosystem. The package is a binary distribution with no runtime dependencies that executes pre-compiled BAML code.

BAML emphasizes preventing agent mistakes through typed errors, static analysis, and a built-in standard library for agents. The language supports green threads and colorless concurrency. baml-py enables incremental adoption—you can call BAML functions from Python alongside existing code, or integrate it into larger systems that also use other languages.

Use it for:

  • Build Python-based agents with compile-time type safety and error handling
  • Incrementally adopt BAML in existing Python projects by calling BAML functions
  • Implement agent logic with built-in testing and evaluation frameworks
  • Create multi-language agent systems where Python calls BAML functions

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

baml-py is the Python runtime for executing BAML programs, a language designed for building agents with strong typing and error handling.

Yes, if you are building agents in Python and want the type safety that BAML provides. The package is actively maintained, has no known vulnerabilities, and installs cleanly across major platforms. However, verify the license terms first (currently unclear) and confirm that BAML's compilation tooling fits your workflow—baml-py is the runtime only.

Install

baml-py on PyPI

pip

pip install baml-py

uv

uv add baml-py

poetry

poetry add baml-py

Installing baml-py

Before you install

Medium install friction due to platform-specific binary wheels across macOS, Linux, and Windows architectures. Active maintenance with recent releases and a well-maintained repository (9006 stars, last commit 2026-08-14).

License in practice

License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before adopting in commercial or restricted-license projects.

Quickstart

pip install baml-py

import baml_py
# Call BAML functions from your compiled BAML project

Requires Python 3.10 or later. BAML programs must be compiled and available in your project; baml-py is the runtime component only.

Verify before relying

  • How baml-py integrates with the BAML compiler and project structure in practice
  • Whether baml-py can be used standalone or requires external BAML tooling installation
  • Performance characteristics and typical use patterns for agent workloads
  • What the actual license terms are for this package

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 13 days since the last release
Last repo commit
First released
Downloads 489,945/month — #6,372 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: baml_py-0.225.0-cp38-abi3-macosx_10_12_x86_64.whl; baml_py-0.225.0-cp38-abi3-macosx_11_0_arm64.whl; baml_py-0.225.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; baml_py-0.225.0-cp38-abi3-manylinux_2_24_aarch64.whl; baml_py-0.225.0-cp38-abi3-musllinux_1_1_aarch64.whl; baml_py-0.225.0-cp38-abi3-musllinux_1_1_x86_64.whl; baml_py-0.225.0-cp38-abi3-win_amd64.whl; baml_py-0.225.0-cp38-abi3-win_arm64.whl

Tags

baml python runtimeagent programming languagetyped agent frameworkbaml python clientagent type system python
agent-frameworktype-safety

More Artificial Intelligence packages