second-brain is a free, open source automation project written in Python and released under MIT. It has 678 GitHub stars, 87 forks and 1 open issues, and was last pushed 1 months ago. On this registry it ranks #47 of 66 tracked projects in Automation, with 5 head-to-head comparisons available. It gained 14 stars over the last 30 tracked days.

What is second-brain?

Second Brain is an MIT-licensed Python agentic framework that turns a machine you control into an assistant with local file intelligence, workflow automation, and LLM-driven conversation across a terminal REPL, a web interface, and Telegram, aimed at developers and technical self-hosters.

What it is

Second Brain is an open-source agentic framework written in Python and released under the MIT licence, designed to act as an operating system for personal automation. It runs on the user's own machine and combines a conversation runtime, a scheduler, a file-intelligence layer, and a plugin system, so one agent can read and edit files, run shell commands and scripts, query SQL, search the web, and orchestrate subagents. It communicates over multiple modalities: the REPL, an optional HTTP web UI, and an optional Telegram frontend.

It lives in the open-source Python agent and LLM tooling ecosystem, alongside harnesses such as OpenClaw and Hermes. The concrete problem it addresses is fragmentation: local automation usually means a loose collection of shell scripts, cron entries, single-purpose chat bots, and separate model integrations that never share context. Second Brain replaces that assortment with one runtime where path-driven and event-driven tasks, attachment parsing, and model calls sit behind the same interface and the same set of plugins.

Key capabilities

  • The /setup wizard installs an essentials bundle in one pass: an LLM backend, file read, edit and search, shell and script running, SQL, web search, subagents, and the Telegram frontend.
  • Path-driven tasks and event-driven tasks provide the automation layer, supported by a cron-style scheduler listed among the project topics.
  • Attachment parsing and file parsing feed local file intelligence into the LLM loop.
  • Multiple frontends: the interactive REPL, an optional HTTP web UI described as a ChatGPT-style app that can be added to a phone's home screen, and Telegram with push notifications, attachments, and inline buttons.
  • Commands and plugins extend the agent, with a Sandbox and SDK surface documented in the README's infographic overview.
  • Model-agnostic configuration: any provider works with a pasted API key, and the sponsored fast path offers 300+ curated models behind a single key.
  • Docker packaging: build the image as second-brain and run it with a persistent sb-data volume; docs/DOCKER.md covers the container workflow.

Who uses it and how

  • Individual developers running it on their own laptop, where installation takes about two minutes and the assistant can see the local filesystem.
  • Self-hosters on a server or NAS who prefer not to install Python packages on the target machine, using the Docker image with the sb-data volume.
  • Users who want a phone-based assistant: Telegram setup needs a bot token from BotFather and a user ID from userinfobot, and the web UI generates an API token.
  • People who want recurring automation without maintaining a separate scheduler, using the event-driven and path-driven task modes.
  • Evaluation-minded users comparing harness configurations; the author published the evaluation framework and results for harness-bench, which measures model-harness configuration effects across 106 sandboxed offline agent tasks.

Getting started

Clone github.com/henrydaum/second-brain, create a virtual environment with Python 3.11 or newer, run pip install -r requirements.txt, then run python main.py to reach the REPL and execute /setup to install the essentials bundle and connect a model. A Dockerfile is provided for machines where nothing should be installed.

How it compares

The facts name OpenClaw and Hermes as the comparison points: the author reports that Second Brain performs higher than both on harness-bench, with caveats documented in the linked evaluation repositories. No list of replaced paid products is supplied, so the fair framing is that it competes with other open-source agent harnesses on the same task suite rather than displacing a commercial product. The head-to-head result is author-run and self-published, so it should be read as evidence rather than an independent benchmark.

When to use it — and when not to

A self-hoster must supply a model API key, run the Python environment or a Docker container, and manage a Telegram bot token if that frontend is wanted; the Docker path also starts out unable to see the host machine, which limits day-to-day use. Anyone who wants a hosted, managed service should not pick this, because it is built to run on hardware the user controls. The README leans on install steps and infographic summaries, so expect to consult docs/DOCKER.md and experiment rather than read a complete reference, and note that the repository carries sponsored commercial links.

project readme (upstream, from github) — read inline
highreslogotypecrop

Quick install

Sponsor

Atlas Cloud Logo Atlas Cloud Logo

