graph
Manage knowledge graph relationships between entities, memories, and records. Link, search, and traverse connections to enrich recall with context from linked records.
Instructions
Knowledge graph operations — entity relationships, memory↔entity links, record-to-record links, co-occurrence auto-relate, and link-expanded recall.
ACTIONS:
"relate": Entity↔entity relationship (legacy).
"edges": Get all relationships for entity.
"link": Link a memory (rid) to an entity (legacy).
"search": Find entities by pattern.
"profile": Rich entity profile.
"depth": How deeply the system knows an entity.
"auto_relate": v0.8.0 — co-occurrence-driven edge backfill. Set dry_run=False to persist.
"record_link": v0.9.0 — add a record-to-record link (needs source_rid + target_rid + link_type).
"record_unlink": v0.9.0 — remove a record-to-record link.
"linked_records": v0.9.0 — traverse links from rid (direction = "outbound" | "inbound" | "both", optional link_type filter).
"recall_with_links": v0.9.0 — semantic recall with N-hop link expansion.
Args: action: One of the actions above. entity / target / relationship / weight / rid / pattern / limit / days / namespace: Legacy entity-graph args. source_rid / target_rid / link_type: For record_link / record_unlink. direction: For linked_records — "outbound" / "inbound" / "both". dry_run: For auto_relate — preview without persisting. max_edges: For auto_relate — cap edges proposed/created. query: For recall_with_links — natural language search. top_k: For recall_with_links — max seed results. expand_links: For recall_with_links — hop budget for traversal.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rid | No | ||
| days | No | ||
| limit | No | ||
| query | No | ||
| top_k | No | ||
| action | Yes | ||
| entity | No | ||
| target | No | ||
| weight | No | ||
| dry_run | No | ||
| pattern | No | ||
| direction | No | both | |
| link_type | No | related_to | |
| max_edges | No | ||
| namespace | No | ||
| source_rid | No | ||
| target_rid | No | ||
| expand_links | No | ||
| relationship | No | related_to |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |