Tool

Turn voice notes into a self-organizing knowledge graph

Telegram-based AI second brain running on Claude Code, capturing voice, text, and photos into an Obsidian vault with a typed, decaying knowledge graph.

Works with telegramobsidianclaudedeepgramtmux

91
Spark score
out of 100
Updated 18 days ago
Version 3.0.3
Models
claude

Add to Favorites

Why it matters

Capture thoughts, meetings, and ideas via voice or text in Telegram and automatically organize them into a typed, linked knowledge graph in your Obsidian vault-with zero manual filing, Ebbinghaus-curve memory decay, and nightly synthesis-running 24/7 on your own server.

Outcomes

What it gets done

01

Transcribe voice messages from Telegram and file them as linked markdown notes in Obsidian

02

Build and maintain a typed knowledge graph with contacts, projects, and goals that decay naturally over time

03

Schedule reminders and recurring tasks from plain-language requests without external tools

04

Run nightly processing to classify entries, update long-term memory, and send daily reports

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/smixs-agent-second-brain | bash

Overview

Agent Second Brain

A self-hosted Telegram bot built on Claude Code that acts as a personal second brain: it captures voice, text, photos, and documents, files them into an Obsidian vault via a typed knowledge graph, autograph, with Ebbinghaus-decay memory tiers, self-schedules reminders and routines, and runs nightly processing that updates goals and sends a daily report. Use it as an always-on personal knowledge and task capture system reachable over Telegram, when the goal is a fully self-hosted, non-lock-in alternative to a cloud PKM or assistant service, at a flat monthly cost with no per-token billing.

What it does

agent-second-brain is a Telegram bot, built on Claude Code, that acts as a personal second brain: send it voice notes, text, photos, documents, videos, or forwarded posts and albums, and the agent reads them itself and files the takeaways, nothing sent is silently dropped. Its memory layer, autograph, is a typed knowledge graph shipped as a Claude Code skill: every card has a type, description, tags, and status; cards follow Ebbinghaus-style decay, strength grows with each access, so touched cards resist forgetting while untouched ones fade, contacts over roughly 100 days, daily notes over roughly 25, across five tiers from core down to archive, with self-maintenance handling orphan detection, broken-link repair, deduplication, and MOC index generation. The agent also self-schedules its own routines from plain language, such as remind me Friday at 3pm or every weekday at 18:30 check my inbox folder, and runs a nightly job at 21:00 that classifies the day's entries, updates goals and long-term memory, rebuilds the graph, and sends a daily report.

When to use - and when NOT to

Use it as an always-on capture and recall system reached entirely through Telegram, when the goal is to actually own the data rather than trust it to a cloud service. The project is explicit about what it doesn't do: it never sends the vault anywhere, plain markdown on your own disk, and your own git remote if configured, it never runs headless claude -p, enforced by a CI check that fails the build if that changes, it needs no API keys beyond Telegram and Deepgram, no OpenAI key, no token meter, and it doesn't lock a user in, since the vault is just an Obsidian-compatible markdown folder that keeps working even if the whole system is deleted tomorrow. Because it IS Claude Code underneath, it extends by dropping any MCP server into mcp-config.json or any skill into vault/.claude/skills/, the same way Claude Code itself extends, just reached over Telegram for knowledge work instead of code.

Inputs and outputs

Setup is roughly 15 minutes: fork the repository privately, fill in goals and a persona file, get a Telegram bot token and a free Deepgram API key, then run a bootstrap script on a fresh Ubuntu VPS, which interviews for the tokens, walks through Claude Code's browser login, installs systemd services, and runs a health check. Ongoing input is whatever gets sent to the bot in Telegram; output is the growing vault of typed cards, scheduled reminders firing on their own, and a daily report summarizing what the nightly job processed. A watchdog recovers a wedged session, and a daily doctor job sends a green or red canary status and disables broken scheduled jobs automatically rather than failing silently.

Integrations

