MemoryGraph Is Not an Automatic Dumping Ground
메뉴

AI Memory

MemoryGraph Is Not an Automatic Dumping Ground

A promotion pipeline for turning experience into reusable memory safely.

MemoryGraph Is Not an Automatic Dumping Ground hero image

It seems like attaching memory to the AI ​​agent will solve the problem. But with a development harness, you have to start the other way. MemoryGraph's core value lies not in what it stores, but in what it does not store.

In Part 1, we applied Ctx2Skill's context-to-skill structure from the perspective of the Repo Skill Memory of the development harness. In this article, we will cover how much of that memory should be stored in MemoryGraph.

The conclusion is conservative. MemoryGraph is not a raw trace store. It's not even a place to automatically push failure logs. Only compact rules that have passed replay or human approval should be included in MemoryGraph.

Key takeaways

  • MemoryGraph is not a source of truth but a recall acceleration layer.
  • The source of truth is code, test, CI, contract, and production behavior.
  • Leaving raw traces, imported evidence, and failure logs intact in long-term memory can contaminate subsequent executions.
  • Rules resulting from failure must first remain as memory candidates and be promoted after replay or human approval.
  • The memory fact must have coverage, exclusion scope, verification basis, and lifecycle metadata.

Where to put MemoryGraph

Separating the knowledge layers of the development harness clarifies roles.

hierarchyroleWhat you can saveDangerous to store
Source of truthActual Judgment CriteriaCode, testing, CI, contract, docsRules with inference summary only
Raw traceRunning Observationaction, observation, judge eventFailure log written directly into long-term memory
Candidatecandidate for promotionfailure attribution, scope, evidence refsan unfounded generalization
MemoryGraphreusable memoryProven compact ruleAll raw traces, imported-only evidence
Prompt contextCurrent execution hintSmall, highly relevant recallfull memory dump

MemoryGraph does not replace a source of truth. It is more like an index that helps agents quickly get to the right source of truth.

The most dangerous mistake: mistaking raw traces for memories

The raw trace has many useful clues. At the same time, there is a lot of noise.

  • Command failed due to environmental issues
  • One-time failure of flaky test
  • Search begins with incorrect assumptions
  • plan abandoned midway
  • Access denied by user
  • Incomplete log imported from external runtime

If we put this information into long-term memory, the agent will follow the wrong rule in the next execution.

bad memory:In this project, e2e tests fail frequently, so they are omitted from closeout. Good candidate:In a recent run, e2e failed due to missing browser binaries.failure_class is environment_blocker and is not subject to memory promotion for code changes.Before retrying, check browser dependency availability first.

Good candidates don't hide their failures. However, before elevating a failure to a general rule, it separates the cause from the scope of application.

Promotion Pipeline

MemoryGraph write is the final step. Before that, there must be a candidate and a gate.

It's best to keep the policy for this pipeline simple:

policyreason
No promotion without replay or human approvalReduces misjudgment of failure causes.
Block imported-only candidatesDon't mistake external traces for truth.
Do not write without explicit write flagSeparate analysis from long-term state changes.
Auto promotion only allows verified-onlyPrioritize memory reliability over convenience.
If there is no scope or anti-scope, it is withheld.It prevents applying the right rules to the wrong situation.

Minimal structure of memory candidate

The candidate must be a verifiable operational knowledge candidate, not just a single sentence.

{  "schema": "awtl.memory_candidate.v2",  "candidate_id": "memcand-demo-a",  "failure_class": "agent_failure",  "failure_type": "contract_mismatch",  "source_action_ids": ["action-12"],  "root_cause_summary": "Public response shape changed without updating contract evidence.",  "proposed_memory": "If the public response schema changes, the contract artifact and verifier evidence are updated together.",  "scope": {    "applies_to": ["public_api", "contract_change"],    "does_not_apply_to": ["internal_refactor", "test_only_change"]  },  "evidence_refs": ["judge:contract-verifier", "artifact:contract-output"],  "verification_probe_candidate": "public-contract-regression",  "promotion_status": "candidate",  "requires_human_review": true}

There are four things that should not be left out of this structure.

