# @leumas/behavior

The behaviour layer: EMA interest profiles with lazy decay, hourly/daily rollups, session transitions, and the next-best-action scorer. Drizzle handles are injected — this engine has no database...


Interest profiles, rollups and session transitions over the behaviour ledger.

- **`profile.js`** — an exponential moving average with **lazy decay**. The mass decays alongside the
  vector, which is what stops the profile freezing; `learningRate()` is the number that proves it.
- **`weights.js`** — event weights in **one place**. Prose points here rather than restating them.
- **`rollup.js`** — pure aggregation: hour/day rollup cells, session-bounded transitions, per-user folds.
- **`store.js` / `runner.js`** — persistence and the job. Drizzle handles are injected.

Nothing here imports a database driver. `pnpm --filter @leumas/behavior test`.


---
Source: shared/engines/behavior/README.md
Canonical: https://docs.leumas.tech/p/engines/behavior
