An always-on second brain you talk to. Voice notes in Telegram → typed, linked knowledge in your Obsidian vault. Runs 24/7 on the Claude subscription you already have.
Python ai-agentsai-automationclaudeclaude-codeebbinghausknowledge-graphllmmemory-systemobsidianpersonal-assistantpkmproductivitypythonsecond-braintelegram-botvoice-assistant
docs: document v3.1 persistent-session architecture + June 2026 rationale
smixs07777c7a0acc
diff --git a/README.md b/README.mdindex 9dfe022..059130d 100644--- a/README.md+++ b/README.md@@ -112,6 +112,8 @@ Each phase produces a clean JSON that the next phase picks up. If something breaTelegram → Deepgram → Claude Code → Todoist + Obsidian vault → Telegram report```+**Always-on, on your subscription.** The bot doesn't spawn a fresh `claude` for every message. It keeps one long-lived *interactive* Claude Code session alive in a tmux pane and types your prompts into it. That keeps it on your Claude subscription (interactive usage) instead of per-request API billing. A watchdog and a daily self-check keep that session healthy around the clock and restart it automatically if it ever wedges — so the bot just stays up.+## What it costs| Service | Cost |@@ -124,6 +126,8 @@ Telegram → Deepgram → Claude Code → Todoist + Obsidian vault → Telegram$25/month for a personal assistant that organizes your life, never sleeps, and gets better the more you use it.+> **Why this matters (June 2026).** From June 15, 2026 Anthropic moves `claude -p` / headless runs onto a separate paid Agent SDK credit, billed per request. Agent Second Brain **v3.1** sidesteps that completely: it drives a persistent *interactive* session, which stays on your flat Pro/Max subscription. No per-request billing, no surprise invoice — the price above stays the price. (If you ever do want the API path, an opt-in `DBRAIN_MODE=router` escape hatch is built in.)+## Quick start### 1. Fork this repo@@ -165,6 +169,15 @@ curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/agent-second-brain/maThat's it. The bot starts, you send it a message, and the system is alive.+### Already running an older version?++Upgrading an existing v2 / v3.0 install to the persistent-session architecture is one idempotent command — it installs tmux, pulls the new code, migrates the systemd services, and runs a health check:++```bash+ssh your-server+cd agent-second-brain && bash upgrade.sh+```+---## Vault structurediff --git a/README.ru.md b/README.ru.mdindex b41d2a3..4c8352b 100644--- a/README.ru.md+++ b/README.ru.md@@ -112,6 +112,8 @@ Agent Second Brain использует кривую забывания ЭббиTelegram → Deepgram → Claude Code → Todoist + Obsidian → Telegram отчёт```+**Всегда на связи, на твоей подписке.** Бот не запускает новый `claude` на каждое сообщение. Он держит одну живую *интерактивную* сессию Claude Code в tmux-панели и «печатает» в неё твои промпты. Это оставляет его на твоей подписке Claude (интерактивное использование), а не на поштучной оплате API. Watchdog и ежедневная самодиагностика следят за здоровьем сессии круглосуточно и автоматически перезапускают её, если она зависнет - бот просто остаётся живым.+## Сколько стоит| Сервис | Цена |@@ -124,6 +126,8 @@ Telegram → Deepgram → Claude Code → Todoist + Obsidian → Telegram отч$25 в месяц за личного ассистента, который организует твою жизнь, никогда не спит и становится лучше с каждым днём использования.+> **Почему это важно (июнь 2026).** С 15 июня 2026 Anthropic переводит `claude -p` / headless-запуски на отдельный платный кредит Agent SDK с поштучной оплатой. Agent Second Brain **v3.1** обходит это полностью: он гоняет постоянную *интерактивную* сессию, которая остаётся на твоей фиксированной подписке Pro/Max. Никакой поштучной оплаты и неожиданных счетов - цена выше остаётся ценой. (Если всё же захочешь API-путь - встроен опциональный escape-hatch `DBRAIN_MODE=router`.)+## Быстрый старт### 1. Форкни репо@@ -165,6 +169,15 @@ curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/agent-second-brain/maБот запускается, ты отправляешь ему сообщение - система живёт.+### Уже стоит старая версия?++Обновление существующей установки v2 / v3.0 на архитектуру с постоянной сессией - одна идемпотентная команда: ставит tmux, тянет новый код, мигрирует systemd-сервисы и прогоняет health-check:++```bash+ssh your-server+cd agent-second-brain && bash upgrade.sh+```+---## Структура хранилищаdiff --git a/pyproject.toml b/pyproject.tomlindex 769bb76..e3c7441 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -1,6 +1,6 @@[project]name = "agent-second-brain"-version = "1.0.0"+version = "3.1.0"description = "Voice-first personal assistant for Telegram with Obsidian and Todoist integration"readme = "README.md"authors = [diff --git a/uv.lock b/uv.lockindex de074b5..ce8f3b5 100644--- a/uv.lock+++ b/uv.lock@@ -4,7 +4,7 @@ requires-python = ">=3.12"[[package]]name = "agent-second-brain"-version = "1.0.0"+version = "3.1.0"source = { editable = "." }dependencies = [{ name = "aiogram" },