brain² — local-first personal AI agent for your Obsidian vault.
Project description
brain² (BrainSquared)
Your second brain, on your laptop. No cloud. No subscriptions. Just your data and an AI that knows it.
You connect your existing tools — Obsidian, Gmail, Google Calendar, Notion — and brain² seeds a new vault from your real data. Then you chat with it through a minimal browser UI. The agent reads and writes your vault directly. Everything stays on your machine.
How it works
Browser UI ──► brain² Server ──► Claude Code / Codex CLI
│
Obsidian Vault (markdown files)
│
Gmail · Calendar · Notion · RSS
- Obsidian is the database. No SQLite, no Redis — just markdown files.
- The agent is swappable. Claude Code or Codex, configured at startup.
- The UI is minimal. One HTML file, no build step, opens instantly.
- Everything is local. Your vault, your machine, your data.
Quickstart
1. Install
git clone https://github.com/Sushanti/brainsquared
cd brainsquared
python3 -m venv .venv
source .venv/bin/activate
pip install -e '.[test]'
Requires Claude Code (or Codex) installed and authenticated.
2. Connect your tools (optional)
python bootstrap.py
Walks you through Google OAuth (Gmail + Calendar), Notion API key, and RSS feeds. Writes credentials to .env. All integrations are optional — brain² works with just a vault.
3. Seed a new vault
brain seed --vault ~/my-vault \
--from-obsidian ~/path/to/existing-vault \
--from-notion \
--from-gmail \
--from-calendar
brain² collects your existing data, runs it through Claude, and populates:
my-vault/
├── core/ ← profile, projects, interests, people
├── references/ ← reference material (if found)
├── daily/ ← today's note with tasks, events, emails
├── thoughts/ ← AI conversation summaries (auto-written)
└── system/ ← config and agent instructions
Use --dry-run to inspect collected data before the agent writes anything.
4. Start
brain start --vault ~/my-vault
Opens http://localhost:3000. Chat with your vault. Click the home icon next to the title to browse all your notes.
All commands
brain seed --vault PATH [--from-obsidian PATH] [--from-notion] [--from-gmail] [--from-calendar] [--dry-run]
brain init --vault PATH [--agent claude-code|codex]
brain start --vault PATH [--agent claude-code|codex] [--port N] [--no-open]
brain daily --vault PATH [--force]
brain status --vault PATH
Integrations
| Integration | Used for | Required |
|---|---|---|
| Google Calendar | Daily note events, seed context | No |
| Gmail | Daily note action items, seed context | No |
| Notion | Open tasks, page content | No |
| RSS feeds | Reading list in daily note | No |
| Claude Code | Agent backend | Yes (or Codex) |
Vault structure
brain² uses five folders. Existing vault folders are mapped automatically — your Daily/ becomes daily, your References/ becomes references, etc.
| Folder | Purpose |
|---|---|
core/ |
Persistent notes: profile, projects, interests, people |
references/ |
Reference material, links, resources |
daily/ |
One note per day, generated from integrations |
thoughts/ |
Auto-written summaries of AI conversations |
system/ |
brain.config.yaml and CLAUDE.md agent instructions |
Development
pip install -e '.[test]'
pytest -q
The integration clients (gmail_client.py, calendar_client.py, notion_client.py, news_client.py) live at the project root and are loaded dynamically at runtime. config.py is the central configuration module they all import from.
Roadmap
-
brain setup— guided OAuth app setup so each user owns their own Google credentials (avoid shared credential abuse) - Move integration clients into
brain/integrations/ - VPS deployment (Hetzner/Fly.io) with obsidian-headless sync
- Mobile access via Tailscale
- Background scheduled tasks
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brainsquared-1.0.0.tar.gz.
File metadata
- Download URL: brainsquared-1.0.0.tar.gz
- Upload date:
- Size: 468.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
547ec44b6e7ee81fa44d60d64277c9ce73aa2d2e688eb555c21983b508ed66f1
|
|
| MD5 |
2b9655394160da5cee3ec0d5d706ad5a
|
|
| BLAKE2b-256 |
30c267d057157bad80d4cf67665d8f62b090b2fc3f66311e5a8148d414fb01b6
|
Provenance
The following attestation bundles were made for brainsquared-1.0.0.tar.gz:
Publisher:
publish.yml on Sushanti99/BrainSquared
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brainsquared-1.0.0.tar.gz -
Subject digest:
547ec44b6e7ee81fa44d60d64277c9ce73aa2d2e688eb555c21983b508ed66f1 - Sigstore transparency entry: 1343916758
- Sigstore integration time:
-
Permalink:
Sushanti99/BrainSquared@9c1df9a0ee815f51b441769d8e83731813bb4dcf -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Sushanti99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9c1df9a0ee815f51b441769d8e83731813bb4dcf -
Trigger Event:
push
-
Statement type:
File details
Details for the file brainsquared-1.0.0-py3-none-any.whl.
File metadata
- Download URL: brainsquared-1.0.0-py3-none-any.whl
- Upload date:
- Size: 262.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a029f429952a6d5beeacff34ec00c135cbc3705b6d06ce4a63d44660c847482
|
|
| MD5 |
cf9b097b256b87934d8315f28f31a52f
|
|
| BLAKE2b-256 |
9e398ef650d0f760a31761a8a26438e941b0e1a3b21b663ae1545051443b5e28
|
Provenance
The following attestation bundles were made for brainsquared-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on Sushanti99/BrainSquared
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brainsquared-1.0.0-py3-none-any.whl -
Subject digest:
1a029f429952a6d5beeacff34ec00c135cbc3705b6d06ce4a63d44660c847482 - Sigstore transparency entry: 1343916791
- Sigstore integration time:
-
Permalink:
Sushanti99/BrainSquared@9c1df9a0ee815f51b441769d8e83731813bb4dcf -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Sushanti99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9c1df9a0ee815f51b441769d8e83731813bb4dcf -
Trigger Event:
push
-
Statement type: