← Open Source

Second Brain is an agentic framework that acts as an operating system, using local file intelligence, workflow automation, and LLMs to complete tasks and communicate over multiple modalities and messaging platforms.

AI EngineeringGive agent knowledgeBuild agent workflow (SDK)Python
Momentum
+0stars in 24 hours0.0%
693
Stars
89
Forks
+0
This week
2
Contributors
Created 2025-09-19 · Updated 2026-12-03 · #19016 today
Top developers
henrydaumGabriel-vzh2vs
README

Second Brain

An operating system for AI agents. The agent loop is a plugin, and every call is mediated.

A self-hosted AI agent built on a small kernel — the plugin contract, the SDK, boxes that plugins run in, the security policy and the loading and unloading of plugins — with everything else as plugins. Read AGENTS.md before changing the code, docs/KERNEL.md for the map and docs/SDK.md for writing plugins.

Run

python3 -m venv .venv && .venv/bin/pip install -e .[dev]
.venv/bin/python main.py          # the terminal front end (/help lists the commands); --no-repl runs headless
.venv/bin/python -m pytest        # tests

On Windows use py -3 -m venv .venv and .venv\Scripts\python in place of .venv/bin/python. On macOS, Python from python.org needs "Install Certificates.command" run once (in its Applications folder), or every call to a model provider fails with a certificate error.

Layout

main.py          bootstrap
kernel/          the kernel; plugins import only its front door (from kernel import Plugin, capability)
bundled/         plugins and scripts that ship with the app
docs/            KERNEL.md       the map: boxes, loading and unloading, every fixed limit
                 SDK.md          the plugin author's reference
                 POLICY.md       the security policy
                 AGENT_GUIDE.md  what the running agent reads about itself
                 KNOWN_ISSUES.md the one list of known bugs and gaps
                 templates/      a worked example plugin and script
tests/           README.md says what the tests pin
AGENTS.md        read before changing the code

Mutable data (settings, installed plugins, the agent's workspace, logs) lives outside the checkout: ~/.local/share/second-brain on Linux, ~/Library/Application Support/Second Brain on macOS, %LOCALAPPDATA%\Second Brain on Windows; or $SECOND_BRAIN_DATA. Every path is defined once, in kernel/paths.py.

Nearby in the ranking
Similar items

AI Rank for iPhone

Follow AI model rankings

Download on the App Store