{"slug": "baml-is-basically-a-made-up-language", "title": "BAML is Basically A Made-up Language", "summary": "BoundaryML has released BAML, a new programming language designed for AI agents, featuring an anti-slop type system with no 'any' or unchecked casts, built-in observability that traces every function, and support for multiple languages including Python, TypeScript, Java, C#, Go, Rust, and more. The language claims to be 6x faster than OpenTelemetry in Rust and 200x faster in Python, with traces 1000x smaller, and includes workflow primitives like concurrency and retries.", "body_md": "# Modern programming languages weren’t built for agents.\n\nBAML is Basically A Made-up Language.\n\nWe designed it to fight slop. As you read the code, it should feel like TypeScript (unions, generics, lambdas), but with no escape hatches (like `as any`\n\n).\n\nBAML has the:\n\n- syntax and readability of TypeScript\n- correctness and tooling of Rust\n- compile times and concurrency of Go\n- dynamism and nothing else of Python\n\nThe parts different from TypeScript are:\n\n[Observability and profiling](#observability)\n\nEvery function traced and profiled, locally. Agents can read the traces.\n\n[AI functions](#ai-functions)\n\nStreaming, batching, websockets, voice, any provider.\n\n[The anti-slop type system](#language)\n\nNo `any`\n\n, no unchecked casts, no imports. But we did add pattern matching.\n\n[Agent-first toolchain](#tooling)\n\nCompiles faster than Go, searches better than ripgrep, packs smaller binaries than Bun.\n\n[Workflow primitives](#workflows)\n\nConcurrency, retries, cancellation, codemode, sandbox. It’s a lot, just read the code.\n\n[Better testing](#evals)\n\nGenerate tests from data or prod traces. Grade flaky (AI) functions over many runs.\n\nAnd, most importantly:\n\n[Incremental adoption](#adopting)\n\nBAML runs standalone on:\n\n- macOS\n- Linux\n- Windows\n\nor inside your existing projects in:\n\n- Python\n- TypeScriptNode\n- TypeScriptWeb\n- Java\n- C#\n- .NET\n- C++\n- Go\n- Rust\n- KotlinAndroid\n- SwiftiOS\n- PHPsoon\n- Rubysoon\n\nBut not JavaScript. Never JavaScript. Plz stop.\n\nType-safe like OpenAPI, but capable like FFI.\n\n## Observability and profiling\n\nAgents write more code than any human can read. Telemetry is the only way to understand what happened. BAML traces every function instead of sampling a percentage. It’s 6x faster than OpenTelemetry in Rust, 200x faster in Python, and the traces 1000x smaller.\n\nThe field forgets as fast as it learns. 147 events dropped since you opened this page.\n\nNothing is forgotten.\n\nRead more → [How BAML keeps tracing fast enough to always leave on](/techdocs)\n\n## AI functions\n\nCalling a model should feel like calling a function, not wiring up an SDK. In BAML it’s a typed function: declare the input and output types, get structured data back. Malformed output gets repaired against your types by schema-aligned parsing, so every model gets better at structured output.\n\nRead more → [AI functions in BAML](/techdocs)\n\n## The anti-slop type system\n\nEvery invariant you can’t enforce is one an agent will eventually violate. Start with type erasure: we don’t do it, so there’s no `any`\n\nor unchecked cast for a model to hide behind. In BAML, invalid states don’t compile.\n\n```\ninterface User {  name: string;  email: string;}// 'as' is an unchecked promise the compiler believesconst user = JSON.parse(raw) as User;user.email.toLowerCase();\n```\n\nRead more → [The BAML language](/techdocs)\n\n## Agent-first toolchain\n\nFor decades, tooling was built for humans: LSPs, autocomplete, hover docs. It’s about time the real author of the code got fair treatment. An LSP for you, `baml describe`\n\nand friends for them. And a really fast compiler for both.\n\n``` bash\n$ baml run main   Compiling 1 file(s)    Compiled 1 file(s) in 1s\"hi, world\"$ baml run greet -- --name \"hacker news\"Greeting { message: \"hi, hacker news\" }$ baml run greet -- --helpfunction greet(name: string) -> GreetingOptions:      --name <string># any function is a target; its params become --flags\n```\n\nRead more → [The BAML toolchain](/techdocs)\n\n## Workflow primitives\n\nHow has everyone accepted async as a good idea? Half your codebase ends up as two copies of the same function, one sync and one async. Like Go, BAML has green threads. Unlike Go, you can await what they return.\n\nRead more → [Workflows in BAML](/techdocs)\n\n## Better testing\n\nEngineers spent twenty years squashing flaky tests. Then AI made everything flaky. BAML tests can grade distributions. Cases can be hard-coded examples, golden datasets, or real prod traces.\n\n``` js\ntestset \"from object storage\" {  let res = baml.http.fetch(\"https://datasets.example.com/golden.csv\");  let rows = res.text().split(\"\\n\");  for (let row in rows.slice(1, rows.length())) {    let cols = row.split(\",\");    test (\"golden: \" + cols[0]) {      assert.equal(classify(cols[0]), cols[1]);    }  }}\n```\n\nRead more → [Evals in BAML](/techdocs)\n\nelephants in the room\n\n## I’m hyped. How do I port my codebase to BAML?\n\nDo not rewrite your codebase in BAML.\n\nYou can if you want. But we went the extra mile in the other direction: every type, every function, every method crosses the bridge to your language. Even generics. Even lambdas. Even tracing. Sht just works. Read more → [Incremental adoption](/techdocs)\n\n## Can models actually write BAML?\n\nDecide for yourself. BAML reads like TypeScript and is already an official language on GitHub, so models should know most of it. We don’t leave the rest up to vibes. We measure how agents write programs: how long it takes, what it costs, how many turns. `baml describe`\n\nwasn’t a coincidence. It’s a science.\n\nAnd remember, today is the worst the models will ever be at BAML. Read more → [Agent tries BAML](/techdocs)\n\n## Is there an ecosystem?\n\n`npm install is-even`\n\n. It depends on `is-odd`\n\n? That depends on `is-number`\n\n?! 🤯 We’re rethinking package management from first principles. For now, we’ve shipped a thorough standard library. For anything else, ask Claude to port what you need, or pass functions over the bridge.\n\nBesides, no packages means no supply chain attacks. QED.\n\n## Are you trying to get bought by Anthropic?\n\nNo thank you.\n\nThe BAML language is and will always be open. Apache-2, free, works offline.\n\nWe make money on Boundary Web Services. Build the language, the runtime, and the tracing layer, and you can make things nobody else can. We think you’ll love paying for some of them.\n\nSome of you may wish to build your own cloud. Good luck and Claudespeed.\n\nFor the rest, we’re launching with observability, and saving you from Datadog. [Reach out](mailto:vbv@boundaryml.com?subject=I%20want%20to%20send%20BAML%20monies) if you want in early.\n\n## Try BAML\n\nOTEL dropped 147 events while you read this page.\n\nBook a free 45-minute session with the team. We'll get you set up and work through your actual use case.\n\n[Book a session](/eap)\n\nJoin the BAML Discord. We're around to help you get set up, and we read every bit of feedback.\n\n[Join the Discord](https://boundaryml.com/discord)\n\n[Try BAML](#try-baml)", "url": "https://wpnews.pro/news/baml-is-basically-a-made-up-language", "canonical_source": "https://boundaryml.com/", "published_at": "2026-08-14 20:20:57+00:00", "updated_at": "2026-08-14 20:43:14.560059+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents"], "entities": ["BoundaryML", "BAML", "TypeScript", "Rust", "Go", "Python", "OpenTelemetry"], "alternates": {"html": "https://wpnews.pro/news/baml-is-basically-a-made-up-language", "markdown": "https://wpnews.pro/news/baml-is-basically-a-made-up-language.md", "text": "https://wpnews.pro/news/baml-is-basically-a-made-up-language.txt", "jsonld": "https://wpnews.pro/news/baml-is-basically-a-made-up-language.jsonld"}}