reflex-brain
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@reflex-brain What lessons do I have about DIAN compliance? Propose a new one from recent sessions."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Reflex Brain
Continual learning brain for AI agents — lessons, skills, and memories with evidence-based refinement, rollback, and GraphRAG retrieval.
Overview
Reflex Brain is an agent-agnostic, continual learning memory system that gives AI agents the ability to:
Learn continuously from interactions — extract lessons, skills, and memories with evidence
Refine knowledge through evidence-based updates (
/refineequivalent) with full audit trailRollback safely — snapshot-based versioning with one-click revert
Retrieve intelligently — GraphRAG + continual memory hybrid queries with quality filtering
Run anywhere — MCP server for Hermes/Claude Code/Codex, or as standalone library
Related MCP server: Consciousness MCP Server
Architecture
┌─────────────────────────────────────────────────────────────┐
│ AGENT LAYER │
│ Hermes │ Claude Code │ Codex │ OpenInterpreter │ Custom │
└────────────────────────────┬────────────────────────────────┘
│ MCP / Python API
▼
┌─────────────────────────────────────────────────────────────┐
│ REFLEX BRAIN CORE │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Lessons │ │ Skills │ │ Memories │ │
│ │ (versioned)│ │ (executable)│ │ (episodic) │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
│ └────────────────┼────────────────┘ │
│ ▼ │
│ ┌──────────────────────┐ │
│ │ Refinement Engine │ ← Evidence-based │
│ │ (propose/validate/ │ updates + rollback │
│ │ apply/rollback) │ │
│ └──────────┬───────────┘ │
│ │ │
│ ┌──────────▼───────────┐ │
│ │ Snapshot Store │ │
│ │ (full checkpoints) │ │
│ └──────────────────────┘ │
└─────────────────────────────────────────────────────────────┘Key Features
Feature | Description |
Lessons | Versioned knowledge units with evidence, confidence scores, and semantic clusters |
Skills | Executable capabilities (Python/JS) with interfaces, tests, and versioning |
Memories | Episodic memories with importance decay and temporal context |
Refinement Engine | Proposes, validates, and applies updates based on evidence weight |
Snapshots | Full state checkpoints for safe rollback |
Hybrid Querier | Combines GraphRAG (conversations) + Continual (lessons/skills/memories) |
Quality Filtering | Penalizes tool outputs, boosts substantial content, prioritizes high-value types |
MCP Server | Thin wrapper exposing |
Daemon | Background processor for passive capture + continuous embedding |
Installation
# From PyPI (when published)
pip install reflex-brain
# From source
git clone https://github.com/jesuscaicedo800/reflex-brain.git
cd reflex-brain
pip install -e ".[dev]"Quickstart
As MCP Server (Hermes, Claude Code, Codex)
# config.yaml
mcp_servers:
reflex-brain:
command: "python"
args: ["-m", "continual_brain.mcp.server"]
env:
HF_HUB_OFFLINE: "1"
REFLEX_DB_PATH: "~/reflex-brain/continual.db"
REFLEX_FAISS_PATH: "~/reflex-brain/"Restart your agent — tools available: reflex_query, reflex_propose_lesson, reflex_apply_refinement, reflex_rollback, reflex_snapshot.
As Python Library
from continual_brain import ReflexBrain
brain = ReflexBrain(db_path="continual.db")
# Query (GraphRAG + Continual hybrid)
results = brain.query("DIAN facturación electrónica", top_k=5)
# Propose a lesson from recent session
proposal = brain.propose_lesson("DIAN compliance", session_id="sess_123")
# Apply with evidence threshold
brain.apply_refinement(proposal, auto_apply=True)
# Rollback if needed
brain.rollback(refinement_id="ref_abc")Run Daemon (Background Processing)
# Foreground
reflex-brain daemon --poll-interval 3 --batch-size 50
# Background service
reflex-brain daemon --daemonizeConfiguration
Env Var | Default | Description |
|
| SQLite database path |
|
| FAISS index directory |
|
| Set |
|
| Sentence transformer model |
Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check .
# Type check
mypy continual_brain
# Pre-commit
pre-commit installProject Structure
reflex-brain/
├── continual_brain/
│ ├── core/ # Models, Store, RefinementEngine, Evidence
│ ├── query/ # BrainQuerier, ContinualQuerier, HybridQuerier
│ ├── daemon/ # Processor, Extractor, Embedder
│ ├── mcp/ # Thin MCP server wrapper
│ └── cli/ # CLI entry points
├── tests/
│ ├── unit/ # Unit tests
│ └── integration/ # Integration tests
└── pyproject.tomlLicense
MIT © Jesus Caicedo
Related
Hermes Agent — AI agent with Brain MCP
Prime Intellect Prime Agent — Inspiration for Continual Harness
Open Interpreter — Agent harness for open models
Available Tools
22 toolsreflex_apply_refinementA
Apply a stored proposal once. Explicit approval requires approved=true; auto_apply only accepts evidence above threshold.
Inputs: refinement_id (required), approved, auto_apply.
reflex_get_lessonC
Get a specific lesson by ID
Inputs: lesson_id (required).
reflex_get_refinementC
Inspect a refinement audit record.
Inputs: refinement_id (required).
reflex_get_skillC
Get a specific skill by ID
Inputs: skill_id (required).
reflex_list_lessonsC
List lessons with optional filters
Inputs: limit, status, cluster_id.
reflex_list_proposalsC
List persisted proposals and their application state.
Inputs: limit.
reflex_list_skillsC
List skills with optional filters
Inputs: limit, status.
reflex_propose_lessonC
Propose a new lesson or update from session analysis
Inputs: topic (required), tags, content, confidence, +2 more.
reflex_queryC
Query hybrid memory (GraphRAG conversations + Continual lessons/skills/memories)
Inputs: query (required), top_k, expand_depth, source_types, +2 more.
reflex_rememberB
Persist an explicitly supplied episodic memory; returns its stable ID.
Inputs: content (required), tags, context, importance.
reflex_researchB
Automated web research: search, extract, synthesize and store knowledge on a topic
Inputs: topic (required), max_sources, create_lessons, create_memories.
reflex_rollbackC
Rollback a refinement using its snapshot
Inputs: refinement_id (required).
reflex_scheduler_add_taskC
Add a scheduled research task
Inputs: name (required), topic (required), enabled, frequency, +4 more.
reflex_scheduler_add_triggerC
Add a low-coverage trigger for automatic research
Inputs: name (required), topic_pattern (required), enabled, cooldown_hours, +2 more.
reflex_scheduler_check_coverageC
Check knowledge coverage for a topic
Inputs: topic (required).
reflex_scheduler_list_tasksC
List scheduled research tasks
Inputs: enabled_only.
reflex_scheduler_list_triggersB
List research triggers and their IDs.
Inputs: no named parameters.
reflex_scheduler_remove_taskC
Remove a scheduled research task
Inputs: task_id (required).
reflex_scheduler_remove_triggerC
Remove a research trigger by ID.
Inputs: trigger_id (required).
reflex_scheduler_statsC
Get scheduler statistics
Inputs: no named parameters.
reflex_snapshotC
Create a manual snapshot of current state
Inputs: label (required).
reflex_statusA
Inspect version, memory counts, indexing and scheduler state without loading an embedding model.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Most tools target a distinct resource+action (remember vs query vs research vs propose_lesson), and the scheduler_* family is clearly scoped. Minor overlap exists between reflex_query and list_lessons/list_skills, and between scheduler_check_coverage and reflex_status, since both report knowledge/state summaries.
All tools share a reflex_ prefix and snake_case, with a clean reflex_scheduler_* sub-namespace. Deviations are mild: several tools are verb-only or noun-only (reflex_status, reflex_snapshot, reflex_research) rather than verb_noun, but the pattern remains readable.
22 tools for a memory/refinement/research brain is at the heavy end; the scheduler alone consumes 8 slots (tasks + triggers + coverage + stats) that could be consolidated. Several pairs (get_lesson/get_skill, list_lessons/list_skills) suggest mergeable surface.
Lifecycle coverage is strong for proposals/refinements (propose, list, get, apply, rollback) and the scheduler (add/remove/list for tasks and triggers), plus retrieval via query/research. However, there is no forget/delete for memories, no update/delete for lessons or skills, leaving dead ends for correcting or pruning stored knowledge.
Maintenance
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
An MCP memory server. One memory your agents share — across models, devices and apps.
MCP server for building and testing AI agents with multi-model experimentation and insights.
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA sophisticated MCP server providing advanced memory capabilities with RAG, hallucination detection, and enterprise-grade AI infrastructure for intelligent agent ecosystems.-
- AlicenseNot gradedqualityDmaintenanceMCP server providing persistent brain storage for LLM agents, including memory, personality, social intelligence, and context management.1MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that gives AI agents and teams persistent, shared memory using a knowledge graph with vector embeddings, automatic consolidation of related facts, and hybrid search.3-
- AlicenseAqualityBmaintenanceAn MCP server providing long-term memory for AI agents with forgetting curves, consolidation, and graph-based retrieval.10MIT