/agentdb:agentdb-reflexion-learningfrom agentdb
Stores reflexion episodes with self-critique, creates skills from successful patterns, records causal edges and RL feedback, and retrieves past failures before retrying. Use after task outcomes or when asked to learn from mistakes.
Ships in agentdb. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
reflexion_retrieve(task, k: 5, only_failures: true) and read the critiques. Then skill_search(task) for a procedure that already worked.reflexion_store(
session_id: "<this session>",
task: "upgrade the vitest config to v3",
reward: 0.3,
success: false,
critique: "Changed the config before checking the plugin list; two plugins dropped v3 support. Check plugin compatibility first.",
input: "...", output: "..."
)
reward is 0..1. The critique is the lesson: what to do differently, in one or two sentences.
skill_create(name: "safe-column-add", description: "Add a NOT NULL column without locking", code: "<steps or snippet>", success_rate: 0.95)
When one thing reliably changes another, record the edge: causal_add_edge(cause: "enable query cache", effect: "p95 latency", uplift: -0.4, confidence: 0.8). Query with causal_query(query).
After using a recalled pattern or skill, close the loop: agentdb_pattern_feedback or agentdb_skill_feedback with whether it worked (success, reward 0..1). Recall reranks on these outcomes, so an approach that keeps failing sinks. Check the tool's input schema for the id field it expects (from the search result).
After a batch of episodes, consolidate_now() promotes high-reward episodes into skills and prunes weak causal edges, instead of waiting for the scheduled run.
For an RL session the user started (learning_start_session), send each outcome with learning_feedback(session_id, state, action, reward, success) and check progress with learning_metrics(session_id).
input, output and critique; the plugin's guard refuses those writes.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
reflexion, learning-feedback, causal-edges, skill-creation, agentdb
npx claudepluginhub ruvnet/agentdb --plugin agentdb3 skills in this plugin
/agentdb-setup-diagnosticsSet up and diagnose the agentdb plugin and its MCP server — which profile and database are in use, whether the server is connected, what it holds, and why a tool is missing or refused. Use when AgentDB tools are missing, a call is refused, the user asks "is agentdb working", or wants to change the profile or database path./agentdb-vector-memoryStore and recall memory with AgentDB's own MCP server — semantic facts (agentdb_insert/agentdb_search), reasoning patterns (agentdb_pattern_store/agentdb_pattern_search) and certified recall. Use when the user says "remember this", "save this for later", "what do we know about X", or before starting a task that may have prior context.Other plugins' skills for the same job