baml-py
BAML v0 — Python runtime for baml_client
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-pyuv
uv add baml-pypoetry
poetry add baml-pyInstalling 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
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
baml-bridgeProvides Python bindings for the BAML runtime,…
permissive · top 15,000 on PyPI
smolagentssmolagents lets you build and run AI agents…
unclear · top 15,000 on PyPI
agent-framework-ollamaIntegrates Ollama LLM provider support into…
permissive · top 15,000 on PyPI
hol-guardHOL Guard is a local-first antivirus and…
permissive · top 15,000 on PyPI
camel-aiCAMEL is a multi-agent framework for building,…
permissive · top 15,000 on PyPI
agent-framework-coreBuild, orchestrate, and deploy AI agents and…
permissive · top 5,000 on PyPI
lettaLetta is a framework for building LLM agents…
permissive · top 15,000 on PyPI
praisonaiagentsPraisonAI agents is a Python framework for…
unclear · top 15,000 on PyPI
openai-agentsA framework for building multi-agent LLM…
permissive · top 1,000 on PyPI
agentlightningAgent Lightning optimizes AI agents using…
unclear · top 15,000 on PyPI