Update to AiAkiv Memory
Snapshot Nov 13, 2026 · 12:12 UTC · version 2.4.0
Collection source: downloaded plugin package.
Instructions updated for aiakiv-graph-query
Skill instructions — Now says: `search_memory`; exact counts and table facts go to `query_memories_with_sql`, which supports simple read queries only (filters, joins, counts,...
Observed in instructions or declared skills. Runtime behavior has not been tested.
Up to 3 plugins free · no card required.
All fields and original values.
Skill instructions
Nov 6, 2026 · 12:10 UTC
`search_memory`; exact counts and table facts go to `query_memories_with_sql`.
Nov 13, 2026 · 12:12 UTC
`search_memory`; exact counts and table facts go to `query_memories_with_sql`, which supports simple read queries only (filters, joins, counts, sums, grouping; its tool description lists the rest).
Compare saved observations
Download comparison JSONSKILL.md text changes
− removed · + added
--- before +++ after @@ -27,7 +27,9 @@ can be run as-is, then adapted. **When not to** — plain recall ("what did we decide about X") starts with -`search_memory`; exact counts and table facts go to `query_memories_with_sql`. +`search_memory`; exact counts and table facts go to `query_memories_with_sql`, +which supports simple read queries only (filters, joins, counts, sums, +grouping; its tool description lists the rest). If the tool is not in the list, the server has it disabled; say so. ## Translating a request (with or without `ak graph`)
Full technical diff · 1 changed fields
changed /skill_md_contents
"---\nname: aiakiv-graph-query\ndescription: >-\n Write graph queries (Cypher subset) against AiAkiv/MWeft memory with\n query_memory_graph (and query_partner_memory_graph across a link). Use when the\n user asks HOW memories are connected — shared entities, bridges, threads,\n multi-hop paths, co-occurrence, meaning search inside one entity or tag —\n whether or not they say the request phrase \"ak graph\" / \"ak 그래프\"; the\n phrase is a direct way to ask. Lower priority: a search hint block carrying a\n `graph_query` example. Not for plain recall (use search_memory).\n---\n\n# AiAkiv graph query\n\n`query_memory_graph` runs a **read-only Cypher subset** over the user's memory\ngraph. It answers *structure* questions that flat search cannot: which events\nshare entities, what bridges two topics, what happened next in a thread, what\nis semantically far but structurally connected.\n\n**When to reach for it** — when the question is about structure (how memories\nconnect, a path between two things, the entities they share, what came next in\na thread, or a meaning search inside one entity or tag), pick the graph query on\nyour own judgment; no phrase is needed. The user can also ask directly with\n`ak graph` (`ak 그래프`), usually followed by a question in their own words:\nthen the user chose the graph query, and the work is translating it faithfully\n(next section). Lower priority: `hint.graph_query.example` in a search response\ncan be run as-is, then adapted.\n\n**When not to** — plain recall (\"what did we decide about X\") starts with\n`search_memory`; exact counts and table facts go to `query_memories_with_sql`.\nIf the tool is not in the list, the server has it disabled; say so.\n\n## Translating a request (with or without `ak graph`)\n\n1. **Translate.** \"Among memories about <name>, the ones about <topic>\" is\n `events(entity: $name, text: $q, k: 20)`; \"in the <tag> tag, …\" uses `tag:`;\n \"A or B\", \"A and B both appear\" and \"names containing …\" are recipes below.\n Names match exactly (`find_memories_by_entity` shows the stored spelling).\n A request for \"all\", \"every\" or \"the full list\" is not a closeness ranking:\n it takes the listing path — `tag:` or `entity:` alone with `k: 200`, an\n explicit `LIMIT`, and a `CONTAINS` or name filter when the request names\n one. If `start.hub` is still `true`, the answer says there are more than 200\n and not all of them were seen.\n2. **Run it**, then **show the query that ran and what it means in one line**,\n next to the answer, in the user's language (for the first example below:\n the query, then \"the 20 BP-7 memories closest in meaning to q\").\n3. **Put the completeness markers into the user's words** (\"Reading the\n response\"): \"could not confirm\" and \"none\" are different answers, and\n \"the closest 20 of 224\" is not \"all 224\".\n4. **On a rejection**, read `hint` and `allowed_*` and fix the query once. On\n \"scoped match is off\", fall back to `text:` or `entity:` alone (for \"both\",\n the older `MATCH` recipe below, with its limit said) and tell the user the\n new syntax is off on this server.\n5. **The phrase alone** gets three example requests back, like these, adapted to\n names from the user's memory and written in the user's language:\n\n```\nak graph among the memories linked to BP-7, the discussion that set plan pricing\n START a = events(entity: \"BP-7\", text: $q, k: 20) RETURN a, a.score\n params {\"q\": \"the discussion that set plan pricing\"}\n\nak graph inside the ops tag, the records of a backup restore drill\n START a = events(tag: \"ops\", text: $q, k: 20) RETURN a, a.score\n params {\"q\": \"the records of a backup restore drill\"}\n\nak graph every entity that shares a memory with Redis and has cache in its name\n START a = events(entity: \"Redis\", k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n)\n WHERE n.name CONTAINS \"cache\" RETURN DISTINCT n.name LIMIT 200\n```\n\nThe third uses `k: 200` because the default `k` 5 walks only the five newest\nRedis memories; `start.hub: true` there means Redis has more than 200.\n\n## Grammar in one screen\n\n```\nSTART a = events(text: $q, k: 5) ← always events\nSTART a = events(entity: $name) newest of the entity's events\nSTART a = events(ids: [$id1, $id2])\nSTART a = events(tag: $t, k: 20) newest in the tag\nSTART a = events(entity: $name, text: $q, k: 20) entity's events closest to $q\nSTART a = events(tag: $t, text: $q, k: 20) tag's events closest to $q\nSTART a = events(entity: [\"A\", \"B\"], k: 200) events with A or B (tag: [...] too)\nSTART a = events(entity_all: [\"A\", \"B\"], k: 200) events with A and B (tag_all: too)\nSTART a = events(entity: $n, tag: $t, text: $q) in both scopes, closest to $q\nMATCH (a)-[s:SHARES {min: 2}]-(b) ← zero or more\nWHERE b.id <> a.id ← optional\nRETURN b, s.count, s.via ORDER BY s.weight DESC LIMIT 20\n```\n\n- **Three row caps that are not budget cuts** — none of them sets `partial`\n or `truncated`:\n - `k` defaults to 5, up to 20 for `text:` and any scope with `text:`, and 200\n for a scope without it (`entity:` / `tag:` alone, lists, `_all`), clamped\n with a note. The 20 and 200 are defaults; a server can set other caps, and\n `budget.caps` in the response shows the ones in force (Reading the\n response). The scoped starts other than `entity:` alone set\n `start.has_more: true` when the scope holds more\n candidates than came back, with a `notes` line \"start: top-k of N\n candidates; … more exist in scope (not a budget cut)\". A `+` after a\n number means it is a lower bound. When the scope was not fully covered\n (`filled: false`, a names cap, or the start cut by a statement timeout or\n the deadline) the \"could not confirm\" line replaces this one; `has_more`\n itself is still set.\n - `start.hub: true` — a scope without `text:` found more events than the\n `k` newest it returned. For `entity:` alone this is the only signal.\n - Without `LIMIT`, rows stop at 20 (`LIMIT` goes up to 200). With the switch\n on, `notes` says \"rows cut to the default LIMIT 20; add LIMIT to return\n more\"; with it off, the cut is silent.\n- A name resolves to at most 20 entities or tags;\n `start.entities_truncated` / `tags_truncated` says more matched.\n- **Name scopes**: a scope is an AND of parts, a part is an OR of names. A list\n is one part (any name); `entity_all:` / `tag_all:` make each name its own part\n and take a list only; `entity:` with `tag:` needs both. That is the only\n shape: no brackets, no negation, and no \"entity or tag\" choice. A list can\n come from `params` (`entity_all: $names`). Up to 10 names per `START`, more is\n rejected, not cut; an empty list, a repeated name, a non-string, or mixing\n with `ids:` is rejected too.\n- Behind a server switch: `tag:`, the combined starts, name lists and `_all`,\n `a.score`, `CONTAINS`, no `MATCH`, arrow filling. Off, they are rejected with\n \"… (scoped match is off)\" and a hint.\n- **No `MATCH`** when the start is the answer:\n `START a = events(entity: $name, text: $q, k: 20) RETURN a, a.score ORDER BY a.score DESC, a.id`.\n- **`a.score`** — the start event's cosine to the start text, not clipped; null\n without start text and on hop-reached events, nulls last. `RETURN a` omits it.\n- **`WHERE n.name CONTAINS $part`** — `Entity.name` / `Tag.name` only, ignoring\n case and full-width forms; an all-ASCII piece needs 2 characters, one Hangul\n or Han character is enough. It filters rows the walk already returned.\n- **Directed** `NEXT`, `MEMBER_OF`, `RESOLVED_BY` take an arrow. A missing one\n is filled in (with a `notes` line) only when the end labels allow one way, as\n `(a)-[:MEMBER_OF]-(t)` from an event; event-to-event `NEXT` and `RESOLVED_BY`\n still need it. A wrong arrow is rejected, not flipped.\n- No `WITH`, no `CREATE`/`SET` (read-only); conditions go in relation params\n like `{min: 3}`. The user's sentence goes through `params` (`$q`), not inline.\n- Aggregates live in `RETURN`; `cos(a, b)` is the cosine of two event variables.\n Variable length on `NEXT` and `SHARES` only, 1..3: `-[n:NEXT*1..3]->`\n (`n.hops`).\n\n## Relations (the whole vocabulary)\n\n| Relation | Between | Meaning / params |\n|---|---|---|\n| `SHARES {min, min_w}` | event–event | share ≥min entities; carries `s.count`, `s.weight` (rarity-weighted), `s.via` (the shared entities = bridges) |\n| `SIMILAR {k, min}` | event–event | vector nearest neighbours; `f.cos` |\n| `FAR {max}` | event–event | vector distance filter (cos < max) — pair with SHARES for \"connected but semantically far\" |\n| `NEXT {source}` | event→event | conversation/thread order (directional, supports `*1..3`); `n.source` |\n| `RESOLVED_BY {relation}` | event→event | plan or expectation → the event that realized it (directional); `relation`: `realization`; `r.asserted_at`; revoked links excluded |\n| `PARTICIPATED_IN` | entity–event | membership; walk event→entity→event for co-participation |\n| `MEMBER_OF {kind}` | event→tag | tag membership (directional); `kind` is `contains` or `refers` |\n| `CONNECTED` | entity–entity | stored entity co-occurrence edge; `c.event_count` |\n| `SAME_AS` | entity–entity | stored alias edge (exact identity, not fuzzy match); `x.confidence` |\n\n## Recipes\n\n- **Structurally close but semantically far** (the highest-value walk from\n search results — surfaces non-obvious connections):\n `START a = events(ids: $ids) MATCH (a)-[s:SHARES {min: 2}]-(b)-[f:FAR {max: 0.5}]-(a) RETURN b, s.count, s.via, f.cos ORDER BY s.weight DESC LIMIT 10`\n- **What bridges these results** — same query; read `s.via` (shared entities),\n then `find_memories_by_entity` the interesting ones.\n- **Thread / what happened next**:\n `START a = events(ids: $ids) MATCH (a)-[n:NEXT*1..3]->(b) RETURN b.id, b.summary, n.hops ORDER BY n.hops LIMIT 30`\n- **Entity co-participation ranking**:\n `START a = events(text: $q, k: 5) MATCH (a)-[:PARTICIPATED_IN]-(e)-[:PARTICIPATED_IN]-(b) WHERE b.id <> a.id RETURN e.name, count(DISTINCT b) AS n ORDER BY n DESC LIMIT 15`\n- **A and B both appear**: filters before `k` is taken, so a large A does not\n hide the overlap:\n `START a = events(entity_all: [$a, $b], k: 200) RETURN a LIMIT 200`\n Name and tag together: `events(entity: $a, tag: $t, k: 200)`. Add `text: $q`\n (then `k` up to 20) to rank the overlap by meaning.\n- **A or B**: `START a = events(entity: [$a, $b], k: 200) RETURN a LIMIT 200`\n- **Both, switch off** (older way): it keeps only A's newest 200, so an overlap\n further back is missed; say so when `start.hub` is `true`:\n `START a = events(entity: $a, k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n {name: $b}) RETURN DISTINCT a LIMIT 200`\n\nRows are projected small (Event → `{id, summary, timestamp, order_index}`);\nopen full content with `get_memory_content`.\n\n## Reading the response, handling refusals\n\n- `start.scoped_mode`: `exact` means every candidate was measured and only the\n top `k` returned; `filtered_ann` means a large scope was searched through the\n vector index. `start.candidates`: `{count, exact}` (with `exact: false` the\n count is a lower bound); `start.filled: false`: fewer than `k` found within\n budget, not \"the scope ran out\". `filled: false`, a names cap, or a start\n cut by a statement timeout or the deadline (`{stage: \"deadline\", at:\n \"start\"}`) adds a start entry to `truncated` and sets `partial`.\n- **0 rows plus any of those means \"could not confirm\"; 0 rows with nothing cut\n means \"none\".** `notes` says so too, along with clamps and inferred arrows.\n- **Names not found.** `start.unresolved` lists the scope names that matched\n nothing as `{kind, name}`, e.g. `[{\"kind\": \"tag\", \"name\": \"X\"}]`. Entity 'X'\n and tag 'X' are different names: if the entity is found and the tag is not,\n only the tag is listed. Say \"no tag is stored under that spelling\", not \"X\n does not exist\"; it may exist as the other kind. In an any-of part where\n another name was found, the miss shows only in `unresolved`, with no note.\n If a whole part found none of its names, the result is 0 rows with a note\n naming only the names of the part(s) that found nothing, e.g. \"scope: no\n match for entity 'B', tag 'x' - a part of the scope found none of its names,\n so the scope has no rows\": say the name is not stored under that spelling\n for that kind, and check it with `find_memories_by_entity` before calling it\n none.\n- **Caps in force.** With the new syntax on, `budget.caps` carries\n `{start_k_max, start_entity_max, start_scoped_k_max, limit_max}`, the caps\n this server applies (`k` for `text:` and the number of `ids:`, `k` for a\n scope without text, `k` for a scope with text, `LIMIT`). The 20 and 200 above are\n defaults; when telling the user a limit (\"only the newest 200\"), use the\n number from `caps`. `LIMIT` stays at most 200.\n- **More candidates than rows.** `start.has_more: true` — or, where the server\n does not send it, `candidates.count` above the rows the start returned —\n means the scope holds more than came back. `exact` with count 224 and `k` 20\n is the closest 20 of 224; saying \"compared all 224, nothing missing\" is\n wrong. `partial: false` means no budget cut, not \"everything was seen\".\n- Budget caps (`partial` / `truncated`) are **never silent**; `k`, `hub` and\n the default `LIMIT` are separate signals (Grammar above). If truncated,\n narrow instead of retrying the same query: fewer anchors (`k`), tighter\n `SHARES {min}` / `FAR {max}`, smaller `LIMIT`.\n- A rejection returns `{error, blocked_by: syntax|grammar|params, hint?,\n allowed_*}` — read `hint` and the `allowed_*` lists, fix the query once;\n do not loop blind retries.\n- Budget errors (\"statement timeout\") mean the walk was too wide, not that\n the tool is broken.\n\n## Across a link (partner org)\n\n`query_partner_memory_graph(link_id, query, params)` — same language over your org\nplus a linked partner org. `link_id` comes from `list_partner_links`. `START`\nresolves in YOUR org only; the walk crosses sides through entities the link\nhas **aliased** (they count as one entity for `PARTICIPATED_IN`/`SHARES`),\nand `SIMILAR`/`FAR` cross by vector. `NEXT`/`MEMBER_OF`/`CONNECTED` stay\nwithin a side. Returned events carry `side` (`remote` = partner); open remote\ncontent with `get_partner_memory_content`. Remote budgets are tighter —\nprefer small `k` and `LIMIT` first. The new syntax works here too; `CONTAINS`\nsees the home spelling of aliased names. Not every server exposes this tool; if\nabsent, only home queries are available.\n\n## Probe: relation modes and expansion rounds\n\n`find_memory_connections` walks the same entity-event graph without a query language. It\ntakes a `relation` instead of a `MATCH` clause, and its candidates are\nunverified pointers — the same standing as anything the recipes above return.\n\nEntry is not one thing. A sentence-only call rides the vector ranking, so it\nrecovers when you have no ids yet; an `anchor_entity_id` call walks from the\nentity directly and does not depend on the ranking at all. A useful loop is to\nread a bridge entity out of one response and re-call with it as the anchor.\nThat chaining is yours to steer — it is not something the API does for you.\n\nThe relations:\n\n- `similar` (default) — time-stratified neighbours of what the sentence found.\n- `before` / `after` — one side of a point in time. Exactly one of\n `reference_time` (ISO-8601) or `anchor_event_id` is required; there is no\n implicit \"now\".\n- `evolution` — stratifies the candidate pool's own timeline into first\n sighting, transition points (the largest content shift between adjacent\n sightings), and latest sighting. It answers \"how did this develop\". It works\n on the pool your sentence built and returns a handful of stratified picks,\n whereas `list_memory_timeline` returns one entity's full chronology.\n- `contrast` — narrows by cosine and hands back candidates. The engine does\n not judge opposition: semantic tension lives as small displacements inside\n high cosine, not as opposite vectors, so geometry cannot see it. Read the\n candidates and judge contradiction yourself;\n `grounding_basis.contrast_protocol` restates this per call.\n- `explore` — question-free wandering. Requires `anchor_entity_id`, forbids\n `sentence`. There is no cosine axis: candidates are ordered by bridge lift\n (specificity) and recency, with the earliest sighting stratified in, and\n `grounding` comes back as `\"exploration\"` because the existence gate does\n not apply.\n\n`expansion_rounds=2` re-expands from the round-1 picks through bridges that\nround 1 did not use, reaching things two structural steps away. `top_n` caps\ncandidates *per round*, so a 2-round call can return up to twice `top_n` in\ntotal, and each candidate carries its `round` so you can tell how far out it\nsits. Round 2 costs a second walk — reach for it on relational and\n`evolution`-shaped questions rather than on direct lookups.\n\nAcross a link, `find_partner_memory_connections` takes the same inputs plus `link_id`. Entry\nhappens in your org only; the partner side is reached through bridges alone,\nwhich is why it never reports `absent` — check\n`grounding_basis.remote_entry_not_searched` instead.\n""---\nname: aiakiv-graph-query\ndescription: >-\n Write graph queries (Cypher subset) against AiAkiv/MWeft memory with\n query_memory_graph (and query_partner_memory_graph across a link). Use when the\n user asks HOW memories are connected — shared entities, bridges, threads,\n multi-hop paths, co-occurrence, meaning search inside one entity or tag —\n whether or not they say the request phrase \"ak graph\" / \"ak 그래프\"; the\n phrase is a direct way to ask. Lower priority: a search hint block carrying a\n `graph_query` example. Not for plain recall (use search_memory).\n---\n\n# AiAkiv graph query\n\n`query_memory_graph` runs a **read-only Cypher subset** over the user's memory\ngraph. It answers *structure* questions that flat search cannot: which events\nshare entities, what bridges two topics, what happened next in a thread, what\nis semantically far but structurally connected.\n\n**When to reach for it** — when the question is about structure (how memories\nconnect, a path between two things, the entities they share, what came next in\na thread, or a meaning search inside one entity or tag), pick the graph query on\nyour own judgment; no phrase is needed. The user can also ask directly with\n`ak graph` (`ak 그래프`), usually followed by a question in their own words:\nthen the user chose the graph query, and the work is translating it faithfully\n(next section). Lower priority: `hint.graph_query.example` in a search response\ncan be run as-is, then adapted.\n\n**When not to** — plain recall (\"what did we decide about X\") starts with\n`search_memory`; exact counts and table facts go to `query_memories_with_sql`,\nwhich supports simple read queries only (filters, joins, counts, sums,\ngrouping; its tool description lists the rest).\nIf the tool is not in the list, the server has it disabled; say so.\n\n## Translating a request (with or without `ak graph`)\n\n1. **Translate.** \"Among memories about <name>, the ones about <topic>\" is\n `events(entity: $name, text: $q, k: 20)`; \"in the <tag> tag, …\" uses `tag:`;\n \"A or B\", \"A and B both appear\" and \"names containing …\" are recipes below.\n Names match exactly (`find_memories_by_entity` shows the stored spelling).\n A request for \"all\", \"every\" or \"the full list\" is not a closeness ranking:\n it takes the listing path — `tag:` or `entity:` alone with `k: 200`, an\n explicit `LIMIT`, and a `CONTAINS` or name filter when the request names\n one. If `start.hub` is still `true`, the answer says there are more than 200\n and not all of them were seen.\n2. **Run it**, then **show the query that ran and what it means in one line**,\n next to the answer, in the user's language (for the first example below:\n the query, then \"the 20 BP-7 memories closest in meaning to q\").\n3. **Put the completeness markers into the user's words** (\"Reading the\n response\"): \"could not confirm\" and \"none\" are different answers, and\n \"the closest 20 of 224\" is not \"all 224\".\n4. **On a rejection**, read `hint` and `allowed_*` and fix the query once. On\n \"scoped match is off\", fall back to `text:` or `entity:` alone (for \"both\",\n the older `MATCH` recipe below, with its limit said) and tell the user the\n new syntax is off on this server.\n5. **The phrase alone** gets three example requests back, like these, adapted to\n names from the user's memory and written in the user's language:\n\n```\nak graph among the memories linked to BP-7, the discussion that set plan pricing\n START a = events(entity: \"BP-7\", text: $q, k: 20) RETURN a, a.score\n params {\"q\": \"the discussion that set plan pricing\"}\n\nak graph inside the ops tag, the records of a backup restore drill\n START a = events(tag: \"ops\", text: $q, k: 20) RETURN a, a.score\n params {\"q\": \"the records of a backup restore drill\"}\n\nak graph every entity that shares a memory with Redis and has cache in its name\n START a = events(entity: \"Redis\", k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n)\n WHERE n.name CONTAINS \"cache\" RETURN DISTINCT n.name LIMIT 200\n```\n\nThe third uses `k: 200` because the default `k` 5 walks only the five newest\nRedis memories; `start.hub: true` there means Redis has more than 200.\n\n## Grammar in one screen\n\n```\nSTART a = events(text: $q, k: 5) ← always events\nSTART a = events(entity: $name) newest of the entity's events\nSTART a = events(ids: [$id1, $id2])\nSTART a = events(tag: $t, k: 20) newest in the tag\nSTART a = events(entity: $name, text: $q, k: 20) entity's events closest to $q\nSTART a = events(tag: $t, text: $q, k: 20) tag's events closest to $q\nSTART a = events(entity: [\"A\", \"B\"], k: 200) events with A or B (tag: [...] too)\nSTART a = events(entity_all: [\"A\", \"B\"], k: 200) events with A and B (tag_all: too)\nSTART a = events(entity: $n, tag: $t, text: $q) in both scopes, closest to $q\nMATCH (a)-[s:SHARES {min: 2}]-(b) ← zero or more\nWHERE b.id <> a.id ← optional\nRETURN b, s.count, s.via ORDER BY s.weight DESC LIMIT 20\n```\n\n- **Three row caps that are not budget cuts** — none of them sets `partial`\n or `truncated`:\n - `k` defaults to 5, up to 20 for `text:` and any scope with `text:`, and 200\n for a scope without it (`entity:` / `tag:` alone, lists, `_all`), clamped\n with a note. The 20 and 200 are defaults; a server can set other caps, and\n `budget.caps` in the response shows the ones in force (Reading the\n response). The scoped starts other than `entity:` alone set\n `start.has_more: true` when the scope holds more\n candidates than came back, with a `notes` line \"start: top-k of N\n candidates; … more exist in scope (not a budget cut)\". A `+` after a\n number means it is a lower bound. When the scope was not fully covered\n (`filled: false`, a names cap, or the start cut by a statement timeout or\n the deadline) the \"could not confirm\" line replaces this one; `has_more`\n itself is still set.\n - `start.hub: true` — a scope without `text:` found more events than the\n `k` newest it returned. For `entity:` alone this is the only signal.\n - Without `LIMIT`, rows stop at 20 (`LIMIT` goes up to 200). With the switch\n on, `notes` says \"rows cut to the default LIMIT 20; add LIMIT to return\n more\"; with it off, the cut is silent.\n- A name resolves to at most 20 entities or tags;\n `start.entities_truncated` / `tags_truncated` says more matched.\n- **Name scopes**: a scope is an AND of parts, a part is an OR of names. A list\n is one part (any name); `entity_all:` / `tag_all:` make each name its own part\n and take a list only; `entity:` with `tag:` needs both. That is the only\n shape: no brackets, no negation, and no \"entity or tag\" choice. A list can\n come from `params` (`entity_all: $names`). Up to 10 names per `START`, more is\n rejected, not cut; an empty list, a repeated name, a non-string, or mixing\n with `ids:` is rejected too.\n- Behind a server switch: `tag:`, the combined starts, name lists and `_all`,\n `a.score`, `CONTAINS`, no `MATCH`, arrow filling. Off, they are rejected with\n \"… (scoped match is off)\" and a hint.\n- **No `MATCH`** when the start is the answer:\n `START a = events(entity: $name, text: $q, k: 20) RETURN a, a.score ORDER BY a.score DESC, a.id`.\n- **`a.score`** — the start event's cosine to the start text, not clipped; null\n without start text and on hop-reached events, nulls last. `RETURN a` omits it.\n- **`WHERE n.name CONTAINS $part`** — `Entity.name` / `Tag.name` only, ignoring\n case and full-width forms; an all-ASCII piece needs 2 characters, one Hangul\n or Han character is enough. It filters rows the walk already returned.\n- **Directed** `NEXT`, `MEMBER_OF`, `RESOLVED_BY` take an arrow. A missing one\n is filled in (with a `notes` line) only when the end labels allow one way, as\n `(a)-[:MEMBER_OF]-(t)` from an event; event-to-event `NEXT` and `RESOLVED_BY`\n still need it. A wrong arrow is rejected, not flipped.\n- No `WITH`, no `CREATE`/`SET` (read-only); conditions go in relation params\n like `{min: 3}`. The user's sentence goes through `params` (`$q`), not inline.\n- Aggregates live in `RETURN`; `cos(a, b)` is the cosine of two event variables.\n Variable length on `NEXT` and `SHARES` only, 1..3: `-[n:NEXT*1..3]->`\n (`n.hops`).\n\n## Relations (the whole vocabulary)\n\n| Relation | Between | Meaning / params |\n|---|---|---|\n| `SHARES {min, min_w}` | event–event | share ≥min entities; carries `s.count`, `s.weight` (rarity-weighted), `s.via` (the shared entities = bridges) |\n| `SIMILAR {k, min}` | event–event | vector nearest neighbours; `f.cos` |\n| `FAR {max}` | event–event | vector distance filter (cos < max) — pair with SHARES for \"connected but semantically far\" |\n| `NEXT {source}` | event→event | conversation/thread order (directional, supports `*1..3`); `n.source` |\n| `RESOLVED_BY {relation}` | event→event | plan or expectation → the event that realized it (directional); `relation`: `realization`; `r.asserted_at`; revoked links excluded |\n| `PARTICIPATED_IN` | entity–event | membership; walk event→entity→event for co-participation |\n| `MEMBER_OF {kind}` | event→tag | tag membership (directional); `kind` is `contains` or `refers` |\n| `CONNECTED` | entity–entity | stored entity co-occurrence edge; `c.event_count` |\n| `SAME_AS` | entity–entity | stored alias edge (exact identity, not fuzzy match); `x.confidence` |\n\n## Recipes\n\n- **Structurally close but semantically far** (the highest-value walk from\n search results — surfaces non-obvious connections):\n `START a = events(ids: $ids) MATCH (a)-[s:SHARES {min: 2}]-(b)-[f:FAR {max: 0.5}]-(a) RETURN b, s.count, s.via, f.cos ORDER BY s.weight DESC LIMIT 10`\n- **What bridges these results** — same query; read `s.via` (shared entities),\n then `find_memories_by_entity` the interesting ones.\n- **Thread / what happened next**:\n `START a = events(ids: $ids) MATCH (a)-[n:NEXT*1..3]->(b) RETURN b.id, b.summary, n.hops ORDER BY n.hops LIMIT 30`\n- **Entity co-participation ranking**:\n `START a = events(text: $q, k: 5) MATCH (a)-[:PARTICIPATED_IN]-(e)-[:PARTICIPATED_IN]-(b) WHERE b.id <> a.id RETURN e.name, count(DISTINCT b) AS n ORDER BY n DESC LIMIT 15`\n- **A and B both appear**: filters before `k` is taken, so a large A does not\n hide the overlap:\n `START a = events(entity_all: [$a, $b], k: 200) RETURN a LIMIT 200`\n Name and tag together: `events(entity: $a, tag: $t, k: 200)`. Add `text: $q`\n (then `k` up to 20) to rank the overlap by meaning.\n- **A or B**: `START a = events(entity: [$a, $b], k: 200) RETURN a LIMIT 200`\n- **Both, switch off** (older way): it keeps only A's newest 200, so an overlap\n further back is missed; say so when `start.hub` is `true`:\n `START a = events(entity: $a, k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n {name: $b}) RETURN DISTINCT a LIMIT 200`\n\nRows are projected small (Event → `{id, summary, timestamp, order_index}`);\nopen full content with `get_memory_content`.\n\n## Reading the response, handling refusals\n\n- `start.scoped_mode`: `exact` means every candidate was measured and only the\n top `k` returned; `filtered_ann` means a large scope was searched through the\n vector index. `start.candidates`: `{count, exact}` (with `exact: false` the\n count is a lower bound); `start.filled: false`: fewer than `k` found within\n budget, not \"the scope ran out\". `filled: false`, a names cap, or a start\n cut by a statement timeout or the deadline (`{stage: \"deadline\", at:\n \"start\"}`) adds a start entry to `truncated` and sets `partial`.\n- **0 rows plus any of those means \"could not confirm\"; 0 rows with nothing cut\n means \"none\".** `notes` says so too, along with clamps and inferred arrows.\n- **Names not found.** `start.unresolved` lists the scope names that matched\n nothing as `{kind, name}`, e.g. `[{\"kind\": \"tag\", \"name\": \"X\"}]`. Entity 'X'\n and tag 'X' are different names: if the entity is found and the tag is not,\n only the tag is listed. Say \"no tag is stored under that spelling\", not \"X\n does not exist\"; it may exist as the other kind. In an any-of part where\n another name was found, the miss shows only in `unresolved`, with no note.\n If a whole part found none of its names, the result is 0 rows with a note\n naming only the names of the part(s) that found nothing, e.g. \"scope: no\n match for entity 'B', tag 'x' - a part of the scope found none of its names,\n so the scope has no rows\": say the name is not stored under that spelling\n for that kind, and check it with `find_memories_by_entity` before calling it\n none.\n- **Caps in force.** With the new syntax on, `budget.caps` carries\n `{start_k_max, start_entity_max, start_scoped_k_max, limit_max}`, the caps\n this server applies (`k` for `text:` and the number of `ids:`, `k` for a\n scope without text, `k` for a scope with text, `LIMIT`). The 20 and 200 above are\n defaults; when telling the user a limit (\"only the newest 200\"), use the\n number from `caps`. `LIMIT` stays at most 200.\n- **More candidates than rows.** `start.has_more: true` — or, where the server\n does not send it, `candidates.count` above the rows the start returned —\n means the scope holds more than came back. `exact` with count 224 and `k` 20\n is the closest 20 of 224; saying \"compared all 224, nothing missing\" is\n wrong. `partial: false` means no budget cut, not \"everything was seen\".\n- Budget caps (`partial` / `truncated`) are **never silent**; `k`, `hub` and\n the default `LIMIT` are separate signals (Grammar above). If truncated,\n narrow instead of retrying the same query: fewer anchors (`k`), tighter\n `SHARES {min}` / `FAR {max}`, smaller `LIMIT`.\n- A rejection returns `{error, blocked_by: syntax|grammar|params, hint?,\n allowed_*}` — read `hint` and the `allowed_*` lists, fix the query once;\n do not loop blind retries.\n- Budget errors (\"statement timeout\") mean the walk was too wide, not that\n the tool is broken.\n\n## Across a link (partner org)\n\n`query_partner_memory_graph(link_id, query, params)` — same language over your org\nplus a linked partner org. `link_id` comes from `list_partner_links`. `START`\nresolves in YOUR org only; the walk crosses sides through entities the link\nhas **aliased** (they count as one entity for `PARTICIPATED_IN`/`SHARES`),\nand `SIMILAR`/`FAR` cross by vector. `NEXT`/`MEMBER_OF`/`CONNECTED` stay\nwithin a side. Returned events carry `side` (`remote` = partner); open remote\ncontent with `get_partner_memory_content`. Remote budgets are tighter —\nprefer small `k` and `LIMIT` first. The new syntax works here too; `CONTAINS`\nsees the home spelling of aliased names. Not every server exposes this tool; if\nabsent, only home queries are available.\n\n## Probe: relation modes and expansion rounds\n\n`find_memory_connections` walks the same entity-event graph without a query language. It\ntakes a `relation` instead of a `MATCH` clause, and its candidates are\nunverified pointers — the same standing as anything the recipes above return.\n\nEntry is not one thing. A sentence-only call rides the vector ranking, so it\nrecovers when you have no ids yet; an `anchor_entity_id` call walks from the\nentity directly and does not depend on the ranking at all. A useful loop is to\nread a bridge entity out of one response and re-call with it as the anchor.\nThat chaining is yours to steer — it is not something the API does for you.\n\nThe relations:\n\n- `similar` (default) — time-stratified neighbours of what the sentence found.\n- `before` / `after` — one side of a point in time. Exactly one of\n `reference_time` (ISO-8601) or `anchor_event_id` is required; there is no\n implicit \"now\".\n- `evolution` — stratifies the candidate pool's own timeline into first\n sighting, transition points (the largest content shift between adjacent\n sightings), and latest sighting. It answers \"how did this develop\". It works\n on the pool your sentence built and returns a handful of stratified picks,\n whereas `list_memory_timeline` returns one entity's full chronology.\n- `contrast` — narrows by cosine and hands back candidates. The engine does\n not judge opposition: semantic tension lives as small displacements inside\n high cosine, not as opposite vectors, so geometry cannot see it. Read the\n candidates and judge contradiction yourself;\n `grounding_basis.contrast_protocol` restates this per call.\n- `explore` — question-free wandering. Requires `anchor_entity_id`, forbids\n `sentence`. There is no cosine axis: candidates are ordered by bridge lift\n (specificity) and recency, with the earliest sighting stratified in, and\n `grounding` comes back as `\"exploration\"` because the existence gate does\n not apply.\n\n`expansion_rounds=2` re-expands from the round-1 picks through bridges that\nround 1 did not use, reaching things two structural steps away. `top_n` caps\ncandidates *per round*, so a 2-round call can return up to twice `top_n` in\ntotal, and each candidate carries its `round` so you can tell how far out it\nsits. Round 2 costs a second walk — reach for it on relational and\n`evolution`-shaped questions rather than on direct lookups.\n\nAcross a link, `find_partner_memory_connections` takes the same inputs plus `link_id`. Entry\nhappens in your org only; the partner side is reached through bridges alone,\nwhich is why it never reports `absent` — check\n`grounding_basis.remote_entry_not_searched` instead.\n"Full snapshot data
{
"description": "Write graph queries (Cypher subset) against AiAkiv/MWeft memory with query_memory_graph (and query_partner_memory_graph across a link). Use when the user asks HOW memories are connected — shared entities, bridges, threads, multi-hop paths, co-occurrence, meaning search inside one entity or tag — whether or not they say the request phrase \"ak graph\" / \"ak 그래프\"; the phrase is a direct way to ask. Lower priority: a search hint block carrying a `graph_query` example. Not for plain recall (use search_memory).",
"included_files": [],
"name": "aiakiv-graph-query",
"skill_md_contents": "---\nname: aiakiv-graph-query\ndescription: >-\n Write graph queries (Cypher subset) against AiAkiv/MWeft memory with\n query_memory_graph (and query_partner_memory_graph across a link). Use when the\n user asks HOW memories are connected — shared entities, bridges, threads,\n multi-hop paths, co-occurrence, meaning search inside one entity or tag —\n whether or not they say the request phrase \"ak graph\" / \"ak 그래프\"; the\n phrase is a direct way to ask. Lower priority: a search hint block carrying a\n `graph_query` example. Not for plain recall (use search_memory).\n---\n\n# AiAkiv graph query\n\n`query_memory_graph` runs a **read-only Cypher subset** over the user's memory\ngraph. It answers *structure* questions that flat search cannot: which events\nshare entities, what bridges two topics, what happened next in a thread, what\nis semantically far but structurally connected.\n\n**When to reach for it** — when the question is about structure (how memories\nconnect, a path between two things, the entities they share, what came next in\na thread, or a meaning search inside one entity or tag), pick the graph query on\nyour own judgment; no phrase is needed. The user can also ask directly with\n`ak graph` (`ak 그래프`), usually followed by a question in their own words:\nthen the user chose the graph query, and the work is translating it faithfully\n(next section). Lower priority: `hint.graph_query.example` in a search response\ncan be run as-is, then adapted.\n\n**When not to** — plain recall (\"what did we decide about X\") starts with\n`search_memory`; exact counts and table facts go to `query_memories_with_sql`,\nwhich supports simple read queries only (filters, joins, counts, sums,\ngrouping; its tool description lists the rest).\nIf the tool is not in the list, the server has it disabled; say so.\n\n## Translating a request (with or without `ak graph`)\n\n1. **Translate.** \"Among memories about <name>, the ones about <topic>\" is\n `events(entity: $name, text: $q, k: 20)`; \"in the <tag> tag, …\" uses `tag:`;\n \"A or B\", \"A and B both appear\" and \"names containing …\" are recipes below.\n Names match exactly (`find_memories_by_entity` shows the stored spelling).\n A request for \"all\", \"every\" or \"the full list\" is not a closeness ranking:\n it takes the listing path — `tag:` or `entity:` alone with `k: 200`, an\n explicit `LIMIT`, and a `CONTAINS` or name filter when the request names\n one. If `start.hub` is still `true`, the answer says there are more than 200\n and not all of them were seen.\n2. **Run it**, then **show the query that ran and what it means in one line**,\n next to the answer, in the user's language (for the first example below:\n the query, then \"the 20 BP-7 memories closest in meaning to q\").\n3. **Put the completeness markers into the user's words** (\"Reading the\n response\"): \"could not confirm\" and \"none\" are different answers, and\n \"the closest 20 of 224\" is not \"all 224\".\n4. **On a rejection**, read `hint` and `allowed_*` and fix the query once. On\n \"scoped match is off\", fall back to `text:` or `entity:` alone (for \"both\",\n the older `MATCH` recipe below, with its limit said) and tell the user the\n new syntax is off on this server.\n5. **The phrase alone** gets three example requests back, like these, adapted to\n names from the user's memory and written in the user's language:\n\n```\nak graph among the memories linked to BP-7, the discussion that set plan pricing\n START a = events(entity: \"BP-7\", text: $q, k: 20) RETURN a, a.score\n params {\"q\": \"the discussion that set plan pricing\"}\n\nak graph inside the ops tag, the records of a backup restore drill\n START a = events(tag: \"ops\", text: $q, k: 20) RETURN a, a.score\n params {\"q\": \"the records of a backup restore drill\"}\n\nak graph every entity that shares a memory with Redis and has cache in its name\n START a = events(entity: \"Redis\", k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n)\n WHERE n.name CONTAINS \"cache\" RETURN DISTINCT n.name LIMIT 200\n```\n\nThe third uses `k: 200` because the default `k` 5 walks only the five newest\nRedis memories; `start.hub: true` there means Redis has more than 200.\n\n## Grammar in one screen\n\n```\nSTART a = events(text: $q, k: 5) ← always events\nSTART a = events(entity: $name) newest of the entity's events\nSTART a = events(ids: [$id1, $id2])\nSTART a = events(tag: $t, k: 20) newest in the tag\nSTART a = events(entity: $name, text: $q, k: 20) entity's events closest to $q\nSTART a = events(tag: $t, text: $q, k: 20) tag's events closest to $q\nSTART a = events(entity: [\"A\", \"B\"], k: 200) events with A or B (tag: [...] too)\nSTART a = events(entity_all: [\"A\", \"B\"], k: 200) events with A and B (tag_all: too)\nSTART a = events(entity: $n, tag: $t, text: $q) in both scopes, closest to $q\nMATCH (a)-[s:SHARES {min: 2}]-(b) ← zero or more\nWHERE b.id <> a.id ← optional\nRETURN b, s.count, s.via ORDER BY s.weight DESC LIMIT 20\n```\n\n- **Three row caps that are not budget cuts** — none of them sets `partial`\n or `truncated`:\n - `k` defaults to 5, up to 20 for `text:` and any scope with `text:`, and 200\n for a scope without it (`entity:` / `tag:` alone, lists, `_all`), clamped\n with a note. The 20 and 200 are defaults; a server can set other caps, and\n `budget.caps` in the response shows the ones in force (Reading the\n response). The scoped starts other than `entity:` alone set\n `start.has_more: true` when the scope holds more\n candidates than came back, with a `notes` line \"start: top-k of N\n candidates; … more exist in scope (not a budget cut)\". A `+` after a\n number means it is a lower bound. When the scope was not fully covered\n (`filled: false`, a names cap, or the start cut by a statement timeout or\n the deadline) the \"could not confirm\" line replaces this one; `has_more`\n itself is still set.\n - `start.hub: true` — a scope without `text:` found more events than the\n `k` newest it returned. For `entity:` alone this is the only signal.\n - Without `LIMIT`, rows stop at 20 (`LIMIT` goes up to 200). With the switch\n on, `notes` says \"rows cut to the default LIMIT 20; add LIMIT to return\n more\"; with it off, the cut is silent.\n- A name resolves to at most 20 entities or tags;\n `start.entities_truncated` / `tags_truncated` says more matched.\n- **Name scopes**: a scope is an AND of parts, a part is an OR of names. A list\n is one part (any name); `entity_all:` / `tag_all:` make each name its own part\n and take a list only; `entity:` with `tag:` needs both. That is the only\n shape: no brackets, no negation, and no \"entity or tag\" choice. A list can\n come from `params` (`entity_all: $names`). Up to 10 names per `START`, more is\n rejected, not cut; an empty list, a repeated name, a non-string, or mixing\n with `ids:` is rejected too.\n- Behind a server switch: `tag:`, the combined starts, name lists and `_all`,\n `a.score`, `CONTAINS`, no `MATCH`, arrow filling. Off, they are rejected with\n \"… (scoped match is off)\" and a hint.\n- **No `MATCH`** when the start is the answer:\n `START a = events(entity: $name, text: $q, k: 20) RETURN a, a.score ORDER BY a.score DESC, a.id`.\n- **`a.score`** — the start event's cosine to the start text, not clipped; null\n without start text and on hop-reached events, nulls last. `RETURN a` omits it.\n- **`WHERE n.name CONTAINS $part`** — `Entity.name` / `Tag.name` only, ignoring\n case and full-width forms; an all-ASCII piece needs 2 characters, one Hangul\n or Han character is enough. It filters rows the walk already returned.\n- **Directed** `NEXT`, `MEMBER_OF`, `RESOLVED_BY` take an arrow. A missing one\n is filled in (with a `notes` line) only when the end labels allow one way, as\n `(a)-[:MEMBER_OF]-(t)` from an event; event-to-event `NEXT` and `RESOLVED_BY`\n still need it. A wrong arrow is rejected, not flipped.\n- No `WITH`, no `CREATE`/`SET` (read-only); conditions go in relation params\n like `{min: 3}`. The user's sentence goes through `params` (`$q`), not inline.\n- Aggregates live in `RETURN`; `cos(a, b)` is the cosine of two event variables.\n Variable length on `NEXT` and `SHARES` only, 1..3: `-[n:NEXT*1..3]->`\n (`n.hops`).\n\n## Relations (the whole vocabulary)\n\n| Relation | Between | Meaning / params |\n|---|---|---|\n| `SHARES {min, min_w}` | event–event | share ≥min entities; carries `s.count`, `s.weight` (rarity-weighted), `s.via` (the shared entities = bridges) |\n| `SIMILAR {k, min}` | event–event | vector nearest neighbours; `f.cos` |\n| `FAR {max}` | event–event | vector distance filter (cos < max) — pair with SHARES for \"connected but semantically far\" |\n| `NEXT {source}` | event→event | conversation/thread order (directional, supports `*1..3`); `n.source` |\n| `RESOLVED_BY {relation}` | event→event | plan or expectation → the event that realized it (directional); `relation`: `realization`; `r.asserted_at`; revoked links excluded |\n| `PARTICIPATED_IN` | entity–event | membership; walk event→entity→event for co-participation |\n| `MEMBER_OF {kind}` | event→tag | tag membership (directional); `kind` is `contains` or `refers` |\n| `CONNECTED` | entity–entity | stored entity co-occurrence edge; `c.event_count` |\n| `SAME_AS` | entity–entity | stored alias edge (exact identity, not fuzzy match); `x.confidence` |\n\n## Recipes\n\n- **Structurally close but semantically far** (the highest-value walk from\n search results — surfaces non-obvious connections):\n `START a = events(ids: $ids) MATCH (a)-[s:SHARES {min: 2}]-(b)-[f:FAR {max: 0.5}]-(a) RETURN b, s.count, s.via, f.cos ORDER BY s.weight DESC LIMIT 10`\n- **What bridges these results** — same query; read `s.via` (shared entities),\n then `find_memories_by_entity` the interesting ones.\n- **Thread / what happened next**:\n `START a = events(ids: $ids) MATCH (a)-[n:NEXT*1..3]->(b) RETURN b.id, b.summary, n.hops ORDER BY n.hops LIMIT 30`\n- **Entity co-participation ranking**:\n `START a = events(text: $q, k: 5) MATCH (a)-[:PARTICIPATED_IN]-(e)-[:PARTICIPATED_IN]-(b) WHERE b.id <> a.id RETURN e.name, count(DISTINCT b) AS n ORDER BY n DESC LIMIT 15`\n- **A and B both appear**: filters before `k` is taken, so a large A does not\n hide the overlap:\n `START a = events(entity_all: [$a, $b], k: 200) RETURN a LIMIT 200`\n Name and tag together: `events(entity: $a, tag: $t, k: 200)`. Add `text: $q`\n (then `k` up to 20) to rank the overlap by meaning.\n- **A or B**: `START a = events(entity: [$a, $b], k: 200) RETURN a LIMIT 200`\n- **Both, switch off** (older way): it keeps only A's newest 200, so an overlap\n further back is missed; say so when `start.hub` is `true`:\n `START a = events(entity: $a, k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n {name: $b}) RETURN DISTINCT a LIMIT 200`\n\nRows are projected small (Event → `{id, summary, timestamp, order_index}`);\nopen full content with `get_memory_content`.\n\n## Reading the response, handling refusals\n\n- `start.scoped_mode`: `exact` means every candidate was measured and only the\n top `k` returned; `filtered_ann` means a large scope was searched through the\n vector index. `start.candidates`: `{count, exact}` (with `exact: false` the\n count is a lower bound); `start.filled: false`: fewer than `k` found within\n budget, not \"the scope ran out\". `filled: false`, a names cap, or a start\n cut by a statement timeout or the deadline (`{stage: \"deadline\", at:\n \"start\"}`) adds a start entry to `truncated` and sets `partial`.\n- **0 rows plus any of those means \"could not confirm\"; 0 rows with nothing cut\n means \"none\".** `notes` says so too, along with clamps and inferred arrows.\n- **Names not found.** `start.unresolved` lists the scope names that matched\n nothing as `{kind, name}`, e.g. `[{\"kind\": \"tag\", \"name\": \"X\"}]`. Entity 'X'\n and tag 'X' are different names: if the entity is found and the tag is not,\n only the tag is listed. Say \"no tag is stored under that spelling\", not \"X\n does not exist\"; it may exist as the other kind. In an any-of part where\n another name was found, the miss shows only in `unresolved`, with no note.\n If a whole part found none of its names, the result is 0 rows with a note\n naming only the names of the part(s) that found nothing, e.g. \"scope: no\n match for entity 'B', tag 'x' - a part of the scope found none of its names,\n so the scope has no rows\": say the name is not stored under that spelling\n for that kind, and check it with `find_memories_by_entity` before calling it\n none.\n- **Caps in force.** With the new syntax on, `budget.caps` carries\n `{start_k_max, start_entity_max, start_scoped_k_max, limit_max}`, the caps\n this server applies (`k` for `text:` and the number of `ids:`, `k` for a\n scope without text, `k` for a scope with text, `LIMIT`). The 20 and 200 above are\n defaults; when telling the user a limit (\"only the newest 200\"), use the\n number from `caps`. `LIMIT` stays at most 200.\n- **More candidates than rows.** `start.has_more: true` — or, where the server\n does not send it, `candidates.count` above the rows the start returned —\n means the scope holds more than came back. `exact` with count 224 and `k` 20\n is the closest 20 of 224; saying \"compared all 224, nothing missing\" is\n wrong. `partial: false` means no budget cut, not \"everything was seen\".\n- Budget caps (`partial` / `truncated`) are **never silent**; `k`, `hub` and\n the default `LIMIT` are separate signals (Grammar above). If truncated,\n narrow instead of retrying the same query: fewer anchors (`k`), tighter\n `SHARES {min}` / `FAR {max}`, smaller `LIMIT`.\n- A rejection returns `{error, blocked_by: syntax|grammar|params, hint?,\n allowed_*}` — read `hint` and the `allowed_*` lists, fix the query once;\n do not loop blind retries.\n- Budget errors (\"statement timeout\") mean the walk was too wide, not that\n the tool is broken.\n\n## Across a link (partner org)\n\n`query_partner_memory_graph(link_id, query, params)` — same language over your org\nplus a linked partner org. `link_id` comes from `list_partner_links`. `START`\nresolves in YOUR org only; the walk crosses sides through entities the link\nhas **aliased** (they count as one entity for `PARTICIPATED_IN`/`SHARES`),\nand `SIMILAR`/`FAR` cross by vector. `NEXT`/`MEMBER_OF`/`CONNECTED` stay\nwithin a side. Returned events carry `side` (`remote` = partner); open remote\ncontent with `get_partner_memory_content`. Remote budgets are tighter —\nprefer small `k` and `LIMIT` first. The new syntax works here too; `CONTAINS`\nsees the home spelling of aliased names. Not every server exposes this tool; if\nabsent, only home queries are available.\n\n## Probe: relation modes and expansion rounds\n\n`find_memory_connections` walks the same entity-event graph without a query language. It\ntakes a `relation` instead of a `MATCH` clause, and its candidates are\nunverified pointers — the same standing as anything the recipes above return.\n\nEntry is not one thing. A sentence-only call rides the vector ranking, so it\nrecovers when you have no ids yet; an `anchor_entity_id` call walks from the\nentity directly and does not depend on the ranking at all. A useful loop is to\nread a bridge entity out of one response and re-call with it as the anchor.\nThat chaining is yours to steer — it is not something the API does for you.\n\nThe relations:\n\n- `similar` (default) — time-stratified neighbours of what the sentence found.\n- `before` / `after` — one side of a point in time. Exactly one of\n `reference_time` (ISO-8601) or `anchor_event_id` is required; there is no\n implicit \"now\".\n- `evolution` — stratifies the candidate pool's own timeline into first\n sighting, transition points (the largest content shift between adjacent\n sightings), and latest sighting. It answers \"how did this develop\". It works\n on the pool your sentence built and returns a handful of stratified picks,\n whereas `list_memory_timeline` returns one entity's full chronology.\n- `contrast` — narrows by cosine and hands back candidates. The engine does\n not judge opposition: semantic tension lives as small displacements inside\n high cosine, not as opposite vectors, so geometry cannot see it. Read the\n candidates and judge contradiction yourself;\n `grounding_basis.contrast_protocol` restates this per call.\n- `explore` — question-free wandering. Requires `anchor_entity_id`, forbids\n `sentence`. There is no cosine axis: candidates are ordered by bridge lift\n (specificity) and recency, with the earliest sighting stratified in, and\n `grounding` comes back as `\"exploration\"` because the existence gate does\n not apply.\n\n`expansion_rounds=2` re-expands from the round-1 picks through bridges that\nround 1 did not use, reaching things two structural steps away. `top_n` caps\ncandidates *per round*, so a 2-round call can return up to twice `top_n` in\ntotal, and each candidate carries its `round` so you can tell how far out it\nsits. Round 2 costs a second walk — reach for it on relational and\n`evolution`-shaped questions rather than on direct lookups.\n\nAcross a link, `find_partner_memory_connections` takes the same inputs plus `link_id`. Entry\nhappens in your org only; the partner side is reached through bridges alone,\nwhich is why it never reports `absent` — check\n`grounding_basis.remote_entry_not_searched` instead.\n"
}SHA-256 of public snapshot: e8b75618ffc3a69b51bd3079678854485227c6d22f1d69b4deb6dadddfa6d8ed