Skip to content

rolznz/sovereign-brain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Sovereign Brain

A sovereign "second brain" for brainstorming, decision making, working on personal projects, and offloading thoughts from the human's brain — local & private.

This project is quite opinionated, mostly driven by resource constraints — almost all decent LLMs cannot run on a typical consumer PC or laptop. Here I provide a solution that actually works.

It's harness-independent: just a folder of markdown. Point any agent that supports an AGENTS.md (and, optionally, Agent Skills) at it, backed by a local model.

How it's organized

  • AGENTS.md — who your brain is (its personality "Atlas", and its purpose). Always in context.
  • Your data — thoughts, todos, project ideas, brainstorms, history. These files appear in this folder as you use it. The whole folder is your brain — version it with git and back it up.
  • Skills (optional) — structured capabilities (capture a thought, log a project idea, run a brainstorm, track a habit…). Installed separately, see below.

Prerequisites

  • Local machine with at least 32GB RAM
  • A local LLM — e.g. llama.cpp serving Qwen3.6-35B-A3B
  • An agent harness that reads AGENTS.md (and, ideally, Agent Skills) — bring your own

Getting started

Sandbox the agent (recommended). Your agent can write files and run commands, so run it inside a throwaway VM where it can't touch your host. Multipass is an easy option — then do the steps below inside the VM:

multipass launch --name sovereign-brain
multipass shell sovereign-brain
  1. Make a new, empty folder and download AGENTS.md into it:

    mkdir my-brain && cd my-brain
    curl -O https://raw.githubusercontent.com/rolznz/sovereign-brain/refs/heads/master/AGENTS.md
  2. Have a local model running (see Run a local model below).

  3. Open your agent in that folder and type start. It'll guide you from there. 🧠

Run a local model

1. Start the model download (do this first — it's large)

The model file is several GB, so kick it off before anything else. I recommend the 3-bit XXS quant — small but still smart enough to do the job:

2. Set up llama.cpp (the inference engine)

Follow the llama.cpp quick start for your OS. If you build from source, these commands work:

# CPU only
cmake -B build
# …or for an NVIDIA GPU
cmake -B build -DGGML_CUDA=ON

cmake --build build --config Release -j

3. Run the model

Once the .gguf has finished downloading, start the server:

./build/bin/llama-server \
  -m Qwen3.6-35B-A3B-UD-IQ3_XXS.gguf \
  -ngl 24 -np 1 -fa on \
  -ctk q4_0 -ctv q4_0 \
  -c 262144 \
  --host 0.0.0.0 --port 8088 \
  -ncmoe 38 --no-mmap --jinja

Tune for your machine. The flags above are tuned for an NVIDIA 4060 laptop. Adjust -ngl (layers offloaded to the GPU), -ncmoe (expert layers kept on the CPU), and -c (context size) depending on your hardware.

llama.cpp prints a URL when it starts — open it and confirm you can chat with the LLM. You now have a local LLM running; point your agent harness at it.

Optional follow-ups

  • Always-on with systemd. Create a systemd service so llama.cpp starts automatically on boot — no need to launch it by hand each time.
  • Speech to text. Add VoxType for local speech-to-text so you can dictate to your brain. I use parakeet — super fast even on CPU (leaving more VRAM for the LLM).
  • Back it up. Periodically copy your brain folder to a flash drive — it's your second brain, don't lose it.
  • Give it a wallet. Add the Alby payments skill so your agent can have permissioned access to your wallet and pay on your behalf.

License

The Unlicense — released into the public domain. See LICENSE.

About

A local and private sovereign second brain for brainstorming, decision making, working on personal projects, offloading thoughts

Topics

Resources

License

Stars

9 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors