Inspiration

Most AI agents are goldfish - brilliant for one turn, amnesiac the next. Reload the page and the relationship resets. We wanted a multi-agent society where memory is the point: an agent shorted on a trade yesterday drives a harder bargain today, and can tell you why. A resource-scarce disaster setting makes the stakes legible.

What it does

  • A negotiating agent society: survivors with distinct roles (courier, mechanic, medic, scavenger) trade scarce resources through multi-round dialogue.
  • A deterministic Game Master owns the ledger; agents only propose moves, which the engine validates and applies - a hallucination-proof economy.
  • Persistent, evolving memory per agent: experience -> consolidate -> recall -> forget.
  • Survives restarts: society state and per-agent memory persist to disk.
  • Exposed over MCP (aftermath_status / aftermath_advance / aftermath_memory).

How we built it

Qwen Cloud (Alibaba Cloud Model Studio / DashScope International, qwen-plus, OpenAI-compatible endpoint) powers every agent decision and the nightly memory consolidation. A Node.js + Express backend wraps a deterministic simulation core; Qwen is called only for proposals and reflection, bounded for cost (one batched consolidation call per night for the whole town). The memory system lives in src/server/memory/ (episodes, consolidate, recall) and persists via atomic JSON snapshots. React 19 + Three.js pixel-art front end (in progress). Deployment proof: src/server/qwen.ts.

Challenges we ran into

Making memory provable, not decorative - every Qwen-influenced move cites the exact memories that shaped it (memoriesUsed). Forgetting without amnesia - episode age and relationship reinforcement decay on separate clocks. Keeping the economy honest - Game Master arbitration makes hallucinated trades structurally impossible.

Accomplishments that we're proud of

A cross-session memory loop that demonstrably changes behavior - verified by a harness that runs a day, restarts the server, and confirms a next-day decision cites a prior-day memory. Every LLM call runs on Qwen Cloud, with zero other providers. The whole system degrades gracefully to deterministic fallbacks with no API key.

What we learned

Persistent memory is a systems problem as much as a prompting one - storage, consolidation cadence, retrieval scoring, and decay each need their own design. Constraining the LLM to proposals (not authority) buys both safety and believability.

What's next

Finishing the Three.js demo surface: agents walking to the market plaza, live Qwen negotiation bubbles, and a click-to-inspect memory panel that highlights the memories driving each move. Then reputation propagation via rumor, and a temporal knowledge-graph memory.

How this was updated during the submission window

Migrated all LLM inference to Qwen Cloud (src/server/qwen.ts); built the persistent memory system from scratch (src/server/memory/); added atomic disk persistence so memory survives restarts; and authored the architecture documentation. Verified end-to-end via npm run demo:memory.

Built With

Share this project:

Updates