Atlas Cloud is a full-modal AI inference platform that gives developers a single AI API to access video generation, image generation, and LLM APIs. Instead of managing multiple vendor integrations, you connect once and get unified access to 300+ curated models across all modalities. Check out Atlas Cloud's new coding plan promotion for more budget-friendly API access: https://www.atlascloud.ai/console/coding-plan

Second Brain Example

For an example of what Second Brain can do, visit https://second-brain.art! It's an interactive art exhibition.

Head-to-Head Evaluation

Second Brain performs higher than OpenClaw and Hermes on harness-bench, which measures "model-harness configuration effects across 106 sandboxed offline agent tasks". Here are the results: Captura de pantalla 2026-08-23 213236

The full evaluation framework I used is available on GitHub, and the full results are available here. I did this testing because I was curious how Second Brain would stack up against other agents. This provides the real results, but with a few small caveats, which you can read in the links provided.

What you get

Captura de pantalla 2026-09-10 202738Captura de pantalla 2026-09-10 202430

How Second Brain works, in infographic form

1. Attachment Parsing

1  Attachment Parsing

2. File Parsing

2  File Parsing

3. The LLM Loop

3  The LLM Loop

4. Path-Driven Tasks

4  Path-Driven Tasks

5. Event-Driven Tasks

5  Event-Driven Tasks

6. Conversation Runtime

6  Conversation Runtime

7. Frontends

7  Frontends

8. Commands

8  Commands

9. Plugins

9  Plugins

10. Sandbox & SDK

10  Sandbox   SDK

Install

