Remembers why you approved, edited or rejected your agent's drafts; recalls the closest corrections
Runs on your machine from its package; the steps are below.

Not assessed yet.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Distributed as an MCP bundle (`https://github.com/ssap-pa/self-learning-agent-setup/releases/download/v0.2.1/feedback-memory.mcpb`) — download it and import the bundle in your MCP client.
A small, practical pattern for making an AI agent remember your business and learn from every correction you give it. No framework required: a folder of brand files, your existing database, and a feedback table.
I run a one-person education business in Korea this way. Agents (Claude Code, Codex) draft posts and replies. I approve, edit or reject them from my phone. Every decision goes into a database, and the next draft reads that history before it writes a word.
This repo has the minimal schema and the prompts. The full walkthrough is a free 23-page field guide (link at the bottom).
What happened when this agent ran a business for 72 hours with one goal, in numbers: the postmortem on DEV. Short version: product was never the problem.
In your browser, no install: https://ssap-pa.github.io/self-learning-agent-setup/ (Postgres + pgvector via PGlite and the all-MiniLM-L6-v2 embedding model via Transformers.js, all running in the tab, no API key).

Locally:
git clone https://github.com/ssap-pa/self-learning-agent-setup
cd self-learning-agent-setup/demo
npm install
npm run demo
It starts an in-memory Postgres (PGlite + pgvector), feeds in three days of feedback for a made-up candle shop (one edit, one reject, one plain approval), then prints what the agent would read before its next drafts. No database or API key needed. npm test runs the tests the same way.
Day 3 new comment: "How long does shipping to Canada take for the lavender set?"
before drafting, the agent reads:
Feedback on similar past tasks (most similar first):
- task: "Do you ship to Canada? Love the lavender candle" -> edited to: "We do! Canada usually takes 5-7 days." (why: don't promise speed, give the real shipping time)
Day 3 new comment: "Could you gift wrap a candle for a birthday?"
before drafting, the agent reads:
Feedback on similar past tasks (most similar first):
- task: "Can you gift wrap the vanilla set for my mom?" -> rejected (why: we don't gift wrap, offer the gift note instead)
Day 3 new comment: "What wax do you use?"
before drafting, the agent reads:
(nothing yet: no feedback on anything similar)
The demo embeds text by hashing words, so "similar" here means shared words. Run EMBED=openai OPENAI_API_KEY=... npm run demo to use real embeddings, or point Loop at your own Postgres / Supabase with pg.
feedback-memory is a small MCP server built on the same loop. Your agent calls recall_corrections before it drafts and record_decision after you approve, edit or reject. Everything lives in a local Postgres (PGlite + pgvector) in ~/.feedback-memory, so there's nothing to host.
Claude Code, as a plugin (the easiest way). Your standing rules load when a session starts (and again after /clear or compaction), and the closest past corrections are added to each prompt by a hook, so they apply even when Claude doesn't call a tool:
/plugin marketplace add https://github.com/ssap-pa/self-learning-agent-setup.git
/plugin install feedback-memory@ssap-pa
(The short form /plugin marketplace add ssap-pa/self-learning-agent-setup works too if you have an SSH key set up for GitHub.)
In a real run with the plugin, Claude made no tool calls and still answered a new "how long does shipping to Canada take?" comment with "Thanks for asking. Shipping to Canada usually takes 5-7 business days for the lavender set.": the shipping time from a past edit (reason: don't promise speed) and no exclamation marks, from a stored rule.

Claude Code, MCP server only:
claude mcp add feedback-memory -- npx -y github:ssap-pa/self-learning-agent-setup
Claude Desktop, one click: download feedback-memory.mcpb and open it. The OpenAI key field is optional.
Cursor, or Claude Desktop by hand (under mcpServers in the config JSON):
"feedback-memory": { "command": "npx", "args": ["-y", "github:ssap-pa/self-learning-agent-setup"] }
Then tell the agent when to use it, e.g. two lines in CLAUDE.md / AGENTS.md:
Before drafting anything I'll review, call recall_corrections with the task and follow what comes back.
When I approve, edit or reject your draft, call record_decision with my reason.

Tools: recall_corrections, record_decision, add_rule (standing rules that always come back first), list_memory, forget. Set OPENAI_API_KEY in the server's env to match by meaning (text-embedding-3-small); without it, words are hashed offline (with light stemming, so "shipping" matches "ship") and only shared words match. One database folder per running client (set FEEDBACK_MEMORY_DIR if you run several), so install it one way, not as both the plugin and a separate MCP server. npm test runs an end-to-end test over stdio, and npm run bundle builds the Claude Desktop bundle.
If it helps, a star on the repo helps other people find it, and an issue about what didn't work helps me fix it.
Anyone can pay for the same model you use. What nobody else can buy is:
Most people give feedback in chat and lose it. The next session starts from zero, and you fix "stunning blooms" for the tenth time.

| Type | Example | Where it lives |
|---|---|---|
| Constants | Brand, voice, customer, founder story | Markdown files in a brand/ folder |
| Variables | Price, stock, seats, schedule | Your site's database, read live |
| Large knowledge | Lessons, ebooks, FAQs | Same database, embedded for search (RAG) |
Rules that matter:
AGENTS.md can be skipped. Programs that run on their own should call the database and search directly.
Plus two details that made it actually work for me:
And the human part: a Telegram bot sends each draft to my phone with Approve / Reject / Edit buttons, and the taps land in the learning database (not just the bot's log). Check that they actually do. Mine silently wasn't storing approvals at first.
schema.sql: Postgres / Supabase tables (runs, feedback with situation and reason embeddings, rules) and match_feedback() for similarity search, with pgvectordemo/loop.ts: the core loop in about 100 lines of TypeScript: store each decision, pull feedback from similar past tasks into the next prompt. Works with pg or PGlitedemo/demo.ts and demo/loop.test.ts: the one-minute demo and testsprompts.md: the prompts I use with Claude Code / Codex to build and check each layerText and diagrams (this README, prompts.md, img/) © 2026 AI SSAPABLE, shared under CC BY-NC 4.0. The MIT License in LICENSE covers the code: schema.sql, demo/, docs/, mcp/, hooks/, bundle/ and .claude-plugin/.