Foil Engine DocumentationBuild AI-powered NPCs with dynamic conversations, state machines, and scoring.Get StartedQuickstartLearnCore ConceptsPersonas, scenarios, states, transitions, and scoring.ExamplesReal-world NPC templates and patterns.BuildBuild a ScenarioStep-by-step guide to creating an NPC conversation flow.Test ConversationsValidate your NPC with chat preview and testing strategies.Publish & ShareShare your NPC via publish links.API ReferenceAuthenticationJWT auth, rate limits, and error handling.Chat APISend messages and manage conversation sessions.Personas APICreate, list, and manage NPC personas.Game SDKsPython SDKInstall with pip for Python projects.TypeScript SDKInstall with npm for Node.js, web, or Bun.Unity SDKAdd via UPM for Unity 2021.3+.