The bot never spawns a fresh claude process per message; it keeps one long-lived interactive Claude Code session alive in a tmux pane and types prompts into it, which is what lets it run 24/7 on a flat Pro or Max subscription instead of metered API tokens, and scheduled jobs fire in a second, isolated session so a reminder never interrupts an ongoing conversation. It runs on Claude Pro at about $20/mo plus a cheap VPS at about $5/mo and Deepgram's free tier with $200 credit for voice transcription, for a flat ~$25/mo with no per-token metering since the session is interactive rather than API-billed. The autograph memory engine is also usable standalone on any Obsidian vault outside this project. Being Claude Code under the hood, it accepts any MCP server or Claude Code skill as an extension point.

Who it's for

Someone who wants a private, self-hosted personal knowledge and task assistant reachable from Telegram, with full data ownership and no vendor lock-in, rather than a cloud PKM or assistant subscription. The project is MIT licensed.

Source README

Agent Second Brain

Agent Second Brain

An always-on second brain you talk to.
Voice note in Telegram β†’ typed, linked knowledge in your Obsidian vault.
Runs 24/7 on a $5 VPS and the Claude subscription you already pay for - zero per-token API bills.

πŸ‡·πŸ‡Ί Русский β€’ Полная инструкция β€’ VPS guide β€’ autograph engine

License: MIT Python 3.12+ Stars Forks


Start here

You want to… Go to
Understand what this thing is Why I built this
Install it on a fresh VPS in one command Quick start
Upgrade an existing v1 / v2 install Upgrading
Пошаговая инструкция Π½Π° русском, для Π½ΠΎΠ²ΠΈΡ‡ΠΊΠΎΠ² docs/setup-guide.ru.md
Just want the memory engine for your own vault autograph β†’
See how the persistent-session trick works How it works

Why I built this

Every productivity system dies the same way. You set it up on a Sunday, use it for two weeks, then slowly stop - because maintaining the system is more work than the work itself. Voice memos you never re-listen to. Ideas that drown in chat history. A vault of markdown files that nobody, including you, can navigate a month later.

The fix isn't another app. It's removing the organizing step entirely: you talk, the agent files. And it has to be yours - I wasn't going to pipe my private notes, clients, and goals through somebody's SaaS. Everything here runs on your own server, lands in your own Obsidian vault as plain markdown, and is small enough to actually read before you trust it with your life.

What talking to it looks like

You   (voice, 40s, while walking): "Call with Alisher β€” they're in for the
      pilot, but want to push the start to July. I need to update the
      proposal, and remind me Friday to send the contract."

Bot:  πŸ’Ύ Saved: Alisher's CRM card updated (pilot, July start), linked
      to [[pilot-project]]. Reminder set: Friday 10:00 β€” send the contract.

      β€” Friday, 10:00 β€”

Bot:  πŸ”” Reminder: send Alisher the contract. Context: pilot, July start,
      proposal updated on Tuesday.
You:  what did I write about the marketing project last week?
Bot:  *finds the entries, quotes them, links the cards*
You:  turn the second idea into a project note with next steps
Bot:  *creates the note, links it to the client and this week's goals*
You:  *forwards a post, drops a photo of a whiteboard, sends a PDF*
Bot:  *reads them itself β€” files the takeaways into the graph, answers what it saved*

No commands to memorize, no categories to pick, no app to open. Telegram is the whole interface.

Philosophy

Voice-first. Capture has to be cheaper than forgetting, or the system dies. A voice note costs five seconds.

The vault is the source of truth. Everything lives as plain markdown in your Obsidian vault on your server. Delete the agent tomorrow - you keep everything, readable forever. No lock-in, no export button needed.

Memory that forgets, like yours. Storage is not memory. Knowledge decays on the Ebbinghaus curve, fades through five tiers, and resurfaces when it matters - so the graph stays sharp instead of becoming a landfill.

Interactive session, by the rules. One persistent Claude Code session in tmux, driven the way a human drives it. No headless claude -p anywhere in the hot path - a CI guard fails the build if anyone tries.

Small enough to read. One Python process, a handful of modules, 220+ tests. You can audit the thing that reads your private notes in an evening.

What it does

