Chroma Golem API Documentation

Game Systems

Building Intelligent NPCs

Create dynamic, engaging NPCs that remember interactions and respond naturally to your players using our text generation API.

Quick Start Guide

1. Define Personality

Start with core traits and motivations that drive behavior

2. Add Context

Include current situation and relevant history

3. Enable Memory

Track interactions to build consistent relationships

Key components for creating believable NPCs

Designing NPC Personalities

The key to creating believable NPCs is giving them distinct personalities. This is done through the system message in your API requests, which sets up the character's core traits and behaviors.

Example System Message

You are Sven, a friendly and helpful blacksmith in the town of Riverforge. You:
- Take great pride in your craft and love discussing metalworking
- Have a jolly personality but become serious when discussing business
- Worry about the increasing bandit activity near town
- Have a soft spot for helping young adventurers get started

Managing Dynamic Context

Context helps your NPCs respond appropriately to the current situation. Update the system message with relevant information about the environment, recent events, or the NPC's current state.

Example Context Updates

Current situation:
- It's market day in Riverforge
- Your forge is very busy with orders
- You have these items in stock: [Steel Sword, Iron Dagger, Chain Mail]
- The player has previously purchased armor from you

Implementing Memory Systems

NPCs that remember past interactions create more meaningful relationships with players. Use our memory systems to maintain consistent character knowledge and relationships.

Memory Types

  • Short-term memory: Recent interactions and current context
  • Long-term memory: Important past events and relationship history
  • Factual memory: Knowledge about the world and their role

Creating Natural Dialogue

Combine personality, context, and memory to create dynamic conversations that feel natural and responsive. Learn more about dialogue generation

Need help with your NPCs?

Join our community of game developers to share tips and get advice. Join our Discord server

Back to your dashboard
View my API keys