brainctl

Manage SQLite-backed agent memory with CRUD for memories, events, entities, and reasoning.

78|16|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/TSchonleber/brainctl --skill brainctl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: brainctl
Source: https://github.com/TSchonleber/brainctl/tree/main
Command: npx skills add https://github.com/TSchonleber/brainctl --skill brainctl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

brainctl provides a single, SQLite-backed spine for agents to remember, decide, log, and reason across sessions, enabling durable context and cross-agent knowledge transfer.

Core Features & Use Cases

  • Memory lifecycle: store, retrieve, and decay memories; build a knowledge graph with entities and edges; log events; record decisions; and consolidate memory over time.
  • Retrieval and search: FTS5 full-text search with optional vector search for semantic recall; cross-table search across memories, events, and entities.
  • MCP server surface: expose 201 tools for programmatic control via CLI or remote agents.
  • Multi-agent collaboration: share one brain.db across agents and coordinate through handoffs, triggers, and trust dynamics.

Quick Start

Install brainctl, initialise brain.db with brainctl init, then begin storing and querying memories using an agent_id.

Frequently Asked Questions about brainctl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add persistent memory to an AI agent so it remembers context across sessions?

Persistent agent memory is provided by a SQLite-backed brain that stores, retrieves, and decays memories across sessions. You initialize a local brain.db file, then use an agent_id to log events and query historical context via CLI, Python API, or MCP server.

Can multiple agents share the same SQLite memory database for cross-agent collaboration?

Cross-agent collaboration is enabled by sharing one brain.db file across multiple agents on a single machine. Agents coordinate through handoffs, triggers, and trust dynamics, reading and writing to the same SQLite-backed knowledge graph simultaneously.

What's the best way to build a knowledge graph with entities and edges for agent reasoning?

Building a knowledge graph involves using CRUD operations to create entities and edges within a SQLite-backed brain. You store entities, define relationships as edges, and record decisions, allowing agents to retrieve structured reasoning context through FTS5 or vector search.

Do I need Python 3.11 and sqlite-vec to use local agent memory with semantic recall?

Python 3.11+ and SQLite are required for local agent memory, while sqlite-vec is an optional dependency for vector search and semantic recall. FTS5 full-text search is available by default for cross-table retrieval across memories, events, and entities without vector extras.

How does an MCP server expose agent memory tools for remote programmatic control?

An MCP server surface exposes 201 tools for programmatic control of agent memory via remote agents. By installing the optional MCP extras, you can initialize brain.db and manage memories, events, and entities directly through MCP endpoints.

Does brainctl work without a network connection for single-machine agent memory persistence?

Single-machine persistence is fully supported without a network connection because brainctl uses a local SQLite database as its spine. All memory lifecycle operations, including storage, retrieval, and decay, function offline within the local brain.db file.