Dynamic Behaviors
How dynamic behaviors adapt agent responses at runtime - trigger conditions, turn policy overrides, instruction injection, and how they work with memory.
Dynamic behaviors are runtime adaptation rules that adjust how an agent operates without changing the underlying context graph. This page explains what dynamic behaviors are, how they attach to context graph states, and how they combine with memory - the mechanism that lets a single graph serve many patients whose situations demand different handling.
API Name: Dynamic behaviors are represented as dynamic_behavior_set resources in the REST API and SDKs.
What Dynamic Behaviors Are
A context graph defines the structure of a workflow - its states, transitions, and safety boundaries. The agent's identity defines expertise and judgment. Dynamic behaviors are the third element: the director's notes that adapt the performance to the specific situation. They fire when runtime conditions match their triggers and modify how the current state operates, without modifying the graph itself.
This separation matters operationally. A medication safety signal can inject specialized verification guidance into whatever state the conversation is in - there is no need to build that contingency into every state of every graph. Behavior rules are authored once at the workspace level and apply wherever their triggers match.
Anatomy of a Behavior
Each dynamic behavior defines four things:
Trigger conditions - What activates the behavior: keywords, intent categories, emotion tiers, or specific context graph states. Triggers can combine, so a behavior can fire only when a keyword appears while the caller is in a particular emotional range.
Actions - What the behavior does when it fires: turn policy overrides, instruction injection into the agent's reasoning, or tool exposure changes that add or remove tools from the current state.
Cooldown periods - How long the behavior stays dormant after firing, preventing the same adaptation from re-triggering on every turn.
Priority ordering - Which behavior wins when several match at once, so overlapping rules resolve deterministically.
How Behaviors Attach to Context Graph States
Each context graph state carries its own turn policy - controlling which tools are available, how end-of-turn detection behaves, what response constraints apply, and when escalation triggers fire. Dynamic behaviors layer on top of this per-state configuration. When a behavior's trigger conditions match, its actions override or extend the current state's settings for as long as the behavior is active.
Because triggers can name specific states, a behavior can be scoped narrowly (inject a reminder only during the insurance verification state) or broadly (raise empathy handling whenever a distress signal appears, in any state). Either way, the graph's structure - states, transitions, exit criteria - stays intact. The behavior changes how a state executes, not where the conversation can go.
Integration with Memory
Dynamic behaviors and Functional Memory work on the same state: the graph provides structure, memory supplies context, and behaviors adapt execution.
User model integration - The user model feeds into every navigation decision. When the agent enters a state, retrieved memory - past preferences, clinical history, prior conversation outcomes - shapes which path it takes and how it applies state-level guidance. Behaviors that trigger on those signals then tune how the state runs for this specific patient.
Memory layer interaction - Different memory layers activate at different points in the graph:
Working memory - active memories retrieved during state traversal feed immediate reasoning.
Conversation history - recent interactions inform the current state and can trigger recall of older memories.
Long-term memory - historical patterns retrieved through recall states. New information collected during the conversation can also update or recontextualize stored memories.
Behavioral adaptation - When memory or live signals reveal something the graph's static definition could not anticipate - a returning caller with a history of medication confusion, an emotion tier crossing a threshold - a matching behavior adjusts turn policy, injects instructions, or changes tool exposure in that moment.
Related Pages
Context GraphsMemoryFor how per-state turn policies configure the pipeline that behaviors override, see the Reasoning Engine.
Last updated
Was this helpful?

