Friday
Self-hosted persistent cognitive memory layer for AI coding agents.
Persists architecture decisions, schemas, and constraints across sessions via the Model Context Protocol (MCP).
Power your agent
การติดตั้งจากผู้เผยแพร่ ไม่ใช่เอนด์พอยต์ของ PlugMCP
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
Self-hosted persistent cognitive memory layer for AI coding agents.
Persists architecture decisions, schemas, and constraints across sessions via the Model Context Protocol (MCP).
The open-source persistent cognitive memory layer for AI coding agents. Stop your Cursor, Claude & Copilot from having amnesia.
Modern AI coding agents (Cursor, Claude Code, Antigravity, VS Code) excel at isolated code generation. However, in continuous engineering workflows, developers encounter a structural limitation: Session Amnesia.
Current workarounds fall into three deeply flawed patterns:
┌─────────────────────────────────────────────────────────┐
│ WHY STANDARD APPROACHES BREAK DOWN │
└─────────────────────────────────────────────────────────┘
1. Context Windows (RAM) 2. Static Rules Files 3. Standard Vector RAG
┌─────────────────────────┐ ┌─────────────────────────┐ ┌─────────────────────────┐
│ • Ephemeral volatile │ │ • Linear token tax │ │ • Matches text phrasing,│
│ memory (clears on │ │ (2,500 tokens burned │ │ NOT system topology │
│ every new thread) │ │ on every trivial fix) │ │ • Blind to directed │
│ • Lost-in-the-middle │ │ • Stale rules accumu- │ │ call graphs & schema │
│ degradation on 50k+ │ │ late & conflict │ │ dependencies │
│ token prompts │ │ • Zero cross-tool sync │ │ • Hallucinates blast │
│ • High latency & cost │ │ (Cursor ≠ Claude CLI) │ │ radii of refactors │
└─────────────────────────┘ └─────────────────────────┘ └─────────────────────────┘
.cursorrules, AGENTS.md) forces the model to re-read thousands of lines on every keystroke, leading to contradictory instructions and cross-editor fragmentation.Friday runs as a self-hosted background service providing a structured, four-tier memory substrate accessed via the Model Context Protocol (MCP):
┌────────────────────────────────────────────────────────────────────────────────────────┐
│ AI CODING CLIENTS (Cursor / Claude Code / Antigravity / VS Code) │
└───────────────────────────────────────────┬────────────────────────────────────────────┘
│
7 MCP Tools (stdio / HTTP)
├── add_memory (persist decisions & rationale)
├── add_fact (versioned immutable truths)
├── memory_search (targeted semantic recall)
├── get_context (compiled multi-layer prompt)
├── get_blast_radius (graph dependency traversal)
├── delete_memory (evict obsolete episodic memories)
└── revoke_fact (prune conflicting/invalid truths)
│
▼
┌────────────────────────────────────────────────────────────────────────────────────────┐
│ FRIDAY COGNITIVE ENGINE │
│ │
│ Layer 1: Facts Ledger Layer 2: Episodic Memory Layer 3: Graph Topology │
│ ┌─────────────────────────┐ ┌───────────────────────────┐ ┌──────────────────────┐ │
│ │ Versioned Facts Ledger │ │ Mem0 Conversational │ │ Neo4j Property Graph │ │
│ │ • Deterministic truths │ │ • Semantic decisions │ │ • Directed call-trees│ │
│ │ • Conflict detection │ │ • User preferences │ │ • Schema blast-radius│ │
│ │ • Zero prompt overhead │ │ • Sub-100ms retrieval │ │ • Entity dependencies│ │
│ └─────────────────────────┘ └───────────────────────────┘ └──────────────────────┘ │
│ │
│ Layer 4: Cognitive Dynamics Engine │
│ • Synaptic Energy Decay: E(t) = E₀ · 2^(-Δt / 14d) automatically evicts stale clutter│
│ • Nightly Dream Cycle (03:00 UTC): Prunes noise, crystallizes graph insights & backups│
│ • Empathy State Tracking: Adapts agent brevity and tone to developer urgency & mood │
│ • Neural Studio: WebGL-based 3D graph visualizer for human and agent state auditing. │
│ • Persona Synchronization: /export/persona compiles canonical rules on-demand. │
└────────────────────────────────────────────────────────────────────────────────────────┘
A foundational architectural decision in Friday is:
"Why does Friday maintain a background worker LLM (such as Groq, DeepSeek, or local Ollama) on the server, completely separate from the frontier model running in Cursor, Claude Code, or Antigravity?"
Interactive coding agents require low latency, while knowledge graph maintenance requires continuous data extraction and synthesis. Friday enforces a Dual-Engine Architecture that cleanly decouples frontline developer workflows from background data pipelines:
┌────────────────────────────────────────────────────────────────────────────────────────┐
│ THE DUAL-ENGINE ARCHITECTURE MODEL │
├────────────────────────────────────────────────────────────────────────────────────────┤
│ │
│ INTERACTIVE AGENT (Frontline Client) BACKGROUND WORKER (Async Engine) │
│ ┌─────────────────────────────────────┐ ┌─────────────────────────────────────┐ │
│ │ Client: Cursor / Claude / Antigravity│ │ Engine: Self-Hosted Friday Server │ │
│ │ Model: Frontier (Claude 3.5 / GPT-4o)│ │ Model: Fast Worker (Groq / Ollama) │ │
│ │ Role: Complex code generation │ │ Role: Async graph extraction │ │
│ │ Context: Lean, task-specific prompt │ │ Role: Conflict pruning & decay │ │
│ │ State: Ephemeral session lifetime │ │ State: 24/7 background persistent │ │
│ └──────────────────┬──────────────────┘ └──────────────────▲──────────────────┘ │
│ │ │ │
│ │ 1. MCP Tools (memory_search, add_memory) │ 2. Microsecond │
│ ▼ │ Async Parsing │
│ ┌──────────────────────────────────────────────────────────────┴──────────────────┐ │
│ │ FRIDAY PERSISTENT MEMORY ARCHITECTURE │ │
│ │ │ │
│ │ Layer 1: Facts Ledger (Deterministic S3-style Hash Table) │ │
│ │ Layer 2: Episodic Memory (Mem0 Conversational Thread History) │ │
│ │ Layer 3: Vector Embeddings (ChromaDB Semantic Chunks) │ │
│ │ Layer 4: Property Knowledge Graph (Neo4j Directed Topology) │ │
│ │ Memory Lifecycle: Dynamic Decay (E(t)) & Nightly Dream Cycle (03:00 UTC) │ │
│ └─────────────────────────────────────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────────────────────────────────┘
When you type in Cursor or Claude Code and an agent records a major decision via add_memory, the Conscious model cannot pause for 4–6 seconds while an LLM parses semantic entities, identifies foreign keys, and runs Cypher mutations.
Frontier reasoning models (Claude 3.5 Sonnet, GPT-4o) cost $3.00 to $15.00 per million tokens. Using these expensive models for routine structural maintenance—such as extracting triples (Entity A $\longrightarrow$ RELATION $\longrightarrow$ Entity B), verifying fact hashes, or applying synaptic decay—wastes massive token budgets.
Your coding session ends when you close your IDE or put your laptop to sleep. But memory evolution cannot stop when the laptop closes:
Dumping a monolithic 500-node graph or 100 historical decisions directly into your editor's prompt causes Instruction Dilution: the LLM becomes confused, forgets recent constraints, and hallucinates outdated patterns.
Friday implements active memory lifecycle management to ensure AI agents retain critical constraints without context bloat or stale instruction interference:
┌────────────────────────────────────────────────────────────────────────────────────────┐
│ FRIDAY MEMORY LIFECYCLE ENGINE │
├────────────────────────────────────────────────────────────────────────────────────────┤
│ │
│ 🔥 Dynamic Memory Heat & Decay 🌙 The Dream Cycle (Nightly 03:00 UTC) │
│ ┌───────────────────────────────────┐ ┌────────────────────────────────────────┐ │
│ │ Exponential Synaptic Decay │ │ 1. Synaptic Pruning (Evaporates noise) │ │
│ │ • E(t) = E₀ · 2^(-Δt / T_half) │───>│ 2. Episodic Synthesis (Distills gems) │ │
│ │ • Recall Potentiation (+0.25) │ │ 3. Neo4j Crystallization (Graph edges) │ │
│ │ • Soft Archive if E < 0.25 │ │ 4. Autonomous Backup to Git │ │
│ └───────────────────────────────────┘ └────────────────────────────────────────┘ │
│ │
│ 🤍 Adaptive Context & Persona Calibration │
│ ┌──────────────────────────────────────────────────────────────────────────────────┐ │
│ │ Multi-Dimensional Response Calibration │ │
│ │ • Interaction Modes: tactical_sprint | deep_architecture | casual_brainstorm │ │
│ │ • Task Context & Urgency Detection (0.0 to 1.0) │ │
│ │ • Dynamic Response Calibration: Brevity (high/med/low) & Tone Tuning │ │
│ └──────────────────────────────────────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────────────────────────────────┘
Memories and verified facts are not static text—they have energy. Active, frequently recalled directives remain bright ($E > 1.0$). Irrelevant or outdated details experience exponential half-life decay ($T_{half} = 14\text{ days}$):
$$E(t) = E_0 \times 2^{-\frac{\Delta t}{T_{half}}}$$
When a memory is queried during coding, it receives a recall potentiation boost ($+0.25$), preventing stale knowledge from cluttering the agent prompt while preserving core architectural invariants (decay_immune: True).
Every night at 03:00 UTC (or on-demand via client.run_dream_cycle()), Friday enters the Dream Cycle:
CRYSTALLIZED_INTO edges.Friday monitors the developer interaction context (urgent bug-fix sprint, late-night architecture exploration, or casual brainstorming). The engine dynamically adjusts agent response characteristics:
high (zero fluff, code-first) vs. detailed (system-wide breakdown).technical_concise (code-first, direct) vs. architectural_detailed (system-wide breakdown)./export/persona so all agents naturally calibrate their output.We evaluated five realistic engineering scenarios using the DeepEval evaluation framework:
python benchmarks/benchmark_deepeval.py
Run the self-contained installation script:
curl -fsSL https://raw.githubusercontent.com/friday-memory/friday/main/install.sh | bash
The script verifies Docker availability, allocates required ports (8000, 7474, 7687), generates secure random API secrets, writes a validated .env, and launches Friday via Docker Compose.
Clone the Repository:
git clone https://github.com/friday-memory/friday.git
cd friday
Configure Environment (.env):
cp .env.example .env
# Master API key for endpoint security
BRAIN_API_KEY=choose_a_strong_secret_key
# Fast Subconscious LLM provider (Groq or DeepSeek)
DEEPSEEK_API_KEY=your_key_here
DEEPSEEK_BASE_URL=https://api.deepseek.com
DEEPSEEK_MODEL=deepseek-chat
# Mem0 key for vector memory (optional)
MEM0_API_KEY=your_mem0_key_here
# Neo4j database credentials
NEO4J_URI=bolt://neo4j:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=choose_a_strong_password
Start the Stack:
make up
# or: docker compose up -d
Verify Health:
curl http://localhost:8000/health
{
"status": "healthy",
"service": "friday-cognitive-substrate",
"version": "1.4.4",
"layers": {
"L1_core": "healthy",
"L2_mem0": "healthy",
"L3_chromadb": "healthy",
"L4_neo4j": "healthy"
}
}
friday-memory)The official Python client for Friday is available on PyPI as friday-memory. Connect your agentic workflows, LangChain pipelines, or autonomous scripts directly to Friday with zero boilerplate:
pip install --upgrade friday-memory
from friday import Friday
# Automatically resolves FRIDAY_URL and FRIDAY_API_KEY from environment
with Friday(api_key="your_secret_key", base_url="http://localhost:8000") as client:
# 1. Health check
status = client.health()
print("Friday Status:", status["status"])
# 2. Store architectural decision
client.add_memory(
"PostgreSQL 16 selected with pgvector for hybrid retrieval",
project="backend-api",
)
# 3. Commit scoped ground-truth fact with auto-conflict resolution
client.add_fact("Production database endpoint is db.internal.net:5432", project="backend-api")
# 4. Query multi-hop dependency blast radius before refactoring
blast = client.get_blast_radius(entity="OrdersTable", depth=2, project="backend-api")
print(
f"Impacted components ({blast['total_impacted']}):",
[n["name"] for n in blast["impacted_nodes"]],
)
# 5. Multi-layer search (L2 Facts + L3 ChromaDB + L4 Knowledge Graph)
context = client.search("database connection configuration", project="backend-api")
print(context["results"])
# 5. Cognitive State & Dynamic Response Calibration
state = client.get_cognitive_state()
print("Active Mode:", state["current_mode"]) # tactical_sprint, deep_architecture, etc.
# 6. Trigger Nightly Dream Cycle Consolidation (Consolidates & Prunes)
dream_report = client.run_dream_cycle(half_life_days=14.0)
print("Crystallized Insights:", dream_report["crystallized_insights"])
# 7. Apply Synaptic Decay
decay_report = client.apply_decay(half_life_days=14.0)
print("Active Facts Remaining:", decay_report["active_facts_count"])
import asyncio
from friday import AsyncFriday
async def main():
async with AsyncFriday(api_key="your_secret_key") as client:
# Commit context concurrently
await client.add_memory("Redis cluster deployed for token bucket rate limiting")
facts = await client.get_facts(min_energy=0.5)
print(f"Verified high-energy facts: {len(facts)}")
asyncio.run(main())
FridayRetriever)pip install "friday-memory[langchain]"
from friday.integrations.langchain import FridayRetriever
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.runnables import RunnablePassthrough
from langchain_openai import ChatOpenAI
retriever = FridayRetriever(
api_key="your_secret_key",
base_url="http://localhost:8000",
project="reeldm",
)
# Connect directly to LCEL chains
prompt = ChatPromptTemplate.from_template(
"Answer using verified system memory:\n{context}\n\nQuestion: {question}"
)
chain = {"context": retriever, "question": RunnablePassthrough()} | prompt | ChatOpenAI()
Friday provides an official Model Context Protocol (MCP) server over stdio or HTTP, enabling real-time context retrieval for all supported IDEs.
┌───────────────────────┐
│ Cursor (Desktop) │──┐
└───────────────────────┘ │
┌───────────────────────┐ │
│ Claude Code CLI │──┼── MCP Protocol (stdio transport)
└───────────────────────┘ │ FRIDAY_URL="http://127.0.0.1:8000"
┌───────────────────────┐ │ BRAIN_API_KEY="your_secret_key"
│ Antigravity IDE │──┤
└───────────────────────┘ │
┌───────────────────────┐ │
│ Windsurf / VS Code │──┤
└───────────────────────┘ │
┌───────────────────────┐ │
│ Codex CLI │──┘
└───────────────────────┘
▼
┌──────────────────────────────┐
│ FRIDAY CENTRAL BRAIN │
│ (Localhost or Remote VM) │
│ FastAPI + Mem0 + Neo4j │
└──────────────────────────────┘
Add to .cursor/mcp.json in your project or globally in Cursor Settings → MCP:
Local Docker Setup:
{
"mcpServers": {
"friday": {
"command": "python",
"args": ["-m", "mcp.server"],
"cwd": "/path/to/friday",
"env": {
"FRIDAY_URL": "http://localhost:8000",
"BRAIN_API_KEY": "your_secret_key"
}
}
}
}
Remote Cloud VM Setup (via SSH Tunnel):
{
"mcpServers": {
"friday": {
"command": "ssh",
"args": [
"-i", "/path/to/ssh_key.pem",
"-o", "StrictHostKeyChecking=no",
"ubuntu@YOUR_SERVER_IP",
"docker exec -i fridays-brain-app python /app/mcp_server/server.py"
]
}
}
}
Register Friday directly via CLI:
claude mcp add friday \
-e FRIDAY_URL="http://localhost:8000" \
-e BRAIN_API_KEY="your_secret_key" \
-- python -m mcp.server
Add to ~/.gemini/config/mcp_config.json:
{
"mcpServers": {
"friday": {
"command": "python",
"args": ["-m", "mcp.server"],
"cwd": "/path/to/friday",
"env": {
"FRIDAY_URL": "http://localhost:8000",
"BRAIN_API_KEY": "your_secret_key"
}
}
}
}
Add to ~/.codex/config.toml:
[mcp.servers.friday]
command = "python"
args = ["-m", "mcp.server"]
cwd = "/path/to/friday"
[mcp.servers.friday.env]
FRIDAY_URL = "http://localhost:8000"
BRAIN_API_KEY = "your_secret_key"
Add to your VS Code MCP configuration:
{
"cline.mcpServers": {
"friday": {
"command": "python",
"args": ["-m", "mcp.server"],
"cwd": "/path/to/friday",
"env": {
"FRIDAY_URL": "http://localhost:8000",
"BRAIN_API_KEY": "your_secret_key"
}
}
}
}
Connected agents automatically access four core MCP primitives:
/export/persona)Friday can compile stored facts and architectural constraints into synchronized markdown directives on-demand, preventing rules drift across teams:
# Export canonical AGENTS.md
curl -s "http://localhost:8000/export/persona?target=agents" \
-H "X-Brain-Key: your_key" > AGENTS.md
# Export Cursor .cursorrules
curl -s "http://localhost:8000/export/persona?target=cursor" \
-H "X-Brain-Key: your_key" > .cursorrules
Different AI coding assistants rely on different workspace instruction formats. Friday includes a built-in CLI engine that generates standardized, bidirectional memory directives for any editor or autonomous agent runner:
friday rules list
Generate an optimized rule file for a specific agent:
friday rules generate --target claude
friday rules generate --target cursor
friday rules generate --target gemini
Or generate standardized rule files for all supported tools at once:
friday rules generate --all
For proprietary agents, internal corporate tooling, or newly released frameworks, register and output custom adapted rule files:
friday rules custom \
--key myagent \
--name "Internal SRE Agent" \
--file ".myagent/rules.md"
Each generated rule file enforces the Two-Way Zero-Amnesia Protocol:
friday:get_context and friday:memory_search before formulating implementation plans.friday:add_fact and friday:add_memory.Every memory written via add_memory is analyzed asynchronously by the Subconscious worker. Entities and typed relations are automatically wired into Neo4j without manual schema definitions:
Input:
"Billing engine connects to Stripe API for recurring charges. Webhook dispatched to /api/webhooks/stripe."
Extracted Graph Nodes & Edges:
(:Service {name: "BillingEngine"}) -[:CONNECTS_TO]-> (:API {name: "Stripe"})
(:API {name: "Stripe"}) -[:DISPATCHES_TO]-> (:Endpoint {path: "/api/webhooks/stripe"})
A browser-based 3D WebGL visualizer powered by Three.js for real-time knowledge graph exploration and system telemetry:
Hot ≥ 0.7) and aging/deprecated context (Decayed < 0.4).+0.25), trace bidirectional relationship chains, and smoothly focus the 3D camera on target nodes.Deterministic project constants are recorded with immutable version history and project isolation (reeldm, friday, global). Conflicting keys (Key: Value) automatically supersede older versions within the same project namespace:
# Add initial constraint (project-scoped)
POST /facts -> {"content": "Payment Gateway: Stripe", "project": "billing"}
# Recorded: id="c41b8a9", superseded=false
# Update constraint — automatically detects conflicting key 'Payment Gateway'
POST /facts -> {"content": "Payment Gateway: DodoPayments", "project": "billing"}
# Prior fact marked superseded=true; active fact updated without hallucination.
Before modifying database schemas, refactoring shared middleware, or removing endpoints, agents query get_blast_radius to compute downstream transitive impacts up to 4 hops away across Layer 4:
# Query blast radius for a service or entity
GET /graph/blast-radius?entity=UserSession&depth=2&project=backend-api
# Returns: directly impacted services, traversal distance, and edge relationship types.
friday/
├── friday/ # Official Python SDK & CLI (client, rules engine, types)
├── gateway/ # FastAPI REST application & routing (Neo4j + ChromaDB + Mem0)
├── layers/ # Pluggable cognitive adapters (ChromaDB, Neo4j, Decay)
├── pipelines/ # Background entity extraction, Dream Cycle & fact pipelines
├── orchestrator/ # Multi-layer retrieval router & cognitive state engine
├── mcp/ # Model Context Protocol stdio server
├── studio/ # Three.js Neural Studio 3D visualizer
├── benchmarks/ # DeepEval evaluation suite
├── tests/ # Pytest test suite (100% green)
├── docker-compose.yml # Production container definition
├── Makefile # Developer task automation
└── pyproject.toml # Tooling & packaging configuration
All authenticated endpoints require the X-Brain-Key request header.
# Install dependencies
make install
# Run test suite
make test
# Code formatting & linting
make lint
make format
# Start local dev server
make dev
Friday supports an opt-in serverless execution model backed by remote libSQL (Turso) or local SQLite transactions, ideal for ephemeral environments like Google Cloud Run.
gateway.serverless:create_app exposes all core memory, fact, graph, and blueprint endpoints with project-scoped isolation and authenticated reads.Note: Serverless storage is completely opt-in and does not alter the default Docker Compose deployment or client routing.
Review CONTRIBUTING.md for pull request guidelines, commit conventions, and architectural standards.
Friday is licensed under the MIT License.
The open-source persistent cognitive memory layer for AI coding agents. Stop your Cursor, Claude & Copilot from having amnesia.
เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
Friday ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-10-28 The open-source persistent cognitive memory layer for AI coding agents. Stop your Cursor, Claude & Copilot from having amnesia.