organize
Re-topic multiple memories at once. Also creates a hub memory and links members via part_of edges. Use this instead of calling update in a loop to change topics.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
ids | number[] | Yes | Memory IDs to organize |
label | string | Yes | New topic label for all memories |
Return Value
Section titled “Return Value”Returns the hub memory ID and updated memory count.
Examples
Section titled “Examples”Organize scattered memories
Section titled “Organize scattered memories”{ "ids": [12, 15, 23, 31, 44], "label": "auth-system"}This updates all five memories to topic “auth-system”, creates a hub memory, and links each memory to the hub with part_of edges.
- Pick descriptive labels (e.g., “editor-rendering”, “AI-pipeline”, “auth-system”)
- Always use
organizeinstead of callingupdatein a loop - The hub memory provides a central node for graph traversal
Related Tools
Section titled “Related Tools”- consolidate — Replace redundant memories with a summary
- find_clusters — Discover groups to organize
- detect_communities — Find natural groups via graph structure