Skip to content

Docs: Updating PythonSDK Server content for new API Endpoints (Semantic Memory)#1083

Merged
SarahScargall merged 4 commits into
MemMachine:mainfrom
SarahScargall:pythonsdk
Feb 27, 2026
Merged

Docs: Updating PythonSDK Server content for new API Endpoints (Semantic Memory)#1083
SarahScargall merged 4 commits into
MemMachine:mainfrom
SarahScargall:pythonsdk

Conversation

@SarahScargall

Copy link
Copy Markdown
Contributor

Purpose of the change

This PR performs a comprehensive technical update to the Python SDK Server documentation. It aligns the server-side .mdx files with the actual v2 backend architecture found in router.py, spec.py, and service.py. The primary goal is to resolve terminology discrepancies and document the internal resource management logic (Reference Counting/Caching) that was previously undocumented.

Description

This update transitions the server documentation from a high-level overview to a technical implementation guide:

  • Terminology Migration: Replaced all legacy "Profile Memory" references with "Semantic Memory" and the new Set/Category/Tag hierarchy.
  • Architecture Sync: Updated server.mdx and memory_types.mdx to reflect the FastAPI router structure and the shared Pydantic models in spec.py.
  • Lifecycle Documentation: Refactored episodic_memory_manager.mdx to accurately describe the Reference Counting and Instance Caching mechanisms used in the server core.
  • Model Realignment: Updated episodic_memory.mdx to reflect the server-side mapping of SDK producer fields to internal producer_id fields.

Fixes/Closes

Fixes #1047
Closes #975

Type of change

  • New feature (Documentation for Semantic Knowledge Graph hierarchy)
  • Refactor (Aligning server docs with existing internal class structures)
  • Documentation update

How Has This Been Tested?

  • Manual verification: Cross-referenced every documented class and method against memmachine/server/api_v2/router.py and memmachine/common/api/spec.py.
  • Manual verification: Verified internal cross-linking between the new semantic_memory.mdx and the server.mdx entry point via mint dev.

Test Results: All server-side Enums (MemoryType, EpisodeType) and Specs (AddSemanticTagSpec, etc.) now match the source code exactly.

Checklist

  • I have signed the commit(s) within this pull request
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • Confirmed all checks passed
  • Reviewed the code
  • Run, Tested, and Verified the change(s) work as expected

Screenshots/Gifs

Screenshot 1 - Updated Server Implementation Page (1 of 3):
Screenshot 2026-02-09 at 2 49 50 PM

Screenshot 2 - Updated Server Implementation Page (2 of 3):
Screenshot 2026-02-09 at 2 43 06 PM

Screenshot 3 - Updated Server Implementation Page (3 of 3):
Screenshot 2026-02-09 at 2 43 38 PM

Screenshot 4 - Updated Memory Types & Models Page (1 of 3):
Screenshot 2026-02-09 at 2 50 45 PM

Screenshot 5 - Updated Memory Types & Models Page (2 of 3):
Screenshot 2026-02-09 at 2 51 20 PM

Screenshot 6 - Updated Memory Types & Models Page (3 of 3):
Screenshot 2026-02-09 at 2 51 57 PM

Screenshot 7 - Updated Episodic Memory Page (1 of 3):
Screenshot 2026-02-09 at 2 53 48 PM

Screenshot 8 - Updated Episodic Memory Page (2 of 3):
Screenshot 2026-02-09 at 2 54 21 PM

Screenshot 9 - Updated Episodic Memory Page (3 of 3):
Screenshot 2026-02-09 at 2 55 02 PM

Screenshot 10 - Updated Semantic Memory (was Profile Memory) Page (1 of 3):
Screenshot 2026-02-09 at 2 56 05 PM

Screenshot 11 - Updated Semantic Memory Page (2 of 3):
Screenshot 2026-02-09 at 2 56 41 PM

Screenshot 12 - Updated Semantic Memory Page (3 of 3):
Screenshot 2026-02-09 at 2 57 17 PM

Screenshot 13 - Updated Episodic Memory Manager Page (1 of 3):
Screenshot 2026-02-09 at 2 58 17 PM

Screenshot 14 - Updated Episodic Memory Manager Page (2 of 3):
Screenshot 2026-02-09 at 2 58 52 PM

Screenshot 15 - Updated Episodic Memory manager Page (3 of 3):
Screenshot 2026-02-09 at 3 11 45 PM

Further comments

Note to Reviewers: This PR is a companion to the Client SDK PR#1074. While the Client PR focuses on how to use the memory, this PR focuses on how the server implements and manages those resources. Specifically, it clarifies the transition from "Profile" to "Semantic" stores, which is a breaking change in documentation terminology but an alignment with existing backend code.

Also, Screenshots 2 and 3 hold a different left menu than the others. The others are correct and show updated changes to docs.json that those do not.

@SarahScargall SarahScargall added the documentation Issues related to documentation label Feb 10, 2026

@sscargal sscargal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Sarah Scargall <sarah.scargall@memverge.com>
Signed-off-by: Sarah Scargall <sarah.scargall@memverge.com>
Signed-off-by: Sarah Scargall <sarah.scargall@memverge.com>
Signed-off-by: Sarah Scargall <sarah.scargall@memverge.com>
@SarahScargall SarahScargall merged commit aef8e64 into MemMachine:main Feb 27, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Issues related to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants