An agent can reduce repeated mistakes through a small recoverable loop before anyone builds a knowledge graph or promises permanent evolution. This guide uses a fictional community-film research assistant that treated an old venue capacity as current and produced an inaccurate draft. Reflection, durable memory, and reusable procedures address different parts of that failure. The workflow changes behavior through evidence and instructions; it does not train model weights or report an experiment already performed.
Define the goal through one concrete failure
The expected behavior is explicit: when a draft mentions venue capacity, consult a current approved source and effective date; flag conflicts instead of selecting the larger number. Retain the draft, source versions, failing step, and impact. “Become smarter” is not acceptance. Nor is every failure a memory defect: retrieval, outdated sources, parsing, and decision criteria can each be responsible.
We searched GitHub for open-source implementations and considered LangMem's information extraction, persistent memory, and prompt-refinement approach. Components still require storage, model services, configuration, and evaluation. A small pilot can start with versioned local records and prove reading, writing, and recall before adopting frameworks, graphs, or synchronization. Check maintenance, license, dependencies, and data destinations before adoption. No components were installed or run for this article.
Scenario one: reflect against observed evidence
Use three columns: observation, explanation, and proposed improvement. The observation is that the draft used an old capacity without a date. The explanation might be retrieval of an old document or failure to index the new one. The proposed change is a version check during retrieval. Confirm the cause from queries and sources rather than letting the model fill a plausible story into an evidence gap.
Distinguish command failures, user corrections, missing functionality, API failures, and stale knowledge. Each has a different recovery path: a missing capability needs a tool or narrower scope; an API failure may leave an unknown result; stale knowledge needs a current source. A long reflection cannot replace these branches. Session-end and major-task reviews can reconcile records, but hooks need host verification and abnormal interruptions need a manual recovery path.
A useful request is: “Compare the draft, retrieval record, and two venue documents. Identify where old information became current. Keep uncertain causes unresolved. Propose one minimal change and validation samples without changing global rules.” Deliver a sourced review card rather than immediately turning self-evaluation into permanent memory.
Criticism should identify changeable behavior rather than consume records with repetitive self-blame. Successful cases can suggest patterns, but separate a reliable method from an accidental correct answer. Newly proposed requirements must still match the user's goal and authorization. A model's preferred workflow is not a newly discovered user instruction.
Scenario two: durable memory needs scope and verified recall
Record an identifier, project, source, time, applicability, cause status, proposed action, and review date. The lesson is not a fixed capacity number. It is a project-scoped instruction to check effective dates and report source conflicts. Separate changing environmental facts from reusable methods so an old memory cannot silently replace current evidence.
A local corrections file can be a starting point, but encoding, duplicates, concurrent writes, and backups still matter. Do not put names, contact information, private contracts, or credentials into global lessons. Keep necessary excerpts and evidence references with defined access, retention, and deletion. Model-based extraction may transmit conversations externally; storing the final file locally does not prove an offline pipeline.
Before a task, retrieve a small relevant set by project and goal, exposing source and version. Verify reading in a new session rather than checking only file existence. Test whether a new activity in this project checks dates, an unrelated project avoids inappropriate rules, and an obsolete source triggers rechecking rather than confident reuse. Saving, retrieval, and application are separate successes.
Long-term does not mean permanently correct. New corrections or source changes may retire a record, leaving supersession and audit references. Ordinary memory can also be structured and searchable. The distinguishing emphasis here is verified feedback into later behavior, not a claim that every other memory system is merely an unhelpful transcript.
Scenario three: turn reliable experience into a candidate skill
Describe the method's inputs, version checks, conflict output, inaccessible-source handling, and acceptance evidence. A skill needs triggers and exceptions, with reference material read as needed rather than a private conversation pasted into the package. A successful complex task can inform a draft; one success does not establish cross-project reuse.
For the film assistant, inputs are approved venue records and activity requirements. Outputs are a source matrix, conflict list, and bounded draft. The method must not also book the venue, alter capacity records, or publish the announcement. Include ordinary, stale, conflicting, undated, and inaccessible sources as fixtures. Prove the smallest loop before adding automatic activation.
Compare the old workflow and candidate under the same task and model settings, retaining held-out cases not used during tuning. Check current evidence, honest uncertainty, and authorized action boundaries first; report cost and time separately. Self-grading can assist but needs observable assertions or independent review. A winner is not simply the most fluent answer: error types and scope matter.
Locking in a behavior should mean accepting a versioned, reversible candidate, not permanently rewriting all instructions. Keep the existing process if the proposal does not improve outcomes, and retire it if it harms other tasks. Knowledge graphs and cross-session synchronization are optional enhancements that need namespaces, access, deletion propagation, and conflict policies. More infrastructure is not automatically more progress.
Check Skill discovery and installation prerequisites
Inspect the host's discovery mechanism, supported triggers, file scope, and network capabilities. The current SkillPI self-improving search has no matching record, so this guide does not turn similar names or version labels from the source into invented verified listings. The Chinese and English sources recommend different specific packages; names from one language cannot establish an installation guarantee in the other.
For new candidates, verify public detail, pinned source, license, dependencies, writing locations, and actual purpose individually. Reflection does not automatically grant synchronization, training, or execution capability. Open-source references support learning; installation, running code, account connections, and publication still follow host rules and user authorization. Install counts are not quality evidence, and package price is separate from model, storage, and maintenance costs.
FAQ and failure diagnosis
Why does the mistake return after a correction? Inspect capture, causal analysis, pre-task recall, rule conflict, and output validation in order. Do not simply add more files. Is heavy infrastructure necessary? Prove one correction in one project against a small case set before increasing storage complexity.
Can the same mistake be eliminated forever? No guarantee follows from this workflow: model behavior, context, and environments change. Keep regression coverage. Can the agent author skills? It can draft them, but inputs, outputs, scope, and failure handling need review. What do installation counts establish? Only a traceable, time-bounded channel usage signal, not reliability of the current version.
Acceptance includes the review card, redacted memory, recall evidence, candidate diff, comparison results, and rollback instructions. Mark executed checks separately from plans and retain original drafts and sources so a future session cannot mistake an intention for completion. One measured behavior change is more informative than many unread lessons.
Sources and maintenance
This original example covers the bilingual sources' reflection, memory, and evolution scenarios, including five trigger classes and deriving procedures from successful tasks. It does not reuse testimonials, installation figures, or permanent-improvement guarantees. The LangMem repository informs the reusable-method option. Refresh associations as verified records appear, checking the exact step and pinned provenance, and retest existing rules with new counterexamples.