# AI Agent

### [![Response_AiAgent_Reset.png](https://simlab-soft.com/help/uploads/images/gallery/2026-03/scaled-1680-/5Y3response-aiagent-reset.png) ](https://simlab-soft.com/help/uploads/images/gallery/2026-03/5Y3response-aiagent-reset.png)AI Agent Reset Chat History

[![image.png](https://simlab-soft.com/help/uploads/images/gallery/2026-03/scaled-1680-/FTTimage.png)](https://simlab-soft.com/help/uploads/images/gallery/2026-03/FTTimage.png)The **AI Agent Reset Chat History** node enables the system to clear and reset the ongoing conversation history for a specific AI Agent. It is typically used when you want the AI to start a completely fresh interaction or switch to a new scenario without being influenced by the context of any prior messages.

### ![Response_AiAgent_SendMessage.png](https://simlab-soft.com/help/uploads/images/gallery/2026-03/scaled-1680-/response-aiagent-sendmessage.png) AI Agent Send Message

[![image.png](https://simlab-soft.com/help/uploads/images/gallery/2026-03/scaled-1680-/jCDimage.png)](https://simlab-soft.com/help/uploads/images/gallery/2026-03/jCDimage.png)

The **AI Agent Send Message** node enables the system to send a specific text message to an assigned AI Agent for processing. The **Output Voice?** boolean parameter that dictates how the AI agent will deliver its response:

- **False:** The AI agent will respond with text.
- **True:** The AI agent will process the text message and respond with generated voice audio.


### [![Response_AiAgent_StartListen.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/response-aiagent-startlisten.png)](https://simlab-soft.com/help/uploads/images/gallery/2024-08/response-value-number-add.png) AI Agent Start Listen

![Ceiling Node.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/scaled-1680-/E5cimage.png)

The **AI Agent Start Listen node** is used to make the AI start listening to the user. When activated, this node enables the AI to process and listen to spoken input from the user, allowing for interactive conversations and commands within the VR environment.

#### Example

![image.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/scaled-1680-/UjYimage.png)

In this example, an AI Doctor is set up in the AI Agents window. This window can be accessed by clicking the Interaction icon in the viewport menu, then select the AI Agents, and then add the AI name with the desired instructions in the Instructions field. A variable is created to store the AI's responses.

![image.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/scaled-1680-/2wtimage.png)

The **AI Agent Start Listen node** is used to make the AI Agent named Doctor start listening to the user when the object named "Start" is triggered. This setup enables the AI to process and listen to user input as soon as the trigger event is activated.

<iframe allowfullscreen="allowfullscreen" height="314" src="https://www.youtube.com/embed/TdABZrHXY2g" width="560"></iframe>

---

<div class="pointer-container" id="bkmrk-%C2%A0-8"><div class="pointer anim is-page-editable"><svg class="svg-icon" data-icon="link" role="presentation" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"></svg><div class="input-group inline block"> <button class="button outline icon" data-clipboard-target="#pointer-url" title="Copy Link" type="button"><svg class="svg-icon" data-icon="copy" role="presentation" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"></svg></button></div><svg class="svg-icon" data-icon="edit" role="presentation" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"></svg></div></div>### [![Response_AiAgent_StopListen.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/response-aiagent-stoplisten.png)](https://simlab-soft.com/help/uploads/images/gallery/2024-08/response-value-number-add.png) AI Agent Stop Listen

![Ceiling Node.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/scaled-1680-/Iwwimage.png)

The **AI Agent Stop Listen node** is used to make the AI stop listening to the user. When activated, this node halts the AI’s ability to process further user input, allowing the AI to respond based on the information gathered up to that point.

#### Example

![image.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/scaled-1680-/UjYimage.png)

In this example, an AI Doctor is set up in AI Agents window. This window can be accessed by clicking the Interaction icon in the viewport menu, then select the AI Agents, and then add the AI name with the desired instructions in the Instructions field. A variable is created to store the AI's responses.

![image.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/scaled-1680-/3UZimage.png)

The **AI Agent Stop Listen node** is used to stop the AI Agent from listening to the user when the "Stop" trigger event occurs. This allows the AI agent named Doctor to respond based on the input received before listening was stopped.

### [![Response_AiAgent_StopListen.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/response-aiagent-stoplisten.png)](https://simlab-soft.com/help/uploads/images/gallery/2024-08/response-value-number-add.png) AI Agent Stop Listen (Text)

[![image.png](https://simlab-soft.com/help/uploads/images/gallery/2026-03/scaled-1680-/Gldimage.png)](https://simlab-soft.com/help/uploads/images/gallery/2026-03/Gldimage.png)

The **AI Agent Stop Listen (Text) node** is used to make the AI stop listening to the user. When activated, this node halts the AI’s ability to process further user input, allowing the AI to respond based on the information gathered up to that point.

This node has an extra output "Spoken Text", when the node is activated, it outputs the input audio in text format.

---

<div class="pointer-container" id="bkmrk-%C2%A0-12"><div class="pointer anim is-page-editable"><svg class="svg-icon" data-icon="link" role="presentation" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"></svg><div class="input-group inline block"> <button class="button outline icon" data-clipboard-target="#pointer-url" title="Copy Link" type="button"><svg class="svg-icon" data-icon="copy" role="presentation" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"></svg></button></div><svg class="svg-icon" data-icon="edit" role="presentation" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"></svg></div></div>### [![Response_Ai_Valid_Key.png](https://simlab-soft.com/help/uploads/images/gallery/2025-02/response-ai-valid-key.png)](https://simlab-soft.com/help/uploads/images/gallery/2024-08/response-value-number-add.png) Has Valid AI Key

![Ceiling Node.png](https://simlab-soft.com/help/uploads/images/gallery/2025-02/scaled-1680-/2Xximage.png)

<div class="flex-shrink-0 flex flex-col relative items-end" id="bkmrk--33"><div><div class="pt-0"><div class="gizmo-bot-avatar flex h-8 w-8 items-center justify-center overflow-hidden rounded-full"><div class="relative p-1 rounded-sm flex items-center justify-center bg-token-main-surface-primary text-token-text-primary h-8 w-8">  
</div></div></div></div></div>The **Has Valid AI Key** node checks whether a valid AI key is available for AI-related features in Sim Lab Composer. This node ensures that AI functionalities can operate properly by verifying the presence of an active and valid AI key.

#### Example

[![AI has key.JPG](https://simlab-soft.com/help/uploads/images/gallery/2025-03/ai-has-key.JPG)](https://simlab-soft.com/help/uploads/images/gallery/2025-02/lXbimage.png)

In this example, the **Has Valid AI Key** node is used at the start of the scene to check if the user has an activated AI key. The node is connected to a **Branch** node, where the **False** output (indicating no valid AI key) triggers a message in front of the user, informing them that the AI key must be activated.

<iframe allowfullscreen="allowfullscreen" height="314" src="https://www.youtube.com/embed/YEMeCS8QcFY" width="560"></iframe>

---

### ![Response_AiKey_Set.png](https://simlab-soft.com/help/uploads/images/gallery/2025-07/response-aikey-set.png) Set AI Key

![Ceiling Node.png](https://simlab-soft.com/help/uploads/images/gallery/2025-07/scaled-1680-/image.png)

<div class="flex-shrink-0 flex flex-col relative items-end" id="bkmrk--40"><div><div class="relative p-1 rounded-sm flex items-center justify-center bg-token-main-surface-primary text-token-text-primary h-8 w-8">  
</div></div></div>The **Set AI Key** node allows you to assign an AI API key to a VR experience directly from the Training Builder. This lets the experience use AI features without requiring the user to manually activate an API key in the viewer. You can select the provider (OpenAI, Gemini, or OpenRouter) and embed the corresponding API key into the experience.

#### Example

[![image.png](https://simlab-soft.com/help/uploads/images/gallery/2025-07/scaled-1680-/VH8image.png)](https://simlab-soft.com/help/uploads/images/gallery/2025-07/VH8image.png)

In this example, the **Set AI Key** node is connected to a **Scene Start** event to initialize the AI provider as soon as the experience begins. After adding the node and selecting the provider, the API key is pasted into the node’s field. The key is then activated when the scene starts, allowing the AI agent to respond without the user needing their own key. If the embedded key is not active or reaches its usage limit, the experience automatically switches to the user’s API key in the viewer if one is available.

Check this **[tutorial](http://youtube.com/watch?v=qzqNtXBTGY4)** for more about this node.

<iframe allowfullscreen="allowfullscreen" height="314" src="https://www.youtube.com/embed/qzqNtXBTGY4" width="560"></iframe>

---

### ![Response_AiModel_Set.png](https://simlab-soft.com/help/uploads/images/gallery/2025-07/response-aimodel-set.png) **Set AI Agent Model**

![Ceiling Node.png](https://simlab-soft.com/help/uploads/images/gallery/2025-07/scaled-1680-/R5Nimage.png)

<div class="flex-shrink-0 flex flex-col relative items-end" id="bkmrk--47"><div><div class="relative p-1 rounded-sm flex items-center justify-center bg-token-main-surface-primary text-token-text-primary h-8 w-8">  
</div></div></div>The **Set AI Agent Model** node is used to assign a specific AI provider and model to an AI agent in your VR experience. This ensures the AI agent will operate using the selected provider and model for any interactions that occur in the scene. You can choose the AI agent you have created, specify the provider (OpenAI, Gemini, or OpenRouter), and define the model name.

#### Example

[![image.png](https://simlab-soft.com/help/uploads/images/gallery/2025-07/scaled-1680-/XCzimage.png)](https://simlab-soft.com/help/uploads/images/gallery/2025-07/XCzimage.png)

In this example, the **Set AI Agent Model** node is triggered by pressing a button in the VR scene. When the button is clicked, the node assigns the “Patient” AI agent to the OpenAI provider and sets the model to GPT‑4. This setup allows the AI agent to function with the defined provider and model as soon as the event is triggered.

Check this **[tutorial](http://youtube.com/watch?v=qzqNtXBTGY4)** for more about this node.

<iframe allowfullscreen="allowfullscreen" height="314" src="https://www.youtube.com/embed/qzqNtXBTGY4" width="560"></iframe>

---

###  Using AI Providers and API Keys in SimLab Composer

SimLab Composer now supports **OpenAI, Google Gemini, and OpenRouter** for integrating AI into your VR experiences. With the new **Set AI Key** and **Set AI Agent Model** nodes, you can connect your experience to these providers .

 **Providers and Models:**

**1️⃣ OpenAI**

- **Provider URL:** `https://api.openai.com/v1/chat/completions`
- **Models:**
    
    
    - gpt‑4.1
    - gpt‑4
    - gpt‑3.5‑turbo

**2️⃣ Google Gemini** (OpenAI‑compatible endpoint)

- **Provider URL:** `https://generativelanguage.googleapis.com/v1beta/openai/chat/completions`
- **Models:**
    
    
    - gemini‑2.0‑flash

**3️⃣ OpenRouter**

- **Provider URL:** `https://openrouter.ai/api/v1/chat/completions`
- **Models:**
    
    
    - openrouter/cypher‑alpha:free
    - nvidia/llama‑3.3‑nemotron‑super‑49b‑v1:free
        
        
        - **OpenAI keys** work with **Chat, Text‑to‑Speech, and Speech‑to‑Text**.
        - **Gemini and OpenRouter keys** work with **Text only.**

<div class="mb-2 flex gap-3 empty:hidden -ml-2" id="bkmrk--53"><div class="items-center justify-start rounded-xl p-1 flex"><div class="flex items-center"><div class="flex"><button aria-label="Good response" class="rounded-lg text-token-text-secondary hover:bg-token-main-surface-secondary" data-testid="good-response-turn-action-button"></button><button aria-label="Bad response" class="rounded-lg text-token-text-secondary hover:bg-token-main-surface-secondary" data-testid="bad-response-turn-action-button"><svg class="icon-md-heavy" fill="none" height="24" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"></svg></button>  
</div><button aria-label="Edit in canvas" class="rounded-lg text-token-text-secondary hover:bg-token-main-surface-secondary"><svg class="icon-md-heavy" fill="none" height="24" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"></svg></button><div class="flex items-center pb-0"><svg class="icon-md" fill="none" height="24" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"></svg>  
</div><button aria-expanded="false" aria-haspopup="menu" class="cursor-pointer h-[30px] rounded-md px-1 text-token-text-secondary hover:bg-token-main-surface-secondary" data-state="closed" id="bkmrk--58" type="button"></button></div></div></div>