Rumor Mill is an AI gossip agent system built around Bree: a voice-first persona that calls people, collects "tea", remembers what matters, and routes stories back through the network.
The repo includes:
- A local CLI chat interface for Bree
- A FastAPI webhook server for Twilio SMS and voice callbacks
- An outbound calling pipeline backed by ElevenLabs ConvAI
- A scheduler for invites, nudges, queued call jobs, and retry handling
- PostgreSQL persistence via SQLAlchemy + Alembic
- A simulation harness for exercising the production pipeline without real phone calls
The main flow is:
- Build a call context from the database
- Assemble Bree's persona, mode script, memories, and context into a prompt
- Start or receive a call through Twilio + ElevenLabs
- Collect a transcript
- Extract structured tea items from the transcript
- Persist calls, tea, deliveries, and memory
- Send post-call SMS followups
Key modules:
src/rumor_mill/call.py: outbound call orchestration and post-call processingsrc/rumor_mill/context.py: context-pack builder for graph, storylines, and spill itemssrc/rumor_mill/prompt.py: prompt assembly from persona/scripts/memorysrc/rumor_mill/agent.py: CLI conversation engine with Anthropic tool usesrc/rumor_mill/scheduler.py: invites, nudges, queued jobs, scheduled calls, retriessrc/rumor_mill/voice_webhook.py: inbound Twilio voice handlingsrc/rumor_mill/sms/webhook.py: inbound SMS classification and dispatchsrc/rumor_mill/db/models.py: SQLAlchemy models for users, calls, tea, deliveries, memories, and audit statesrc/rumor_mill/simulation/engine.py: multi-day simulation over the production pipeline
Reference docs:
docs/architecture.json: structured product and system overviewdocs/memory-system.md: canonical gossip flow vs prompt-memory projection modeldocs/voice-call-pipeline.md: detailedplan -> execute -> finalizecall path and prompt map
- Python 3.11+
- PostgreSQL for the DB-backed runtime
- Twilio credentials for SMS/voice
- ElevenLabs credentials for calling
- Anthropic credentials for prompt-time chat and extraction flows
Create a virtual environment, install the package, and configure environment variables:
python3.11 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"Common env vars used by the app include:
DATABASE_URLANTHROPIC_API_KEYTWILIO_ACCOUNT_SIDTWILIO_AUTH_TOKENTWILIO_FROM_NUMBERELEVENLABS_API_KEYELEVENLABS_AGENT_IDELEVENLABS_PHONE_NUMBER_IDAWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGIONRUMOR_MILL_CONFIG
Run database migrations with Alembic after configuring DATABASE_URL:
alembic upgrade headInstalled console scripts:
rumor-mill: text chat with Bree in the terminaltea-admin: inspect users, calls, tea, and queue call jobstea-call: place a call for a specific user/numbertea-scheduler: run one scheduler pass or the production looptea-prompt: manage prompt assetstea-webhook: run the FastAPI webhook server
Examples:
rumor-mill
tea-webhook
tea-scheduler --loop
tea-admin users
tea-call +15551234567 --user Ben --mode collectRun the full test suite with:
python3 -m pytestUseful targeted runs:
python3 -m pytest tests/test_scheduler.py
python3 -m pytest tests/test_call.py
python3 -m pytest tests/test_simulation.py
python3 -m pytest tests/test_e2e.pyIf your local Python environment auto-loads unrelated global pytest plugins, run with
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 to keep the test environment isolated.
The simulation engine runs the real production pipeline with fake calls in place of live ElevenLabs conversations. This is the safest way to exercise routing, extraction, deliveries, and memory flow end to end.
Example:
python3 -m rumor_mill.simulation.engine --days 3Supporting simulation assets live under src/rumor_mill/simulation/ and config/simulation/.
Prompt and persona assets live under config/, including:
config/persona.mdconfig/scripts/config/extraction_prompt.mdconfig/briefing_prompt.mdconfig/memory_instructions.mdconfig/sms_copy.yaml
Prompt content can also be loaded from S3 through the prompt management tooling in the repo.
The app is containerized with the root Dockerfile. Deployment helper scripts live under infra/.
Relevant files:
Dockerfileinfra/deploy.shinfra/push-image.shinfra/populate-secrets.sh
- There was no root README before this file; the main in-repo system references now live in
docs/architecture.json,docs/memory-system.md, anddocs/voice-call-pipeline.md. - Long-form docs under
docs/use the Markdown files as source of truth; sibling rendered HTML previews are local artifacts unless explicitly tracked (for exampledocs/architecture.html). - The worktree may include planning docs under
docs/superpowers/plans/that are useful as implementation history but are not the runtime source of truth.