fieldProblems that arise when there is no
failure_classEnvironmental failure is mistaken for agent failure.
source_action_idsYou can't trace which actions led to the rules.
scopeThe rule applies too broadly.
evidence_refsWe cannot verify why this memory occurred.

Divide the failure class first

Not all failures are eligible for memory promotion.

failure classdefault processingexample
agent_failurecandidate availableYou modified the file incorrectly or missed a contract update.
verification_failureCandidate available with probeNew verifier catches real regression
environment_blockerblock promotionMissing network, permission, and browser binaries
flaky_blockerblock promotionOne-off test failure that cannot be reproduced
harness_blockerSeparated into harness modification targetsverifier own bug

Without this separation, memory becomes corrupted quickly. If you see a job failing due to a network failure and save a rule saying “you can skip this verification,” the next run will be more risky.

A fact lifecycle is needed

Even a memory that was once correct can become incorrect over time. Therefore, the MemoryGraph fact must have lifecycle metadata.

{  "origin": "awtl",  "origin_candidate_id": "memcand-demo-a",  "validated_by": "replay",  "valid_for": ["contract_change", "public_api"],  "not_valid_for": ["internal_refactor"],  "last_validated_at": "example-timestamp",  "verification_contract_version": "v1",  "status": "active"}

The operational state must have at least the following flow:

The memory put into the prompt should also be small.

Even if you only put verified facts into MemoryGraph, if you inject them all in every execution, they will become noise again. You should only write small recalls that are relevant to the current task.

Good recall looks like this.

Relevant project memory- When changing the public API request/response schema, contract artifact and verifier evidence are updated together.- Scope of application: public_api, contract_change- Exclusion range: internal_refactor, test_only_change- Verification: Run the contract verifier before closeout.

Bad recall means pasting the entire project memory as is. Agents may not be able to reliably determine importance and coverage on their own.

Practical Checklist

When designing a promotion policy, check the following items:

MemoryGraph promotion checklist [ ] Do not use MemoryGraph as a raw trace storage.[ ] Only read-only recall is performed before the start of the phase.[ ] projectMemoryContext contains only small and relevant content.[ ] Memory overlapping with rules, developer instructions, and hard rules is removed.[ ] Separate MemoryGraph query failure and workflow failure.[ ] MemoryGraph write is performed only when there is an explicit flag.[ ] Auto promotion only allows verified-only.[ ] Block candidates without replay evidence or human approval.[ ] Imported-only candidates are not promoted to long-term memory.[ ] Promotion decisions are left on the replay scorecard.[ ] Design fact lifecycle and stale detection.

finish

Designing the MemoryGraph to be a “place to store a lot” can make the agent more dangerous, not smarter. This is because AI tends to follow memory like a work rule rather than a simple reference.

So the principles must be conservative.

Read-only recall is widely permitted.Promotion is allowed narrowly.Write is allowed only when verified.

In the next part, we will cover AWTL, which is the raw material for this structure. Let's take a look at how we can turn the failure log into a hint for the next run and operate it with a failed turn case and replay scorecard.

Operational example: Criteria for rejecting memory candidates

MemoryGraph Promotion is not a game where you save a lot. For example, let's say one run logs "A specific command failed in Windows PowerShell." This should not be stored in memory as is. This may be a temporary environmental issue, or the path and username may be mixed up. Instead, change to compact rule only when it is repeated three or more times and the cause is confirmed to be a repo convention.

candidatepromotion decision
One-time stack traceStored only in ledger
Repeated verification command sequencecompact rule candidate
Logs containing user personal pathsNo promotion of original text
repo-specific closeout procedureMemory promotion after review

A failure case is to include the raw trace entirely because it is searchable. Next, the agent can use temporary instructions or error phrases in the trace as rules. MemoryGraph must have facts, conditions, reuse scope, and expiration criteria. That way, long-term memory improves the quality of your work and doesn't become a source of noise that keeps replaying old logs.

댓글

GitHub 계정으로 로그인하면 댓글을 남길 수 있습니다. 댓글은 GitHub Discussions를 통해 운영됩니다.

TOP