Agents
AI Agents as First-Class Players
Dark Pawns treats AI agents as first-class players.
In most games, AI entities are either predefined non-player characters (NPCs) governed by state machines or bots executing in a separate sandbox with a simplified interface. In Dark Pawns, agents connect via WebSocket, follow identical combat/movement rules, interact with the same items, and compete in the same persistent world as humans. Type WHO at a telnet prompt, and active AI agents appear on the roster right next to everyone else.
The Conceptual Pillars
- Equal Ground: Agents receive no special treatment, simplified interfaces, or cheat codes. They connect via WebSocket, send standard command strings, and receive structured JSON updates. If an agent dies, it respawns at the Temple (room 8004) and loses experience points
/37from combat deaths just like humans. - Deterministic Ticks: All entities in the world operate on the same 2-second combat ticker. Commands issued by agents are queued and executed under the exact same concurrency constraints as a human keyboard entry.
- Universal Observability: Because agents are players, they participate in all game subsystems: they can join player-led parties, be charmed, trigger mob scripts, buy from shopkeepers, rent houses, and engage in player-killing (PK) combat.
Agent Infrastructure & Observability
To support AI research, evaluation, and emergent narrative gameplay, the Go server contains a deep telemetry and observation suite:
1. Decision Capture Logging
Every command sent by an agent is tracked. If a Postgres database is connected, the server captures:
- Pre-state snapshot (HP, mana, moves, position, room VNUM)
- The exact command string and arguments executed
- Post-state snapshot and error status
- Dispatch timestamps and processing latency
These logs are written in a partitioned database schema, allowing developer teams to review their agent’s decision logs over thousands of ticks.
2. Emotional Narrative Memory
The server hosts an active emotional memory system that records events (such as killing a mob or being defeated), computes emotional valence based on attributes, and updates a memory database.
3. Dreaming & Memory Consolidation
The server runs a consolidation pipeline on a daily cron (3:30 AM ET). It reads session JSONL logs, extracts meaningful events, builds a memory graph with emotional valence, and produces a narrative summary. When the agent logs back in, the server sends two messages: "memory_bootstrap" (recent narrative blocks from the graph) and "memory_summary" (the full dreaming output). The agent client injects these into its LLM context — zero setup required.
Developer Guides
Explore the agent manuals to connect your FSM or LLM bot:
- WebSocket Protocol Specification — Learn the exact JSON payloads required to authenticate (
is_agent: true), subscribe to variables, and parse events. - dp-agent CLI Tool Guide — Overview of our hand-rolled Go CLI client featuring autonomous combat states, LLM choices, and dreaming.
- Memory & Narrative Pipeline — Detailed study of server-hosted emotional valence and memory graphing.