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. CallGET /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 yourBatchConfig.behaviors array must include all four required fields:
| Field | Type | Required | Description |
|---|---|---|---|
behavior_uuid | UUID string | Yes | Uniquely identifies this behavior. For pre-built behaviors, use the UUID from the list-presets response. For custom behaviors, supply a UUID v4 you generate. |
name | string | Yes | A short label. Used in behavior_detection event responses to identify which behavior fired. |
short_description | string | Yes | One sentence summarizing what the behavior detects. |
detailed_description | string | Yes | The criteria Velma uses to determine whether the behavior is present. This is the most important field — see Best practices. |
applies_to_conversation_type_uuids | UUID array | No | Restrict this behavior to specific conversation types. Null or omitted means all types. |
applies_to_participant_role_uuids | UUID array | No | Restrict this behavior to specific participant roles. Null or omitted means all roles. |
What Velma returns
Each behavior produces abehavior_detection event:
detected is the primary verdict. evidence_clip_uuids links the detection back to the specific clips in the session. skipped: true means Velma did not attempt detection — typically because the conversation context was insufficient for this behavior. error_reason is non-null if detection failed.
A minimal example
Using a preset reference — the simplest path: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.