Your Second Brain,
Running Locally
Capture thoughts anywhere → find them by meaning → AI agent delivers daily briefings, surfaces stale tasks, and recognizes patterns. 100% private, runs on your Mac.
Capture & Auto-Classify
One slash command captures any thought. The system automatically extracts type, topics, people, and generates a 1024-dim embedding — all in under 200ms.
decision Keep Ollama on host, not in Docker…
task Review asyncpg migration PR…
Semantic Search
Search by meaning, not keywords. The query is embedded with the same model — cosine similarity surfaces related thoughts even when no words match.
Think-Act-Observe Cycle
The agent runs on a schedule or on demand. It fetches recent thoughts plus prior run history, synthesizes via Claude CLI, and writes insights back to working memory.
7 Default Scheduled Jobs
Agent Output
Scheduled Jobs
APScheduler runs 7 default jobs. Add custom jobs via natural language from Discord or Claude Desktop — the agent interprets phrases like "every Friday 5pm" into cron expressions.
MCP / Claude Desktop
8 MCP tools connect Claude Desktop to your knowledge base via stdio transport. Search by meaning, create tasks, read/write working memory — all from a Claude conversation.
Architecture
Fully local stack. Click any component to learn more.
to see details
Get Started
Self-hosted on any machine with Docker and local Ollama. No cloud accounts required to run.
Docker (OrbStack recommended on Mac)Install
Ollama and pull:ollama pull mxbai-embed-largeCreate a Discord bot at discord.com/developers
cp .env.example .envFill in
POSTGRES_PASSWORD, TWOBAGENT_API_KEY, TWOBAGENT_DISCORD_TOKENdocker compose --profile discord up -dAPI runs at
localhost:8900claude_desktop_config.json:{
"mcpServers": {
"2bagent": {
"command": "/bin/bash",
"args": [
"~/2bagent/scripts/start-mcp.sh"
]
}
}
}docker compose --profile agent up -dRuns on
localhost:8766Requires
~/.claude bind-mount for Claude CLI authlocalhost:8900/health — all cards greenDiscord:
/health in your serverClaude Desktop: ask "What did I capture this week?"
Agent:
/agent run for first synthesis:8900/ui — Capture & browse:8900/data — Filter, sort, paginate:8900/health — Service status:8900/agent — Agent runs & jobs:8900/help — Full documentationAll data stays on your machine. PostgreSQL, Ollama, and the agent runner are local. The only optional cloud component is the Gemini API fallback — leave it unset to run entirely offline.