Shortest path between two memories
memory_pathFind the shortest path between two memories to trace cause-effect chains, supersession history, or dependency lineage. Returns chain of IDs and edge types, or 'no path' if unreachable.
Instructions
BFS shortest path between two memories — returns the chain of ids + edge types, or a no path message when unreachable within max_hops. Read-only. Use after memory_search (with both endpoints known) to trace cause-effect chains, supersession history, or dependency lineage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from_id | Yes | Starting memory id. | |
| to_id | Yes | Destination memory id. | |
| max_hops | No | Maximum BFS depth (1-10). Default 4. Returns `no path` if the destination is further than `max_hops` from the start. | |
| edge_types | No | Optional whitelist of edge types to follow. Omit to allow all types. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| found | Yes | `true` when a path exists within `max_hops`; `false` otherwise (in which case `path` is empty and `message` carries the reason). | |
| hops | Yes | Number of edges in the path. 0 when `from_id === to_id`. | |
| path | Yes | Ordered list of nodes from `from_id` to `to_id`, each annotated with the edge type that takes you to the next node. | |
| message | No | Human-readable failure reason when `found=false` (e.g. `No path from <a> to <b> within <n> hops`). |