Important
Official Repository: This project is officially hosted and maintained at huggingface.co/spaces/projectsorg/ever-Brain.
A Cognition Operating System for AI Coding Agents
Persistent · Portable · Markdown-Native · Open Source
AI agents lose operational continuity across sessions, tools, projects, and models. Ever-Brain fixes this.
Every time you start a new AI session, switch from Claude to Cursor, change tools, resume an old project, or hit usage limits — the new AI instance loses everything: project understanding, architecture decisions, workflow continuity, coding preferences, active tasks, and operational memory.
Ever-Brain creates persistent, portable cognition layers shared between you and your AI agents through a markdown-based filesystem protocol. The agents remain the intelligence. Ever-Brain preserves continuity.
Ever-Brain is not a chatbot, note-taking app, memory SaaS, or AI coding assistant.
Ever-Brain is a filesystem-based continuity infrastructure layer for AI-assisted development.
| What you get | What you avoid |
|---|---|
| Persistent memory across sessions | No databases or vector stores |
| Portable across AI tools & models | No cloud infrastructure |
| Fully local, user-owned data | No vendor lock-in |
| Markdown — human & AI readable | No proprietary formats |
| Git-compatible versioning | No background daemons |
- Python 3.11+
- pip
# Clone the repository
git clone https://huggingface.co/spaces/projectsorg/ever-brain
cd ever-brain
# Install globally (editable mode)
pip install -e .# 1. Create a Ever-Brain Instance
brain create my-brain
# 2. Activate it
brain use my-brain
# 3. Navigate to any project
cd ~/projects/my-app
# 4. Attach the project to your brain
brain attach
# 5. Start working with any AI agent — they'll discover brain automatically
# 6. When done, sync your brain state
brain sync
# 7. Optionally, disconnect the workspace
brain detachRun brain with no arguments to see system status at any time:
brain Status
> Active brain: my-brain
> Brain Path: C:\Users\you\.brains\my-brain
> Attached Project: my-app
> Brain Version: v1
> Workspace Runtime: Connected
Ever-Brain consists of three distinct layers:
┌─────────────────────────────────────────────┐
│ Ever-Brain System (CLI) │ ← Management, lifecycle, protocol
├─────────────────────────────────────────────┤
│ Ever-Brain Instance (~/.brains/) │ ← Persistent cognition storage
├─────────────────────────────────────────────┤
│ Workspace Runtime (.brain/) │ ← Local project bridge
└─────────────────────────────────────────────┘
Lives at ~/brains/<name>/. This is the source of truth for all cognition.
my-brain/
├── user/ # Your persistent identity
│ ├── personality.md # Communication style & tone
│ ├── preferences.md # Coding, architecture, tooling
│ └── workflows.md # Development habits & processes
│
├── projects/ # Per-project memory
│ └── my-app/
│ ├── context.md # Project overview & tech stack
│ ├── architecture.md # System design & structure
│ ├── decisions.md # Architecture decision records
│ ├── tasks.md # Active, pending, completed tasks
│ ├── handoff.md # Session continuity state
│ ├── docs/ # Additional documentation
│ ├── logs/ # Operational logs
│ └── agents/ # Per-agent project logs
│
├── agent-configs/ # Agent discovery protocols
│ ├── .cursorrules # Cursor auto-discovery
│ └── CLAUDE.md # Claude auto-discovery
│
├── agents/ # Per-agent operational history
│ ├── claude/
│ ├── cursor/
│ └── codex/
│
├── skills/ # Reusable workflow conventions
│ ├── coding-style.md
│ └── debugging.md
│
├── raw/ # Imported unstructured context
├── versions/ # Sync snapshots (v1, v2, ...)
└── AGENT.md # brain protocol definition
The .brain/ directory injected into your project is a lightweight, disposable bridge — not storage. It links agents to your Ever-Brain Instance.
project/.brain/
├── AGENT.md # Generated workspace-specific protocol
├── brain.json # Machine-readable metadata
├── linked_brain # Path to active Ever-Brain Instance
└── current_project # Attached project identity
| Command | Description |
|---|---|
brain |
Show system status (default) |
brain create <name> |
Create a new Ever-Brain Instance at ~/brains/<name>/ |
brain use <name> |
Set the active brain Instance globally |
brain import |
Inject .brain/ runtime into the current workspace |
brain attach |
Register the workspace as a project in the active Ever-Brain (auto-imports if needed) |
brain sync |
Create a versioned snapshot of the current Ever-Brain state |
brain detach |
Remove the .brain/ runtime from the workspace |
brain delete <name> |
Permanently delete a brain Instance (--force to skip confirmation) |
brain status |
Display active brain, project, version, and runtime state |
brain connect |
(Placeholder) Future Supabase cloud sync integration |
# Create and switch between multiple brains
brain create work-brain
brain create personal-brain
brain use work-brain
# Delete a brain you no longer need
brain delete personal-brain
# Check what's active
brain status
# Full workflow: attach, work, sync, detach
brain attach
# ... do your work with AI agents ...
brain sync
brain detachEver-Brain operates on a simple contract: agents maintain brain, brain maintains continuity.
When an AI agent discovers AGENT.md in a workspace, it:
- Reads user context from
user/to understand your preferences - Reads project memory from
projects/<project>/to resume continuity - Follows the handoff protocol: read handoff → work → update handoff
- Records architecture decisions in
decisions.md - Updates
tasks.mdas work progresses - Writes session logs to
agents/<agent-name>/
Agents discover Ever-Brain automatically through standard configuration files:
- Cursor → reads
.cursorrules→ finds.brain/ - Claude → reads
CLAUDE.md→ finds.brain/ - Others → discovers
AGENT.mdin workspace root
No manual prompting required. Agents self-identify and operate within their own directories by convention.
| Principle | Implementation |
|---|---|
| Persistent Continuity | Ever-Brain persists independently of projects, sessions, and tools |
| Agents Maintain Ever-Brain | AI agents read/write cognition; users just work normally |
| Markdown Is The Protocol | Everything is markdown, filesystem-based, git-compatible |
| Local-First Ownership | Fully local, user-owned, inspectable, and portable |
| Convention Over Configuration | Agents self-identify; no runtime enforcement needed |
| Component | Technology |
|---|---|
| Language | Python 3.11+ |
| CLI Framework | Typer |
| Terminal Rendering | Rich |
| Storage | Markdown (filesystem) |
| Versioning | Local snapshots (shutil.copytree) |
| Config | JSON (~/.brainconfig) |
| Packaging | pyproject.toml + pip install -e . |
ever-brain/
├── pyproject.toml # Package config & dependencies
├── README.md
├── brain/
│ ├── __init__.py
│ ├── cli.py # Typer app + command registration
│ ├── config.py # Global config (~/.Ever-Brainconfig)
│ ├── paths.py # Cross-platform path resolution
│ ├── commands/
│ │ ├── create.py # brain create <name>
│ │ ├── use.py # brain use <name>
│ │ ├── status.py # brain status
│ │ ├── import_brain.py # brain import
│ │ ├── attach.py # brain attach
│ │ ├── sync.py # brain sync
│ │ ├── detach.py # brain detach
│ │ ├── delete.py # brain delete <name>
│ │ └── connect.py # brain connect (placeholder)
│ ├── templates/
│ │ ├── brain_instance.py # brain Instance scaffolding
│ │ ├── project_memory.py # Project memory templates
│ │ ├── workspace_runtime.py # .brain/ runtime generation
│ │ └── agent_protocol.py # AGENT.md generation
│ └── utils/
│ ├── git.py # Git remote/identity detection
│ └── display.py # Rich console helpers
└── creationdoc/ # Design documents & specifications
- Core CLI (
create,use,status,import,attach,sync,detach) - Ever-Brain Instance scaffolding with templates
- Workspace runtime bridge
- Project memory with auto-detection (git remote → folder name → cwd)
- Local version snapshots
-
brain deletewith confirmation - Supabase cloud sync (
brain connect— placeholder exists) - Cross-device synchronization
- Team collaboration & shared brains
- brain export/import between machines
- Plugin system for custom agent protocols
The intelligence comes from the agents. The continuity comes from brain.
Ever-Brain doesn't replace your AI tools. It makes them coherent. Every agent you use — Claude, Cursor, Copilot, Codex — reads from the same persistent memory and writes back to it. Context is never lost. Decisions are never forgotten. Handoffs happen automatically.
Your brain is yours. It's markdown files on your filesystem. No vendor owns it. No cloud stores it. No subscription gates it. You can read it, edit it, version it with git, and carry it anywhere.
Open Source. See LICENSE for details.