Skip to content

docs: clarify memory lifecycle across flows#267

Open
mason5052 wants to merge 1 commit intovxcontrol:mainfrom
mason5052:codex/issue-74-memory-lifecycle-docs
Open

docs: clarify memory lifecycle across flows#267
mason5052 wants to merge 1 commit intovxcontrol:mainfrom
mason5052:codex/issue-74-memory-lifecycle-docs

Conversation

@mason5052
Copy link
Copy Markdown
Contributor

Summary

  • document how PentAGI memory behaves across flows
  • clarify the difference between flow-scoped execution memory and reusable vector documents
  • add practical guidance for storing reusable target knowledge between engagements

Problem

Issue #74 asks whether PentAGI should keep memory after flows are removed and how users should preserve target knowledge between runs. The current repository already has the underlying concepts (memory, guide, answer, code, Graphiti, and flow_id filters), but the docs do not explain how they fit together operationally.

Solution

  • add a new "Memory Lifecycle Across Flows" section to the README near the embedding and etester documentation
  • explain when to inspect vector documents with flow_id and when to store durable knowledge explicitly as guide, answer, or code
  • extend backend/docs/flow_execution.md with lifecycle guidance that distinguishes flow-scoped execution history from reusable knowledge and references the current prompt-template behavior

User Impact

Users now have a clearer path for deciding what should stay attached to a single engagement and what should be stored intentionally for future flows. This makes it easier to preserve reusable target notes without assuming that raw execution history alone will provide the right cross-run context.

Test Plan

  • verify the new README guidance matches the current etester search options and embedding docs
  • verify the lifecycle notes match the documented vector store types and prompt-template memory model
  • run git diff --check

Closes #74

Signed-off-by: Mason Kim(ZINUS US_SALES) <mkim@zinus.com>
Copilot AI review requested due to automatic review settings April 15, 2026 23:35
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation clarifying how PentAGI’s memory/knowledge storage behaves across flows, and how to persist reusable context between engagements (issue #74).

Changes:

  • Add “Memory Lifecycle Across Flows” guidance to the README near the etester embedding/search documentation.
  • Extend backend/docs/flow_execution.md with lifecycle guidance distinguishing flow-scoped execution history (memory) from reusable knowledge (guide/answer/code).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
backend/docs/flow_execution.md Adds lifecycle guidance on when to rely on flow-scoped memory vs storing durable guide/answer/code.
README.md Adds a new section explaining practical workflows for inspecting per-flow history and persisting reusable target knowledge.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Treat `memory` as flow-scoped execution history. It is most useful for understanding what happened in a specific engagement and is commonly inspected with a `flow_id` filter.
- Treat `guide`, `answer`, and `code` as reusable knowledge. These document types exist to preserve durable procedures, reusable target notes, Q&A material, and code snippets across future runs.
- If you want a later flow to begin with known context, store the confirmed result intentionally through `store_guide`, `store_answer`, or `store_code` instead of assuming execution history alone will provide the right reusable context.
- Current prompt templates already distinguish these roles: reusable guides/code live in vector documents, while Graphiti is intended for episodic memory about what actually happened during execution.
Comment thread README.md

For example, if a target has recurring setup notes, authentication quirks, or target-specific testing methodology, instruct the agent to save that information as a `guide` and search for it at the beginning of the next engagement. This is the safest current workflow when you want a new flow to start with reusable context.

Flow deletion removes the flow from normal queries through PentAGI's soft-delete mechanism, so reusable knowledge should be treated as a separate concern from per-flow execution history. If you need broader episodic context across operations, enable the optional Graphiti knowledge graph described earlier in this README.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Memory storage question

3 participants