Skip to main content
A behavior is a detection target — a named signal you want Velma to look for in a conversation. You include behaviors in your BatchConfig before streaming audio, and Velma emits a behavior_detection event for each one with a verdict, a confidence score, and the clips that served as evidence. Behaviors are the primary mechanism for customizing what Velma pays attention to. The same underlying audio can be evaluated against a compliance checklist, a safety policy, a sales coaching rubric, or any other set of criteria — it all depends on the behaviors you define.

Two ways to use behaviors

Use a pre-built behavior. Modulate maintains a catalog of behaviors covering common use cases across customer support, sales, content moderation, media monitoring, and more. Call GET /api/velma-2-batch/list-presets or GET /api/velma-2-streaming/list-presets to retrieve the catalog. Each entry includes an identifier you reference with the "preset:<identifier>" syntax in your behaviors array. Define a custom behavior. Supply your own BehaviorDef with a name and description you write. Velma evaluates whatever criteria you specify. You can start from scratch or adapt a pre-built definition as a template. Both paths use the same BehaviorDef object in your BatchConfig. The difference is whether the UUID and descriptions come from the preset catalog or from you.

The BehaviorDef schema

Every behavior in your BatchConfig.behaviors array must include all four required fields:

What Velma returns

Each behavior produces a behavior_detection event:
detected is the primary verdict. evidence_clip_uuids links the detection back to the specific clips in the session.

A minimal example

Using a preset reference — the simplest path:
Or with a full BehaviorDef for custom or adapted language:

Next steps

Using behaviors

How to retrieve the preset catalog and include behaviors in your requests.

Custom behaviors

Define your own behaviors from scratch or adapted from pre-built ones.

Best practices

Write descriptions that produce consistent, accurate detections.