Second Brain runs on your own machine. Two things to install: the app (required, ~2 minutes) and the UI (optional, a ChatGPT-style web app you can add to your phone's home screen).

1. Install the app

You need Python 3.11+ and git.

git clone https://github.com/henrydaum/second-brain
cd second-brain
python -m venv .venv

Activate the virtual environment:

Windows .venv\Scripts\activate
macOS / Linux source .venv/bin/activate

Then install and run:

pip install -r requirements.txt
python main.py

That's it — you're in the REPL. requirements.txt is nearly pure Python.

There's also a Dockerfile, if you'd rather not install anything:

docker build -t second-brain .
docker run --rm -it --init -v sb-data:/data second-brain

Same REPL, with everything kept in the sb-data volume. The path above is still the better one for day-to-day use — Second Brain is an assistant for your machine, and a container starts out unable to see it. Reach for this when the machine isn't one you want to install on: a server or a NAS, or a reproducible Linux to test against. docs/DOCKER.md covers it, including Docker itself if this is your first time.

2. Run /setup

/setup

The wizard walks you through everything in one pass:

  1. Install the essentials bundle — an LLM backend, file read/edit/search, shell and script running, SQL, web search, subagents, and the Telegram frontend.
  2. Connect a model — paste an API key. Atlas Cloud is the sponsored fast path (300+ models behind one key), but any provider works.
  3. Telegram (optional) — chat with your Second Brain from your phone. Needs a bot token from @BotFather and your user ID from @userinfobot.
  4. Web UI (optional) — installs the HTTP frontend and generates your API token, then prints the exact steps to set the app up. More below.

Say hello. You now have a working assistant. If you have questions, just ask.

3. Get out of the terminal

The REPL works, but it isn't where you want to live. Two much nicer options, in order of effort:

Effort What it's like
Telegram ~5 minutes — /setup shows the way Push notifications, attachments, inline buttons, and available on all major platforms.
Web UI ~10 minutes A ChatGPT-style app you open in a browser or add to your phone's home screen. Set it up below.

Skipped one during /setup? Just run /setup again.

4. Add more (optional)

A fresh install is deliberately small. Add capabilities whenever you want:

/packages install

On the Web UI, you can do this in Settings. That opens a picker — browse by category and choose. The bundles worth knowing:

Bundle What you get
bundle_knowledgebase Index and search your own files — PDF, Office, images, audio, video, spreadsheets, archives. OCR, transcription, embeddings, and three search tools. Large download.
bundle_memory Durable memory that maintains itself. Notes and skills are surfaced when relevant and written down in the background, as plain markdown you can edit.
bundle_gmail Read, send, reply, label.

Then tell it which folders to watch:

/config

Set sync_directories to the folders you want indexed. Expect a flood of task messages while the first sync runs — that's normal, and it stops when it finishes.


Install the UI

The UI lives in this repo, in frame_ui/. It is being rebuilt: right now it is a page that connects and prints what the kernel sends, not yet a chat interface. The previous UI — a React app on assistant-ui, in its own repo at second-brain-ui — still works and is still the one to use if you want a finished app today.

Works on Windows, macOS and Linux. Takes about two minutes.

Before you start: Second Brain has to be running while you use the UI — the UI is just a face for it. Leave it going in its terminal and open a second terminal for everything below. You'll also need Node 20.19+ or 22.12+.

1. Turn the HTTP frontend on

If you said yes to the web UI during /setup, this is already done — skip to step 2. Otherwise, in the Second Brain REPL:

/frontends enable http
/restart

There is no token to set. Second Brain mints secret_http_token at boot and the UI reads it out of config.json itself, so nothing gets copied anywhere.

2. Install the UI's dependencies

Once, in your second terminal:

cd frame_ui
npm install

(frame_ui is in your Second Brain folder — the same one you cloned to run the server. There is no .env file to make.)

From then on Second Brain starts the UI itself and tells you where it is:

UI is reachable at: http://localhost:5174

3. Open it

Open that address. You should see the thread name, ok beside Request and open beside Stream — that is the whole bridge working.

No notification at all means the UI never came up: web_ui.log in your data directory is the dev server's own output, and is where that explains itself — most often a missing npm install. A 401 on the page means the dev server started before the token existed; /restart, since it reads config.json once, at startup.

Prefer to run it yourself? Set ui_autostart to off in /config and use npm run dev as before. Anything already serving is left alone either way, so a dev server you keep running is adopted rather than duplicated.

Reaching it from another machine

One setting, in the REPL:

/config   →  http_client_url = http://my-box.tail1234.ts.net:8787

/restart and that's the whole change. The browser never sees that value — it only ever talks to the dev server, which proxies onward and adds the credential itself — so nothing about CORS or tokens moves with it.

Put it on your phone

Reaching it from your phone means the dev server has to accept connections from other devices. Turn ui_autostart off and run it yourself with the flag that does that:

cd frame_ui
npm run dev -- --host

That prints a second URL (a 192.168.x.x address). To reach it from anywhere rather than just your home Wi-Fi, install Tailscale on both your computer and your phone, and use your machine's Tailscale address instead. Note this exposes the dev server, which holds the credential and adds it for whoever connects — fine on a tailnet, not something to put on a café Wi-Fi.

Open that URL in your phone's browser, then add it to your home screen — on iPhone, press the three dots, then Share, and scroll down to Add to Home Screen. Click it, and you're done. It's like a real app from there.

Why the dev server?

Because it's the only thing that works on every platform today. npm run build produces a dist folder that frontend_http can serve directly (the http_static_dir setting), but a build served that way has to get its token from somewhere, and putting it in the bundle hands the credential to every browser that loads the page. Serving a build properly needs a reverse proxy that adds the token on its own hop — which today exists only in the old UI repo's macOS deployment. The dev server is perfectly fine for personal use.


Where things live

Second Brain creates its data directory on first run. Config, database, installed packages, and the agent's workspace all live there:

Windows %LOCALAPPDATA%\Second Brain\
macOS ~/Library/Application Support/Second Brain/
Linux ~/.local/share/Second Brain/

Run /locations to see the paths on your machine. Useful commands once you're up:

Command What it does
/packages Install and remove capabilities
/config Every setting, including plugin settings
/llm Add, switch, or edit model profiles
/conversations Browse and switch conversations
/commands List everything available

Philosophy

Second Brain is inspired by the human brain. Explorations into neurons turned into the creation of artificial neural networks, which then paved the way for attention mechanisms and transformers. From there came LLMs, and then came the agentic abilities: RAG, tool calls, and cron jobs. With each iteration, Second Brain became closer to its biological inspiration.

Second Brain is still pretty far from the real brain, in many ways. However, it can also do many things better than the human brain ever could. Building it has helped me to better understand the role of AI in my life, and in society. I found the process of building to be extremely valuable, because I realized that the value of AI is that it can be built into so many things. The role of the person is to guide it into productive and creative areas.

License

MIT


An agent by Henry Daum

Frequently asked questions

Is second-brain free to use?

second-brain is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does second-brain do?

Second Brain is an agentic framework that acts as an operating system, using local file intelligence, workflow automation, and LLMs to complete tasks and commun

What is second-brain written in?

second-brain is primarily written in Python. Its source is publicly available at https://github.com/henrydaum/second-brain, and it has 678 GitHub stars.