BehaviorDef where you supply the UUID and write the descriptions yourself. The schema is identical to a pre-built behavior — the difference is that you control everything in it.
Required fields
Every custom behavior needs all four required fields:
Generating a UUID:
A minimal custom behavior
Adapting a pre-built behavior
If a pre-built behavior is close to what you need but the detection language doesn’t fit your context, start from its definition and modify it. The critical step is to use a new UUID — this tells Velma to apply your description, not the original.1
Get the pre-built definition
Call
GET /api/velma-2-streaming/list-presets and find the behavior you want to adapt. Copy the full object.2
Generate a new UUID
Replace
behavior_uuid with a UUID you generate. This decouples your custom version from the original.3
Rewrite the descriptions
Update
name, short_description, and detailed_description to match your context. See Best practices for guidance on writing effective criteria.4
Include it in your BatchConfig
Add the modified object to
BatchConfig.behaviors. If you also include the original preset slug in presets, your custom version takes precedence because user-supplied entries override preset entries.If you include the same behavior UUID as a pre-built behavior, Velma will use the pre-built language — not your modified description. Always use a different UUID for a custom version.
- Pre-built (from list-presets)
- Custom version (scoped to returns context)
Optional fields
Scoping behaviors to specific roles is one of the most powerful ways to reduce false positives. If a behavior only makes sense when a customer does it — not when an agent does — restrict it accordingly:
Storing your configurations
Velma does not offer a server-side endpoint for persisting behavior definitions. Your fullBatchConfig — including all behavior UUIDs and descriptions — must be sent in the first text frame of every new connection. Keep your configurations in your own codebase or config system so you can reproduce them reliably.
Related
- Using behaviors — how to include behaviors in a request
- Best practices — how to write
detailed_descriptioneffectively