AI Recipe: Bot Using Memory API And Behavior Tree
Short recommendation recipe for reading memory and feeding Behavior Tree automation.
Bot Using Memory API And Behavior Tree
| Field | Value |
|---|---|
| Complexity | Medium |
| Example | POE2 Helper |
| End Goal | Read a small amount of memory, show it to the user, and let Behavior Tree use the same values. |
| Key Technologies | Memory API, Behavior Tree, Blazor window, shared script variables |
Use When
- The bot logic already lives in Behavior Tree.
- A script needs to read memory and expose a few values to that tree.
- The user also needs a small window showing those values.
- A full ImGui bot panel would be too much.
Example Illustration
Path of Exile 2 Helper - Auto HP/MP shows this pattern: a small status/config window, memory reads in C#, and Behavior Tree nodes using the values.



Shape
- Read only the memory values the Behavior Tree needs.
- Store or expose those values in a small shared values object or script variables.
- Show the same values in a compact Blazor window.
- Let Behavior Tree nodes read the values and decide what to do.
- Show process/window loss clearly in the UI.
Choices
- How the user picks the process/window.
- Which values must be shared with Behavior Tree.
- Which values are only for display.
- Whether the window is normal, topmost, or compact.
- Whether Behavior Tree reads script variables or calls a script/service.
APIs To Look Up
IBlazorWindowBlazorReactiveComponent<T>IDialogWindowUnstableScriptingApiIWindowHandleIWindowSelectorIWindowMatcherIBehaviorTreeAccessorScriptVariable<T>IProcess
Avoid
- Large control panels.
- Treating the window as an overlay rendering layer.
- Hiding process attach/read failures.
- Persisting raw handles, process ids, or runtime addresses.
Related Maps
windows-subsystems/blazor-windows.mdwindows-subsystems/window-handles.mdmemory/processes.mdauras/overview.mdscripting/runtime.md