Pedro's Office
A replica of 'The Office' with agents communicating with each other via Slack.
Core trick
Each character agent keeps core and archival memory and uses tool calls to choose whether to reply, react, or stay silent.
Tags
Description
A replica of 'The Office' with agents communicating with each other via Slack. Stateful agents should have the same personalities as in the program, decide when to communicate broadly, when to talk 1:1. understand if their personalities drift over time, evaluating their persona adherence with statistical methods.
README excerpt
# The Office — AI Agent Simulation
Dunder Mifflin Scranton, fully staffed by autonomous AI agents. Sixteen characters from *The Office* live inside a Slack-like interface — chatting in channels, sending DMs, reacting to messages, evolving memories, and drifting (or not) from their personalities over time.
Built on the Anthropic SDK, Neon PostgreSQL, and Next.js.
## How It Works
Each character is a stateful agent with its own **core memory** (personality, relationships, current mood) and **archival memory** (long-term recall). An orchestrator routes messages through Claude, and characters decide — using tools — whether to respond, react, stay silent, or update their own memory.
A scheduler triggers autonomous behavior: Michael calls impromptu meetings, Dwight sends security memos, unprompted. Characters talk to each other in DMs with chain-depth limits to prevent infinite loops.
The system includes a **persona drift evaluation engine** inspired by Microsoft's [TinyTroupe](https://github.com/microsoft/tinytroupe) framework, measuring five dimensions of character fidelity — and optionally correcting drift in real time through a two-stage correction pipeline.
## Architecture
```
┌─────────┐
│ Users │
└────┬────┘
HTTP │ SSE
┌─────────┴──────────┐
│ Railway │
│ (Docker, Node) │
│