Skip to content

docs: add persistent memory guide#641

Open
hieptl wants to merge 3 commits into
mainfrom
hieptl/oss-622
Open

docs: add persistent memory guide#641
hieptl wants to merge 3 commits into
mainfrom
hieptl/oss-622

Conversation

@hieptl

@hieptl hieptl commented Jul 21, 2026

Copy link
Copy Markdown
Contributor
  • I have read and reviewed the documentation changes to the best of my ability.
  • If the change is significant, I have run the documentation site locally and confirmed it renders as expected.

Summary of changes
Companion docs for OpenHands/software-agent-sdk#4178 (SDK issue #2037), which adds opt-in persistent memory to the SDK. Review on that PR asked for an example and docs: the example ships there (examples/01_standalone_sdk/55_persistent_memory.py); this PR adds the documentation.

  • New guide: sdk/guides/persistent-memory.mdx — covers enabling the feature (AgentContext(load_memory=True), opt-in and off by default); the two memory tiers (user ~/.openhands/memory/, project <workspace>/.openhands/memory/); the file model (MEMORY.md curated index injected at session start vs. daily logs read on demand); what gets injected (the <MEMORY_CONTEXT> block, <UNTRUSTED_CONTENT> wrapping, ~6,000-character truncate-from-top budget, user tier before project tier); operational properties (re-resolved each session, excluded from base_state.json and API payloads, best-effort loading); and the maintenance habits the system prompt teaches the agent. Ends with the standard Ready-to-run Example section (<RunExampleCode> + GitHub link) embedding examples/01_standalone_sdk/55_persistent_memory.py.
  • Navigation: registers sdk/guides/persistent-memory in docs.json under SDK → Guides, right after Context Condenser.

Verification

  • The embedded example block is byte-in-sync with the SDK file per this repo's own sync logic (.github/scripts/sync_code_blocks.py extract_code_blocks + normalize_content comparison).
  • docs.json re-parses as valid JSON after the nav edit.
  • All internal links point at existing pages (/sdk/guides/skill, /sdk/guides/context-condenser, /sdk/guides/convo-persistence, shared snippet /sdk/shared-snippets/how-to-run-example.mdx), and the #ready-to-run-example anchor matches its heading.

Notes

  • Merge after feat: add opt-in persistent memory across sessions software-agent-sdk#4178: the GitHub link targets the example on main, and the sync-docs-code-blocks workflow reads example content from the SDK repo's main. Until then the sync workflow logs a missing-source warning for this block and skips it (not a CI failure), and the PR-level check-broken-links job only checks internal links, so CI on this PR is unaffected.
  • llms.txt/llms-full.txt are intentionally untouched: regenerating now bundles unrelated drift from previously merged pages (e.g. the Fork-a-Conversation guide), and the scheduled check-llms-files.yml workflow owns that sync.

@mintlify

mintlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
all-hands-ai 🟢 Ready View Preview Jul 21, 2026, 5:24 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

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.

1 participant