- Python 3.12+
- uv package manager
- An Anthropic API key
- Docker (for Postgres, Neo4j, Qdrant)
git clone <repo-url>
cd pearscarf
uv sync
source .venv/bin/activateFor running pearscarf without a local Python setup, the full stack — Postgres, Qdrant, Neo4j, and pearscarf itself — is in docker-compose.yml:
# Fill in env/.env (see Configuration below)
docker compose up -d
docker compose logs -f pearscarfThe pearscarf container boots psc dev --poll by default. Its entrypoint waits for Postgres, installs any experts under experts/ that aren't already registered, and then starts the app. MCP server is exposed on port 8090.
If you prefer local dev (iterating on pearscarf source), skip the pearscarf container and run the DBs only:
docker compose up -d postgres qdrant neo4jPostgres, Qdrant, Neo4j, and pgAdmin run as Docker containers:
docker compose up -d postgres qdrant neo4j pgadminData persists under data/.
pgAdmin at http://localhost:5050 (login: admin@pearscarf.dev / admin).
Neo4j browser at http://localhost:7474.
Core config lives in env/.env. Expert credentials in env/.<name>.env.
# Copy the template (or create env/.env manually)
cp .env env/.envRequired vars in env/.env:
ANTHROPIC_API_KEY=sk-ant-your-key-here
POSTGRES_PASSWORD=your-password
NEO4J_PASSWORD=your-neo4j-password
DISCORD_BOT_TOKEN= # only needed for discord mode
See Architecture — Configuration for the full variable reference.
psc install ./experts/gmailscarf
psc install ./experts/linearscarf
psc install ./experts/githubscarfEach install validates the package, creates typed tables, and scaffolds a credentials file in env/.
- Go to Google Cloud Console
- Create a project → enable Gmail API → create OAuth 2.0 credentials (Desktop app)
- Add Client ID and Client Secret to
env/.gmailscarf.env - Run the auth flow:
psc expert auth gmailscarf
- Copy the printed refresh token into
env/.gmailscarf.env
- Go to Linear Settings → API
- Create a personal API key
- Edit
env/.linearscarf.env:LINEAR_API_KEY=lin_api_your_key_here LINEAR_TEAM_ID=YourTeam # team name, key, or UUID
- Go to GitHub Settings → Tokens
- Create a personal access token (repo scope)
- Edit
env/.githubscarf.env:GITHUB_TOKEN=ghp_your_token_here GITHUB_REPO=owner/repo
psc run # system + REPL
psc run --poll # also start expert ingesters (background polling)
psc dev # local-dev monolith: system + Discord bot
psc dev --poll # monolith + expert ingestersThe pre-startup check validates all expert credentials before booting. Missing vars → clear error message with the file to edit.
[ses_001] you > Read my latest emails
Commands: /sessions, /switch <id>, /new, /history [id]
- Mention the bot or DM it → new session + thread
- All follow-up in the thread stays in the same session
- Expert events (new email, new issue) auto-create threads
Opt-in tracing for LLM calls and tool executions. Add to env/.env:
LANGSMITH_TRACING=true
LANGSMITH_API_KEY=lsv2_your_key_here
LANGSMITH_PROJECT=pears
- Architecture — system design, expert contract, prompt composition
- Building an Expert — step-by-step guide to creating a new expert
- Data Model — entities, facts, graph schema
- Usage — full command reference