The hyper-observable programming language
BAML is a programming language with built-in telemetry. Replace 10+ separate tools with one toolchain that helps agents test, trace, query data, build alerts, and more.
No single stack has ever gone past deploy.
Until now.
Used by engineers at
Hyperobservability is observability that is always on, by default, for everything.
BAML's toolchain helps agents at compile time, and after deployment. The runtime records your program as it runs and sends it to Boundary Cloud, or stores it locally in SQLite if you don't use the cloud. There's no SDK to install and no collector to run.
Observability
More work, less data.
Hyperobservability
No work, more data.
Make decisions faster, with less CI time.
BAML enables you to observe everything at a fraction of the cost, allowing you to have more complete information.
Observability
Time to a decisionstill waiting, day 1
Monday, November 2
Vaibhav6:12 PM
@claude the support agent refunded a customer twice. How?
ClaudeAPP6:13 PM
The LLM trace shows one issue_refund tool call. Inside the tool, nothing is traced.
ClaudeAPP6:14 PM
I'll add tracing inside the tool.
Tuesday, November 3
ClaudeAPP9:21 AM
Opened a PR to trace refunds.
acme/support-agent#1287 Trace issue_refund and its retriesOpen+52−23 filesClaudeAPP10:40 AM
Merged. Waiting for another double refund ⏳
Friday, November 6
Vaibhav2:05 PM
Finance found two more 😬
ClaudeAPP2:09 PM
Checked the traces: no new double refunds since Tuesday. Finance's two must be older, from before we traced. Still waiting ⏳
Tuesday, November 10
ClaudeAPP9:40 AM
Caught one. Inside issue_refund, POST /refunds took 31s. The client retried at 30s.
Vaibhav9:45 AM
How many customers did it hit before this?
ClaudeAPP9:46 AM
Can't tell. We weren't recording then. Finance would have to dig through the payment records.
ClaudeAPP12:20 PM
Fix is through CI and deployed. Finance is still working on the list.
Message #support
Hyperobservability
Time to a decision3 minutes
Monday, November 2
Vaibhav6:12 PM
@claude the support agent refunded a customer twice. How?
ClaudeAPP6:13 PM
The model called the issue_refund tool once. The AI part is fine.
ClaudeAPP6:13 PM
Inside the tool, POST /refunds took 31s. The client retried at 30s, and both went through.
ClaudeAPP6:14 PM
Same thing hit 23 customers since October 3. $4,180 in all.
ClaudeAPP8:40 PM
Fix is through CI and deployed. Emailed all 23 customers.
Message #support
Asked
Inside the tool isn’t traced
Tracing merged
Now wait for a repeat
Finance finds 2 more
From before the tracing
Caught one
Decided: make refunds idempotent
Fix shipped after CI, 12:20 PM
Customers not emailed
Answered in 3 minutes
Decided: make refunds idempotent
Fix shipped after CI, 8:40 PM
All 23 customers emailed
Drag across the timeline to move through the days.
Turn your traces to a queryable data-lake, with zero setup.
Query your program traces and profiles to generate any custom dashboard using baml query, or create alerts with baml alerts to keep track of critical metrics.
High token usage
Over threshold41.2Minput tokens this week
write_reply used 3.2× the tokens it used last week.
- write_reply41.2M
- classify12.8M
- route3.1M
SELECT span_name,
sum(total_usage[0]['input_tokens']) AS tokens
FROM spans
GROUP BY span_name
ORDER BY tokens DESCHigh token usage
Over threshold41.2Minput tokens this week
write_reply used 3.2× the tokens it used last week.
- write_reply41.2M
- classify12.8M
- route3.1M
SELECT span_name, sum(total_usage[0]['input_tokens']) AS tokens FROM spans GROUP BY span_name ORDER BY tokens DESCSecurity issue detected
Alert firing2calls to an unlisted host
An agent tool sent data to a host that is not on your list.
support_agenthttp.getpastebin.comspan_idstart_timeurl7f3a91c2Mon 6:13 PMpastebin.com/raw/9xk2b21c04deMon 6:14 PMpastebin.com/raw/9xk2SELECT span_id, start_time, input_args['url'] AS url FROM spans WHERE span_name = 'http.get' AND input_args['url'] NOT LIKE 'https://acme.com/%'
Worst latencies
Report31.2sslowest call this week
The five slowest calls, each with the input that caused it.
issue_refund{ order: 8841, amount: 182 }
31.2s
write_reply{ ticket: "Charged twice and…" }
12.9s
classify{ ticket: "Wrong plan on invoice" }
9.4s
route{ label: Billing }
7.7s
lookup_customer{ email: "j@acme.com" }
6.1s
SELECT span_name, duration, input_args FROM spans ORDER BY duration DESC LIMIT 5
- Also on the board: Errors by function, Model output drifting, Tool called twice.
No person could read this much data. Agents can, and they need to.
A query answers the question you thought to ask. An agent can read everything else.
One run. You can read this.
1 run, 200 spans
Timeouts0
Bad tool calls0
Retry loops0
GC spikes0
We made observability cheap, fast, and multimodal.
Because we own the language and the BAML runtime, we're able to make optimizations to telemetry that no other language can.
Cheap
4.6×less storage for agent traces
OpenTelemetry
Storage
Calls recorded
80%of errors lost to sampling
Boundary
Storage
Calls recorded
0%of errors lost to sampling
Fast
32 nsto observe a function
Boundary32 ns · baseline
OTel + Rust186 ns · 5.8× slower
OTel + TypeScript702 ns · 22× slower
OTel + Python9,288 ns · 290× slower
Measured on Apple M2 Max, 64 GB.
Multimodal
One storefor traces and files
Every kind of data
Images, audio, video, PDFs, large strings and bytes.
Recursive deduping
Runtime and cloud collaborate to minimize duplicated data.
Keeps your types
Classes and enums stored with their definitions.
Redaction
Keep PII data private. Withhold a value, and the trace records why.
Runs locally or in the cloud.
We didn't want to build a programming language.
But we wanted to build the most efficient vertically integrated toolchain, so we built BAML with:
- A virtual machine that runs anywhere.
- A profiler on every function, at barely any cost.
- A compiler that knows about your errors in production.
- A data lake for profiles, spans, logs, traces, and blobs.
BAML, the hyperobservable language.Boundary Cloud, the hyperobservable stack.
BAML is designed like the languages you already trust.
- 9.5k stars
- Open source, Apache 2.0
- Free to use
- No internet required
- TypeScript-like syntax
- Rust-like correctness
- Go-like concurrency
- C#-like reflection
- Python, well, you know, Python.

