# Examples & Demos

#### 🧪 `rpg_demo` (Terminal)

**Location:** `examples/rpg_demo/`\
**Run with:**

```bash
cargo run --example rpg_demo
```

**What it does:**

* Loads a pre-configured agent from `config.json`
* Simulates an NPC interaction via the terminal
* Prints:
  * Input messages
  * Emotional state delta
  * Top memories recalled
  * Final generated response

> This is the fastest way to test an agent end-to-end.

***

#### 🕹️ Unity Demo (C#)

**Location:** `bindings/unity/`\
**Includes:**

* `OxydeAgent.cs` component script
* Dialogue UI prefab
* Response event hooks

**How to use:**

1. Add `OxydeAgent` to any GameObject.
2. Call `.SendInput("Hello")` from a trigger.
3. Render output in a dialogue UI canvas.

*You’ll see agent responses shift based on emotional memory.*

***

#### 🎮 Unreal Demo (C++)

**Location:** `bindings/unreal/`\
**Components:**

* `UOxydeAgentComponent`
* LLM hooks exposed to Blueprint

**Usage:**

* Attach to any `ACharacter`
* Send input via code or Blueprint
* Responses are received via delegate binding

> Works in both runtime and editor simulation.

***

#### 🌐 WASM Playground (Experimental)

**Location:** `src/wasm.rs`

* Compile with `wasm32-unknown-unknown`
* Load agents in the browser using JS bindings
* Useful for visual novels, chatbots, and tutorials

*Web UI and demo hosting in progress.*

***

#### 🧪 Stress Testing / Edge Cases

Use `rpg_demo` to test:

* Long conversation loops
* High memory load
* Rapid emotional swings
* Streaming behavior

Add breakpoints in `agent.rs` or `inference.rs` to observe inner workings.
