Back to projects

Project Hamlet

Active

Persistent 1976 Earth life simulation with 9 LLM agents, Smallville-pattern memory, bubble simulation, and God console

Python 3.13FastAPIPostgreSQLRedisReact 19CesiumJS

Architecture

Tick-based simulation with perception-action-memory agent loop. Bubble-scoped world (2km radius per agent) enables linear scaling.

Data Pipeline

NOAA weather, BLS economics, Wikipedia events, IMDb, NYT Archive, Billboard charts

Model Integrations

Claude OpusGemini 1.5 ProGPT-4oKimi K2Llama 3.3 70BDeepSeekCohereMistral

Novel Approaches

  • Bubble simulation for linear scaling
  • Three-layer anachronism filter: regex -> LLM judge -> embedding distance
  • Smallville-pattern memory: recency + importance + semantic relevance
  • Multimodal perception bundles
  • OAuth + free-tier model blending (4 premium + 5 free APIs)

Key Files

src/hamlet/agents/runner.py
src/hamlet/agents/memory.py
src/hamlet/core/tick.py
src/hamlet/core/bubble.py