> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/plugins-and-integrations/convai-unity-sdk/features/dynamic-context.md).

# Dynamic context

Dynamic Context gives Convai characters real-time awareness of what is happening in the scene. Characters can reference live conditions — a trainee's current location, equipment collected, hazards triggered, or checkpoint status — and incorporate that information naturally into dialogue. Updates flow through two entry points: the `ConvaiDynamicContextCommand` Inspector component (no code required) and the `IConvaiDynamicContext` scripting interface on `ConvaiCharacter`. Both write to the same underlying tracker and produce identical network behavior.

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>How dynamic context works</strong><br>Understand the states and events model, canonical context format, and pre-conversation queueing design.</td><td><a href="/pages/Oyh83QIsfM02w8hOnerK">/pages/Oyh83QIsfM02w8hOnerK</a></td></tr><tr><td><strong>Dynamic context quick start</strong><br>Add the command component to an NPC and verify context-aware dialogue in five steps.</td><td><a href="/pages/c83fd507c05d6353540d730017d6b1681c7bb60d">/pages/c83fd507c05d6353540d730017d6b1681c7bb60d</a></td></tr><tr><td><strong>Command component reference</strong><br>Field-by-field reference for all six command types, reaction modes, and validation warnings.</td><td><a href="/pages/o4soWlixkVqAjbqKQCzH">/pages/o4soWlixkVqAjbqKQCzH</a></td></tr><tr><td><strong>Static context at connection time</strong><br>Configure initial dynamic info sent once at connection for facts that do not change during a session.</td><td><a href="/pages/wuITWZtDYpGKPOC2GUTI">/pages/wuITWZtDYpGKPOC2GUTI</a></td></tr><tr><td><strong>Sync behavior and timing</strong><br>How and when Replace, Append, and Reset messages are transmitted for each context operation.</td><td><a href="/pages/jLDVtNvrQQtepjrSEeAv">/pages/jLDVtNvrQQtepjrSEeAv</a></td></tr><tr><td><strong>Dynamic context scripting API</strong><br>Full API reference for <code>IConvaiDynamicContext</code> — all seven methods with signatures and queueing behavior.</td><td><a href="/pages/Pwb170m39yjzkfAghzLG">/pages/Pwb170m39yjzkfAghzLG</a></td></tr><tr><td><strong>Dynamic context usage examples</strong><br>Four end-to-end scenarios covering safety drills, onboarding, guided tours, and emergency transitions.</td><td><a href="/pages/3UWNhGolZFLe1BduX0bt">/pages/3UWNhGolZFLe1BduX0bt</a></td></tr><tr><td><strong>Troubleshoot dynamic context</strong><br>Investigation checklist, symptom table, decision tree, and Console log reference for common issues.</td><td><a href="/pages/7ij66qcsYVpiLPUZFGvh">/pages/7ij66qcsYVpiLPUZFGvh</a></td></tr></tbody></table>

### Next steps

Start with [Dynamic context quick start](/api-docs/plugins-and-integrations/convai-unity-sdk/features/dynamic-context/dynamic-context-quick-start.md) to get context-aware dialogue running. Then read [How dynamic context works](/api-docs/plugins-and-integrations/convai-unity-sdk/features/dynamic-context/how-dynamic-context-works.md) to understand the states and events model before moving into the reference pages.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.convai.com/api-docs/plugins-and-integrations/convai-unity-sdk/features/dynamic-context.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
