← all repositories
henrydaum/second-brain

A local AI runtime built like a turn-based game

Second Brain exists to keep your AI agents, file index, and conversation history alive across sessions, frontends, and scheduled cron jobs.

585 stars Python AgentsRAG · Search
second-brain
Not currently ranked — collecting fresh signals.
star history

What it does

Second Brain indexes documents, media, archives, and spreadsheets into a local SQLite knowledge base, then lets LLM agents search, cite, and act on that corpus through a REPL or Telegram frontend. It also runs background tasks, schedules cron-driven subagents, and pushes proactive notifications, all while keeping durable conversation history and a persistent memory.md.

The interesting bit

Instead of bolting a chatbot onto a RAG pipeline, the authors built a pure conversation state machine—turns, phases, approvals, serializable frames—so a Telegram message, a scheduled job, and a REPL command are all just participants in the same turn-based flow. Frontends are dumb transports; the runtime owns the logic. That is the kind of architectural boredom that pays off when you want to add a Discord bot without rewriting conversation handling.

Key highlights

  • Live plugin authoring: create tools, tasks, services, commands, or frontends in a sandbox directory while the app is running; a file watcher hot-reloads valid extensions.
  • Multi-modal indexing: text, images (with OCR), audio/video (with speech-to-text), tabular files, and archives all get chunked, embedded, and indexed for hybrid, lexical, or semantic search.
  • Proactive subagents: Timekeeper cron jobs can wake up headless agents that read prior conversation history, run tools, and push results back into chat or Telegram.
  • Cross-platform frontends: both the REPL and Telegram interfaces are plugins under the same BaseFrontend contract, so custom transports (Discord, HTTP, etc.) are first-class extensions rather than forks.

Caveats

  • OCR is platform-gated: the built-in native OCR expects Windows, while macOS relies on Apple Vision; Linux support is not mentioned.
  • Agent features require an external LLM profile and API setup; it does not appear to run a local model out of the box.
  • The README is truncated mid-configuration example, so some setup requirements remain unclear from the sources.

Verdict

Worth a look if you want a private, long-running agent host on your own machine rather than a stateless chat wrapper. Skip it if you need a managed cloud service or a simple one-shot RAG script.

Frequently asked

What is henrydaum/second-brain?
Second Brain exists to keep your AI agents, file index, and conversation history alive across sessions, frontends, and scheduled cron jobs.
Is second-brain open source?
Yes — henrydaum/second-brain is open source, released under the MIT license.
What language is second-brain written in?
henrydaum/second-brain is primarily written in Python.
How popular is second-brain?
henrydaum/second-brain has 585 stars on GitHub.
Where can I find second-brain?
henrydaum/second-brain is on GitHub at https://github.com/henrydaum/second-brain.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.