Observed since 20 Oct, 19:15 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
2ndbrain
Always-on Node.js service bridging Telegram messaging to Claude AI with knowledge graph, journal, project management, and semantic search.
A personal, always-on AI assistant that lives on your local network. 2ndbrain bridges Telegram to Claude via a Node.js service, giving you a private conversational AI with persistent memory, a knowledge platform, and full access to local tools — all from your phone.
You set it up on a device on your LAN (e.g. a Raspberry Pi 5), and you — and only you — interact with it by chatting over Telegram.
Telegram ──long-polling──▸ 2ndbrain ──subprocess──▸ Claude CLI
│ │
│ MCP tools
│ (postgres, embeddings,
│ shell commands)
│
PostgreSQL
(history, knowledge,
projects, journal,
embeddings)
| Integration | Role |
|---|---|
| Telegram Bot API | Messaging interface — long-polling, attachments (photos, docs, audio, video, voice), typing indicators |
| Claude CLI | Conversational AI — spawned as subprocess with streaming JSON, thinking mode, session continuity |
| PostgreSQL + pgvector | Persistent storage — conversation history, knowledge graph, projects, journal, vector embeddings with HNSW indexing |
| Model Context Protocol (MCP) | Tool framework — gives Claude direct access to the database (pg server) and a custom embed_query tool for semantic search |
| OpenAI Embeddings API | Vector embeddings — optional provider for semantic search (configurable model and dimensions) |
| Express | Web admin dashboard — settings, environment config, activity logs (LAN-only) |
~/data| Skill | Description |
|---|---|
| Knowledge Graph | Entities and relationships with full-text search and embedding queue |
| Journal | Timestamped personal notes with semantic search |
| Project Management | Projects with specifications and issues, completion tracking |
| Scheduler | Recurring tasks via cron expressions with timezone support |
| Recall | Unified semantic search across journal, knowledge, projects, and history |
| System Ops | Read-only diagnostics — memory, disk, uptime, database status, logs |
| Command | Action |
|---|---|
/status | Current system status |
/health | Health check across all subsystems |
/restart | Restart the service |
/reboot | Reboot the host |
/stop | Graceful shutdown |
/new | Start a new conversation session |
/help | List available commands |
Custom scripts that run at startup, shutdown, pre/post Claude invocation, and on errors.
pgvector extension.env file at ~/.2ndbrain/.env (see Configuration below)npx 2ndbrainAll configuration lives in ~/.2ndbrain/.env:
| Category | Key Variables |
|---|---|
| Required | TELEGRAM_BOT_TOKEN, TELEGRAM_ALLOWED_USERS, DATABASE_URL |
| Claude | CLAUDE_MODEL, CLAUDE_THINKING, CLAUDE_TIMEOUT, CLAUDE_MAX_BUDGET |
| MCP | MCP_CONFIG_PATH, MCP_TOOLS_WHITELIST, COMMANDS_WHITELIST |
| Embeddings | EMBEDDING_PROVIDER, EMBEDDING_API_KEY, EMBEDDING_MODEL, EMBEDDING_DIMENSIONS |
| Rate Limits | RATE_LIMIT_CLAUDE (default 10/min), RATE_LIMIT_TELEGRAM (default 30/min) |
| Web Admin | WEB_PORT, WEB_BIND, AUTO_OPEN_BROWSER |
| Storage | DATA_DIR (default ~/data) |
| Conversation | HISTORY_COMPACT_THRESHOLD (default 100) |
| Security | FILE_EDIT_PATHS |
| Logging | LOG_LEVEL |
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
dotenvEnvironment{
"local_name": "dotenv",
"alias": false,
"peer_metadata": null
} | ^16.4.7 | runtime |
expressEnvironment{
"local_name": "express",
"alias": false,
"peer_metadata": null
} | ^4.21.2 | runtime |
node-cronEnvironment{
"local_name": "node-cron",
"alias": false,
"peer_metadata": null
} | ^4.2.1 | runtime |
openEnvironment{
"local_name": "open",
"alias": false,
"peer_metadata": null
} | ^10.1.0 | runtime |
pgEnvironment{
"local_name": "pg",
"alias": false,
"peer_metadata": null
} | ^8.13.1 | runtime |
Source distribution
{
"integrity": "sha512-QDTi4kENjEVgB6XppJgpTVmnnUBJVFyAtRwdrKJio4fDjHtmUuqijzxX6YexPf8ZSZen6r9OYpYtVl8Rg8mNtA==",
"shasum": "fc94e1e47cc7225a6543e1efc88033afbad87bb6",
"tarball": "https://registry.npmjs.org/2ndbrain/-/2ndbrain-2026.2.4.tgz",
"fileCount": 36,
"unpackedSize": 353245,
"signatures": [
{
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
"sig": "MEUCIALKuq6/LGyX3p6J/NnnLmMoaXTyhW2457++FmmlT+ZYAiEA7vwDeAfZpmfspmYRZTUNyKE6BEFPcFLkVjDQFEwfpU8="
}
]
}Observed since 20 Oct, 19:15 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:d2405675464c3520a0a9e0f2ff4eb13d6438ee2ff469937cb0e1e3b82a40a4ec