← All plugins

PocketMind

On-device LLM inference

Built for Unity 2021.3 LTS+C# APIOffline

Run large language models fully on the device using llama.cpp-compatible GGUF models. Build offline chat systems, NPC behavior logic and voice assistant pipelines without cloud API dependencies.

PocketMind plugin cover

SOURCE PREVIEW

A look at the code behind PocketMind

Assets / Denisitree / PocketMind / Runtime / PocketMindChat.cs
C# · UTF-8 · Unity 2021.3+ · 0 lines

Quick start

Use the API in a Unity scene.

  1. Add the PocketMindChat component to a GameObject.
  2. Set the model path, context size and system prompt for the local LLM session.
  3. Call SendAsync and listen for the token and completion events to stream a reply.
Read the docs Contact

What it does

Bring local reasoning into the Unity runtime.

GGUF support

Load and manage local GGUF models with a C# API designed for Unity scenes and editor workflows.

Chat templates

Format prompts with system prompts and conversation memory while preserving model-specific behavior.

Token streaming

Render generated text as tokens arrive for live chat experiences, narrative generation and in-game reactions.

Editor model manager

Plan for a Unity editor window to download, inspect and manage model files and local caches.

Runtime agent logic

Use local reasoning to build smart NPCs, quest logic, generated dialogue and player assistance systems.

Offline-first design

Work without a cloud API so the experience stays private, portable and resilient in offline conditions.

Planned API

API preview, subject to change.

Denisitree.PocketMind
using Denisitree.PocketMind; using UnityEngine; public class NPCBrain : MonoBehaviour { private LocalChatModel model; private async void Start() { model = new LocalChatModel("models/phi-3-mini.gguf"); model.SystemPrompt = "You are a helpful game guide."; var response = await model.GenerateAsync("Tell me about this dungeon."); Debug.Log(response); } }

Planned platforms & requirements

Runtime plans and expected requirements.

CategoryPlanned support
PlatformsWindows, macOS, Linux, Android, iOS
UnityUnity 2021.3 LTS+
Model formatGGUF, llama.cpp-compatible
Core featuresChat templates, system prompts, token streaming
PerformanceDepends on device, model size and local hardware capability

Works well with

Pair it with the rest of the Denisitree toolkit.

Roadmap

Current focus for PocketMind.

Core buildModel loading and basic generation for a single chat loop.
Private alphaPrompt formatting, token streaming and editor model handling.
Public betaStability, optimization and sample NPC agent scenarios.

Screenshots

Concept visuals for the local AI workflow.