feelings
BAML library adding a typed .feels() 'AI if statement' backed by Jev, with .how() for probabilities and an LLM only for writing.
Overview
feelings, from BoundaryML, shows that an AI if-statement does not need a new language. In BAML, .feels() compares any value with a quoted description and returns a bool from Jev's probability thresholded at 0.5, so you can write if (message.feels("genuinely urgent")). .how() returns the probability so you choose the threshold, and demos cover enums, literal unions, class fan-out and integers. An .ask() method uses an LLM for writing, so Jev makes the decisions, an LLM does the writing, and BAML ties it together.
The whole feature is about twenty lines of BAML (an interface with a blanket implementation), giving types, generics, loops, concurrency and tests for free. It started as a reply to Probably, a toy language with feels built in. Example commands include an urgency check, an inbox triage and grep_with_vibes over git log, and baml test runs offline by inspecting Jev requests without a key.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does this value feel like the description (e.g. genuinely urgent)? | true · false |
| Choice | Which enum or literal value best fits this input?(inferred) | — |
How it works
- Call value.feels("description") or .how() in BAML
- Jev returns the probability
- Branch in code with a 0.5 or custom threshold
- Use .ask() with an LLM when text is needed
Strengths
- Typed AI conditionals in an existing language
- Offline tests without a key
- Clear decision/writing split
Caveats
- Requires the BAML nightly toolchain
- Default 0.5 threshold may need tuning
Getting started
git clone https://github.com/boundaryml/feelings, baml toolchain use nightly, set TYPESAFE_API_KEY and ANTHROPIC_API_KEY, then echo "..." | baml run urgent.At a glance
- Type
- Project
- Status
- prototype
- Language
- BAML
- Runtime
- BAML toolchain
- Has code
- yes
- Has tests
- yes
Use cases and integrations
How curated lists describe it
BAML language support for an AI if-statement: `.feels()` as a real, typed method backed by a decision model.
MrJev/awesome-jev
Frequently asked questions
What does .feels() return?
A bool from Jev's probability thresholded at 0.5.
Can I get the probability?
Yes, with .how().
Do tests need a key?
No, baml test inspects Jev requests offline.
Related projects
Agent Zero plugin adding a typesafe_query tool that asks Jev Choice, Noul and Score questions and shows probability cards in chat.
ProjectbetaPythonGo integration bringing TypeSafe Choice, Score and Noul to Google's adk-go agents, with a typed client, routing agent and callbacks.
ProjectbetaGoDeepSeek Harness plugin exposing Jev noul, choice and score as agent tools, with configurable guardrails and Web UI result cards.
PluginbetaTypeScriptRuby gem for probabilistic conditionals like Feelings(msg).like?("urgent"), answered by Jev or other decision models.
ProjectbetaRubyAx, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.
PluginproductionTypeScriptCline's official curated plugin collection, which includes jev-browser, jev-guard and jev-playground plugins.
PluginproductionTypeScript