0441GitHub
feelings
BAML language support for an AI if-statement: `.feels()` as a real, typed method backed by a decision model.
BoundaryML/feelingsREADME ↗
# feelings
**`.feels()` on anything.** A programming language for LLM workflows where the
"AI if statement" is a real, typed method — powered by [TypeSafe AI's Jev](https://docs.typesafe.ai/api)
and [BAML](https://boundaryml.com).
```baml
let email = baml.io.input("email: ");
if (email.feels("urgent")) {
baml.io.println(email.ask("Draft a reply"));
}
```
This started as a reply to [@southpolesteve's Probably](https://probably-lang.southpolesteve.workers.dev/),
a toy language with `feels` baked in. The point of this repo: you don't need a new
language. `feels` is ~20 lines of BAML — an interface with a blanket implementation —
and because it's a real language, you get types, generics, loops, concurrency, tests,
and everything else for free.
> Jev makes the decisions, an LLM does the writing, and BAML ties it together.
## Try it
```sh
git clone https://github.com/boundaryml/feelings && cd feelings
baml toolchain use nightly && baml toolchain update # latest nightly
cp .env.example .env # TYPESAFE_API_KEY (Jev) + ANTHROPIC_API_KEY (for .ask)
set -a; source .env; set +a
echo "prod is down and customers can't log in" | baml run urgent
baml run inbox -- --email "any chance you have 30 min next week to chat?"
baml run demo # enums, literal unions, class fan-out, ints…
git log --format=%s | baml run grep_with_vibes -- --feeling "scary to revert"
baml test # offline — inspects the Jev requests, no key needed
```
## The language, in a few minutes
Everything below is ordinary BAML. The only thing this repo adds is
[`baml_src/vibes.baml`](baml_src/vibes.baml).
### 1. Make a judgment with `.feels()`
`feels` compares any value with a quoted description and returns a `bool`
(Jev's probability, thresholded at 0.5)