πŸŽ™ Total captureVoice (Deepgram, seconds), text, photos, documents, videos, forwarded posts, whole albums - the agent reads files itself and files the takeaways. Nothing you send is ever silently dropped.
🧠 Knowledge graph memoryPowered by autograph: typed cards, wiki-links, Ebbinghaus decay across five tiers, automatic MOC indexes, health scoring, link repair, dedup. The most thorough open-source memory layer you can drop on a vault.
⏰ Self-managed routines"Remind me Friday at 3pm", "every weekday at 18:30 check my inbox folder" - the agent schedules its own cron jobs from plain language. One-shots, intervals, full cron expressions. No external task manager.
πŸŒ™ Nightly processingAt 21:00 your time it classifies the day's entries, writes vault cards, updates goals and long-term memory, rebuilds the graph - and sends you a daily report.
πŸ”Œ Claude Code, but for PKMIt IS Claude Code under the hood - so drop any MCP server into mcp-config.json, add any skill into vault/.claude/skills/, and your second brain grows new abilities. Like Claude Code through Telegram - for knowledge, not code.
🩺 Self-healingA watchdog recovers a wedged session, a daily doctor sends a 🟒/πŸ”΄ canary report, broken jobs disable themselves and tell you. It just stays up.

The memory engine: autograph

The part that makes this a brain rather than a logger is autograph - a typed memory layer for always-on agents, shipped here as a skill and also usable standalone on any Obsidian vault.

  • Typed graph - every card carries a type (note, contact, project, CRM), a description for retrieval, tags, status; one schema.json rules them all
  • Ebbinghaus decay - strength 1 + ln(access_count): each touch slows forgetting; contacts fade in ~100 days, dailies in ~25
  • Five tiers - core β†’ active β†’ warm β†’ cold β†’ archive; touching a card promotes it back up
  • Random recall - occasionally an archived card resurfaces next to something current. Sometimes noise. Sometimes the best idea you forgot you had.
  • Self-maintenance - orphan detection, broken-link repair, dedup into .trash/, MOC generation, a 100-point health score. You never run vault chores again.
Tier What happens
Core Always in context: current projects, active clients, key goals
Active Checked regularly: recent ideas, ongoing threads
Warm Found when you search
Cold Surfaces only in deep searches
Archive Almost gone - but randomly recalled for creative collisions

How it works

Telegram ──▢ bot (aiogram) ──▢ persistent Claude Code session (tmux pane)
                 β”‚                       β”‚
                 β”‚                       β”œβ”€β”€β–Ά Obsidian vault (plain markdown)
                 β”‚                       └──▢ autograph: graph Β· decay Β· MOC
                 β”œβ”€β”€β–Ά cron ticker ──▢ second isolated session (reminders never block chat)
                 └──▢ watchdog + daily doctor (self-healing, 🟒/πŸ”΄ report)

The bot never spawns claude per message. It keeps one long-lived interactive Claude Code session alive in a tmux pane and types prompts into it - which is why a 24/7 agent runs on a flat Pro/Max subscription instead of metered API tokens. Scheduled jobs fire in a second, isolated session, so a reminder going off never interrupts your conversation. A cross-process lock serializes everything; a watchdog restarts whatever wedges.

Privacy is explicit: voice audio goes to Deepgram for transcription, text goes to Anthropic through your subscription, everything else stays on your server. The vault never leaves the machine.

What it costs

Service Cost
Claude Pro $20/mo
VPS (any cheap one) ~$5/mo
Deepgram free tier ($200 credit)
Total ~$25/mo, flat

A personal assistant that organizes your life, never sleeps, and gets better the more you use it - for the price of two coffees. And because the session is interactive, the price above stays the price: there is no token meter to run away from you.

Quick start

Three steps, ~15 minutes of work (full beginner walkthrough: πŸ‡·πŸ‡Ί setup-guide / πŸ‡¬πŸ‡§ vps-setup).

1. Fork this repo (make the fork private - it will contain your life), then fill in vault/goals/ and the persona in vault/.claude/skills/dbrain-processor/references/about.md.

2. Get two keys: a bot token from @BotFather, a free key from Deepgram, plus your Telegram ID from @userinfobot.

3. On a fresh Ubuntu VPS:

curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/agent-second-brain/main/bootstrap.sh | bash

The installer interviews you for the tokens, walks you through Claude Code login (browser link), installs systemd services, and finishes with a health check. The bot messages you when it's alive. That's it - start talking.

