DOCS / INDEX

Docs for shipping AI NPC memory

Start with an NPC retrieval call, then branch into entities, events, context budgets, and engine plugins.

The docs are organized around the memory graph behind your game. Keep your dialogue engine. Use Seizn for persistent entities, relations, witness logs, and next-turn recall.

Quickstart: create an NPC, log an event, retrieve context

This is the shortest path from a new graph to a memory-aware NPC turn using the public graph API.

curl -X POST https://seizn.com/api/v1/graph/$GRAPH_ID/entities \
  -H "Authorization: Bearer $SEIZN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"character","name":"Mira","external_id":"npc_mira"}'

curl -X POST https://seizn.com/api/v1/graph/$GRAPH_ID/extract \
  -H "Authorization: Bearer $SEIZN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Mira saw the player leave the old gate at dusk."}'

curl -X POST https://seizn.com/api/v1/graph/$GRAPH_ID/context \
  -H "Authorization: Bearer $SEIZN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"What does Mira know about the player right now?","max_entities":8,"max_depth":2}'

NPC entities + relations

Model the graph the way narrative design already thinks: characters, factions, households, locations, and the relations that connect them.

Entities

Use graph entities for NPCs, factions, locations, quest objects, and anything that should be recallable across turns.

Read tutorial

Relations

Store kinship, faction allegiance, witness links, and social state in the graph instead of rebuilding them in prompt text.

Open API reference

Events + witnesses

Log world changes once, then let Seizn extract entities and relationships from those event traces.

Event ingestion

POST raw narrative text or simulation output to extraction endpoints and turn it into graph updates.

See event endpoints

Witness chains

Track which NPC saw, heard, or inherited an event so recall can diverge by perspective instead of flattening into one canon blob.

See modeling guide

Retrieval + context budgets

Retrieve the smallest graph slice that explains the next turn: relevant entities, their relations, and the recent event chain.

Context building

Use graph context endpoints to limit recall by max entities, depth, and relationship inclusion before a turn is generated.

Inspect context API

Budgeting

Tune retrieval depth and entity count to keep context tight for both low-cost NPC loops and larger studio deployments.

Check limits

Engine plugins

The plugin story starts the same way in every engine: create the NPC node, log the event, ask for recall on the next turn.

Unity, Unreal, Godot

The integrations hub is where engine-specific setup will live. Use it when you are wiring the memory call into a real game loop.

Open integrations hub

Raw HTTP, Python, JavaScript

If you are still proving the loop, start from thin wrappers and keep the memory call explicit before moving into engine plugins.

See integration paths

API reference

When you need exact request shapes, limits, auth, and failure modes, jump out of the hub and into the reference pages.

Reference

Graph entities, extraction, context building, and auth details.

Open reference

Errors, limits, security

Plan for bad requests, auth failures, throughput limits, and deployment constraints before launch.

Review failure modes