Back to projects

Agent Simulation Project

Catville

Catville is an autonomous social simulation inspired by the Generative Agents research from Stanford and Google. Agents interact each day using a local Mistral model, producing an emergent storyline and an automated daily newsletter summary.

Catville system flow diagram

Problem

Most agent demos are static or one-off runs. I wanted a persistent simulation where agents evolve over time and produce observable daily outcomes.

Approach

Built a Python-based multi-agent loop with local LLM inference through Ollama, plus state, logs, and summary generation pipelines.

Outcome

The simulation runs day by day, archives outputs to Markdown, and publishes concise narrative updates through Buttondown.

System Design

Simulation Core

  • Agent loop for daily behavior and interactions
  • Persistent state management with JSON snapshots
  • Per-day log files for traceability
  • Modular scripts for simulation and summarization

LLM and Delivery

  • Local inference via Ollama
  • Open-source Mistral model for agent reasoning
  • Daily summary generation in Markdown
  • Newsletter publishing through Buttondown API

How It Runs

1. Pull and start Mistral in Ollama.

2. Install dependencies with Poetry.

3. Run the simulation loop to generate daily interactions and summaries.

4. Publish the final daily narrative via Buttondown.

Artifacts