What the installer actually does (inspect before you trust)

bootstrap.sh clones your fork and hands off to setup.sh, which only asks questions (tokens, timezone, git remote) and writes .env (chmod 600). All real work happens in idempotent upgrade.sh: uv + Python deps, tmux, Claude CLI, dbrain-* systemd user units, a dbrain CLI (status / logs / attach / doctor), permission hardening, and a first doctor run. Every script is short enough to read first.

Upgrading from v1 / v2

One idempotent command - it migrates old units, installs what's missing, repairs permissions, and health-checks itself:

ssh your-server
cd agent-second-brain && git pull && bash upgrade.sh

If a migration ever goes sideways, run claude in the project directory and call the migrate-doctor skill - it diagnoses the install layout (v1/v2/v3), backs up, and repairs interactively.

Vault structure

vault/
β”œβ”€β”€ daily/              # Your raw daily stream (voice, text, attachments)
β”œβ”€β”€ goals/              # Vision β†’ yearly β†’ monthly β†’ weekly
β”œβ”€β”€ business/
β”‚   β”œβ”€β”€ crm/            # Client cards
β”‚   └── network/        # Professional contacts
β”œβ”€β”€ projects/           # Active work, leads, pipeline
β”œβ”€β”€ thoughts/
β”‚   β”œβ”€β”€ ideas/          # Ideas and brainstorms
β”‚   β”œβ”€β”€ learnings/      # Lessons learned
β”‚   └── reflections/    # Personal reflections
β”œβ”€β”€ MOC/                # Maps of Content (auto-generated)
└── MEMORY.md           # The agent's long-term memory

Skills

Skill What it does
dbrain-processor Classifies entries, writes vault cards, daily reports
autograph The memory engine: decay, graph health, MOCs, schema-as-code, dedup
cron The agent manages its own schedule from plain language
migrate-doctor Diagnoses and repairs broken upgrades from older versions

Drop your own into vault/.claude/skills/ - the session picks them up like any Claude Code install.

Configuration

File Controls
.env Tokens, timezone, model, cron tuning (see .env.example)
vault/.claude/CLAUDE.md The agent's personality and rules
mcp-config.json Optional: any MCP servers you want the brain to have

All secrets stay in .env (gitignored, chmod 600). Set CLAUDE_MODEL=sonnet to reduce weekly-limit pressure on a 24/7 bot.

Set TZ to your own IANA timezone (e.g. TZ=Europe/Moscow) - it defaults to UTC, and reminders/schedules are interpreted in it. The cron skill's examples use placeholders, not a fixed zone, so the brain schedules in your time.

dbrain restart does not recreate the brain. It restarts the bot process; the long-lived Claude Code tmux session deliberately survives (KillMode=process) - that's what keeps you on the subscription. Settings read only at session creation (CLAUDE_MODEL, mcp-config.json, the system prompt) therefore take effect only after the brain is recreated. Kill both sessions - the main one and the cron brain (${brain}_cron, where reminders run with the same settings) - and the bot rebuilds them on the next message/job:

B="$(cat ~/.dbrain/brain.name)"; tmux kill-session -t "$B"; tmux kill-session -t "${B}_cron" 2>/dev/null

Bot-level .env changes (tokens, ALLOWED_USER_IDS, TZ) apply on a plain restart.

What it does NOT do

  • It does not send your vault anywhere. Plain markdown, your disk, your git remote if you configure one.
  • It does not use headless claude -p - scripts/check-no-claude-p.sh runs in CI and fails the build if that ever changes.
  • It does not require any API keys beyond Telegram + Deepgram. No OpenAI, no token meter.
  • It does not lock you in. Delete everything tomorrow; your vault still opens in Obsidian.

Built by

Serge Shima - 20 years in marketing (BBDO, Publicis), now running an AI creative agency in Central Asia and teaching businesses to work with AI at aimasters.me.

This system runs my actual life: 1,100+ vault cards, daily reports, an agent I argue with about my own calendar. It started as a weekend project and became infrastructure.

FAQ

Common questions

Discussion

Questions & comments Β· 0

Sign In Sign in to leave a comment.