How OpenViking Enables Agents to Remember Grudges and Master Disguises in Multi‑Agent Werewolf Games
The article demonstrates how OpenViking adds traceable, incremental memory to multiple agents, allowing VikingBot to record game events, recognize player styles, hold grudges, form alliances, and disguise identities across Werewolf rounds, resulting in a clear win‑rate boost and near‑three‑fold accuracy improvement while maintaining strong multi‑tenant security.
Traditional single‑ChatBot systems lack persistent, collaborative memory, causing agents to repeatedly forget past actions and preventing higher‑order group behaviors such as grudges, alliances, or deep disguises. OpenViking addresses this gap by providing a unified context management layer that stores all agent interactions, votes, and reasoning steps in a traceable memory base.
Werewolf Demo with Six VikingBots
Six agents (VikingBot) were set up to play a classic Werewolf game. The "God Bot" initializes the game, assigns random roles, and writes each player’s identity to a GAME.md file. During night phases, the God Bot sends commands to the player bots, which record their actions (e.g., a wolf’s kill target) in their personal memory files.
After each round, the bots automatically submit their dialogue, votes, and reasoning to OpenViking, which extracts and stores eleven distinct memory types (e.g., user/player_1/memories, profile.md) and updates them incrementally via a patch‑based mechanism.
Round 1 – Initial Play
Agents speak, vote, and act; the wolf kills the prophet, the hunters are eliminated, and the game ends with a wolf victory.
Despite the loss, OpenViking records each bot’s speaking style and strategy, such as player 1’s tendency to “jump role cards early and rush for the sheriff”.
Round 2 – Cross‑Round Grudge and Disguise
Bot 1, remembering that player 2 was voted out early, pretends to be a clueless civilian to avoid the same fate.
Bot 2 recognizes player 3’s aggressive style from the previous round and allies with them, demonstrating memory‑driven alliance formation.
Bot 3, now a wolf, uses the stored memory of a past civilian disguise to successfully masquerade as a prophet, misleading other bots.
Round 3 – Win‑Rate Growth
Bot 1 (wolf) reuses the successful disguise pattern from Round 2, surviving longer but ultimately losing by a single vote.
Bot 3 continuously reinforces its “aggressive” persona, leading to consistent survival and eventual victory for the good side.
Statistical analysis shows a clear upward trend in VikingBot win rates as more rounds are played and memories accumulate.
OpenViking Memory Management
OpenViking stores context under a unified viking:// protocol, allowing agents to perform file‑system‑like operations ( ls, tree, read, find/search). It employs a three‑layer token hierarchy (L0 summary, L1 concise, L2 full) to deliver the most useful information with minimal token cost.
Memory extraction uses a ReAct (Reason‑Act) loop, enabling intelligent retrieval of relevant facts. Incremental updates are performed via patch objects, e.g.:
Old Patch: 在狼人杀游戏中,喜欢积极跳身份
New Patch: 在狼人杀游戏中,会积极跳身份(预言家或猎人)或作为平民上警防狼闷预Files are named semantically (e.g.,
viking://user/player_4/memories/events/2026/04/13/狼人杀第一轮警长竞选.md) to serve as natural indexes for agents.
Core Capabilities of VikingBot
Intelligent Memory Submission : Bots automatically compact and push valuable dialogue to OpenViking via hook mechanisms, requiring no manual intervention.
Progressive Memory Retrieval : During each turn, the agent retrieves the most relevant L0 summaries and, if needed, fetches full L2 content via URIs.
Benchmark Results
Using the LoCoMo long‑conversation benchmark, VikingBot and the OpenViking plugin increased agent answer accuracy by nearly three times compared to a baseline OpenClaw model, while cutting token consumption to roughly half of the plugin‑only setup.
Multi‑Tenant Safety and Deployment
OpenViking’s multi‑tenant architecture isolates data by account_id, then further by user_id / agent_id, providing enterprise‑grade security, cost efficiency, and collaborative flexibility. Example directory trees illustrate how a single server can host multiple business lines (HR, legal) with shared resources and isolated user memories.
Installation & Usage
To try VikingBot, install OpenViking and the bot package:
# Install bot
pip install "openviking[bot]"
# Start server with bot
openviking-server --with-bot
# Begin chat
ov chatConfiguration files ( ov.conf) define the LLM model (e.g., Doubao‑seed‑2‑0‑code‑preview‑260215) and channel integrations (Feishu, Telegram, etc.) with sandbox modes (shared, per‑channel, per‑session).
For the Werewolf demo, clone the repository and run the provided start script:
python3 start_werewolf_demo.py --config /path/to/ov.confThe demo showcases a fully autonomous multi‑agent Werewolf match where bots remember past rounds, form grudges, and execute sophisticated disguises.
Overall, OpenViking transforms raw conversational logs into a structured, searchable memory base, enabling agents like VikingBot to evolve their reasoning, improve accuracy, and collaborate safely across enterprises.
ByteDance SE Lab
Official account of ByteDance SE Lab, sharing research and practical experience in software engineering. Our lab unites researchers and engineers from various domains to accelerate the fusion of software engineering and AI, driving technological progress in every phase of software development.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