Start where feedback loops matter most, and keep the rest of your code.
Rewrite your stack in BAML
Start today→Everything you write gets hyperobservability.
Adopt BAML incrementally
Start today→Move one function at a time. BAML generates a typed SDK your existing code calls.
Send OTel to Boundary Cloud
Learn more→Keep your code. Send the traces you already have.
Built for agents.
Teaching Agents to Write Maintainable Code
Read the blog →
Compiler errors built for every reader
Claude Code
⏺ Bash(baml check)
Error: Exit code 4
main.baml:15:5-19:6 error[E0062]: non-exhaustive match on type Label; missing: Label.Refund
main.baml:23:17-23:31 error[E0007]: type `Ticket` has no member `priorty`
main.baml:28:24-28:39 error[E0001]: mismatched types
primary: expected `string`, found `int`Every function is a CLI
The fastest way to understand a function is to call it.
For AI functions, it's the only way.
$ baml run apply_discount -- --total 8000 --coupon SAVE20
6400
$ baml run classify_sentiment -- --text "Charged twice and nobody replied."
Negative
1 tool call
Instead of script, run, delete
LLM functions too
Try non-deterministic code
0 scratch files
No left-over slop
Code quality, on every pull request.
- uses: BoundaryML/baml-action@v1
Remove the legacy keyword router #482
A feature was removed, and the code got longer: 3 functions got worse. Lines 1,240 → 1,556.
route_ticketcognitive 12 → 41, nesting 3 → 6build_promptcognitive 8 → 27, NPath 16 → 240escalatecognitive 5 → 19legacy_router_shimcognitive 23Coming soon
More things to look forward to.
In progress
Compiled to native
Interpret for instant builds. Compile for instant execution.
PR #5218Prototype
Durable execution
Pause a run on one machine and pick it up on another.
PR #4956Proposed
Sandboxes
Milliseconds are too slow, megabytes too big.
BEP-063Designing
Feature flags
Roll out experiments 100x faster than CI/CD.
Researching
Formal verification
Prove a rule holds for every input, not just the ones you tested.

Get started with Boundary
Build a feedback loop with BAML in a live walkthrough, or bring your stack to an engineering session with our team.