=============== LIBRARY RULES =============== From library maintainers: - The MCP endpoint is https://mcp.aiakiv.com/mcp. The path MUST end with /mcp (before any ?); the bare host (mcp.aiakiv.com) connects but exposes ZERO tools. Never guess a brand-domain URL like aiakiv.com/mcp. - AiAkiv is a HOSTED service (operated by OnMinimum), not an anonymous/public server. Connecting requires signing in via OAuth, or a project-bound API key (Gemini CLI). There is no keyless anonymous mode. - In ChatGPT and Codex, AiAkiv is listed in the plugin directory as AiAkiv Memory. Elsewhere it is not in a connector directory: add it manually as a custom connector with https://mcp.aiakiv.com/mcp?apps=all (same endpoint, app features on). - Memory is addressed as Team -> Project -> Domain. A Project is a named save-target; it can carry a PERSONA (a role the connected AI adopts). Project names are English-only (they ride in an HTTP header). - Folder clients (Claude Code, Cursor) pick a project in the URL: https://mcp.aiakiv.com/mcp?project= (URL-encode it); Gemini CLI and Codex use a project API key. Web clients (Claude Web, ChatGPT, Grok) follow Main: create project, set Main, connect. - Antigravity: its app-wide mcp_config.json supports headers, so a project API key in Authorization pins the project. The remote key MUST be `serverUrl` (`url`, `httpUrl`, `type` are rejected). Open: Agent panel > MCP Servers > Manage > View raw config. - Saving is explicit: only on an 'ak' command (e.g. 'ak save'). Never save on a bare 'remember' / 'save'. To recall, call search_memory(query) with the user's actual question as a full sentence. - Projects, teams, keys, Main-switching, and personas are managed by the human in the console at https://aiakiv.com. An AI can change them only through the console app, after the user turns the matching AI permission on. ### Complete grammar example with START, MATCH, WHERE, RETURN Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Shows the full query structure: START with events() scopes, optional MATCH with SHARES relation, optional WHERE, and RETURN with ordering and limit. Use as a template for queries combining scoped starts and relation matching. ```aiakiv-query START a = events(text: $q, k: 5) ← always events START a = events(entity: $name) newest of the entity's events START a = events(ids: [$id1, $id2]) START a = events(tag: $t, k: 20) newest in the tag START a = events(entity: $name, text: $q, k: 20) entity's events closest to $q START a = events(tag: $t, text: $q, k: 20) tag's events closest to $q START a = events(entity: ["A", "B"], k: 200) events with A or B (tag: [...] too) START a = events(entity_all: ["A", "B"], k: 200) events with A and B (tag_all: too) START a = events(entity: $n, tag: $t, text: $q) in both scopes, closest to $q MATCH (a)-[s:SHARES {min: 2}]-(b) ← zero or more WHERE b.id <> a.id ← optional RETURN b, s.count, s.via ORDER BY s.weight DESC LIMIT 20 ``` -------------------------------- ### Install AiAkiv locally for development Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/README.md Adds a local marketplace from the K2G repo root and installs the aiakiv plugin. The marketplace registers under the name 'aiakiv', so the install command is identical to the production one. ```shell /plugin marketplace add ./packaging/plugins /plugin install aiakiv@aiakiv ``` -------------------------------- ### Install AiAkiv from marketplace Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/README.md Adds the AiAkiv plugin marketplace and installs the aiakiv plugin. Run these commands in Claude Code. ```shell /plugin marketplace add aiakiv/aiakiv-plugins /plugin install aiakiv@aiakiv ``` -------------------------------- ### Codex CLI install commands Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/docs/connect.md Register the AiAkiv MCP server and install skills manually in a terminal. The first command adds the server with `apps=all`; the second installs the seven AiAkiv skills from the public repository. This connection is account-wide and follows Main. ```bash codex mcp add AiAkiv --url "https://mcp.aiakiv.com/mcp?apps=all" npx skills add AiAkiv/aiakiv-plugins -a codex -s '*' -g -y ``` -------------------------------- ### No MATCH query with score ordering Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Use when the start itself is the answer; returns the start event and its score, ordered by score descending then id. Requires start text for score. ```aiakiv-query START a = events(entity: $name, text: $q, k: 20) RETURN a, a.score ORDER BY a.score DESC, a.id ``` -------------------------------- ### ak graph query examples for translating requests Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Three example requests and their corresponding ak graph queries, adapted to user's memory names and language. The first two use text search with k: 20; the third uses k: 200 because the default k 5 would only walk the five newest Redis memories. The third example includes a CONTAINS filter and LIMIT 200. ```text ak graph among the memories linked to BP-7, the discussion that set plan pricing START a = events(entity: "BP-7", text: $q, k: 20) RETURN a, a.score params {"q": "the discussion that set plan pricing"} ak graph inside the ops tag, the records of a backup restore drill START a = events(tag: "ops", text: $q, k: 20) RETURN a, a.score params {"q": "the records of a backup restore drill"} ak graph every entity that shares a memory with Redis and has cache in its name START a = events(entity: "Redis", k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n) WHERE n.name CONTAINS "cache" RETURN DISTINCT n.name LIMIT 200 ``` -------------------------------- ### Install AiAkiv plugin in Claude Code Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/README.md Install the AiAkiv plugin in Claude Code. On first use, Claude Code opens an OAuth login in your browser; after signing in and approving, the mweft_* memory tools appear. ```shell /plugin marketplace add aiakiv/aiakiv-plugins /plugin install aiakiv@aiakiv ``` -------------------------------- ### Run aiakiv console create_project with JSON data Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-dashboard/SKILL.md Use to create a project named 'launch-notes'. If it succeeds, the project is created and saves still go to the current Main until the user switches it. ```bash npx aiakiv console create_project --data '{"name":"launch-notes"}' --json ``` -------------------------------- ### Antigravity mcp_config.json with serverUrl and headers Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/docs/connect.md App-wide MCP config for Antigravity. Uses the strict `serverUrl` key (others are rejected) and pins the project via a project-scoped API key in the `Authorization` header. Main does not apply; swap the key to change projects. ```json { "mcpServers": { "AiAkiv": { "serverUrl": "https://mcp.aiakiv.com/mcp", "headers": { "Authorization": "Bearer " } } } } ``` -------------------------------- ### JSON MCP config for Claude/Cursor Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/docs/connect.md Configure the AiAkiv MCP server in `.mcp.json` (Claude Code / Claude Desktop) or `.cursor/mcp.json` (Cursor). URL-encode the project name if it has spaces or non-ASCII characters. Name the project in the address, not only in an `X-K2G-Project` header, because some clients do not send custom headers on every request. ```json { "mcpServers": { "AiAkiv": { "type": "http", "url": "https://mcp.aiakiv.com/mcp?project=" } } } ``` -------------------------------- ### Bind a folder to a project with .mcp.json Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-onboarding/SKILL.md Place this .mcp.json in a folder to pin its memory to a specific project. The URL must include the project name; URL-encode names with spaces or non-ASCII characters. Changing the project may trigger an OAuth login prompt. ```json { "mcpServers": { "AiAkiv": { "type": "http", "url": "https://mcp.aiakiv.com/mcp?project=" } } } ``` -------------------------------- ### JSON MCP config for Gemini CLI Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/docs/connect.md Configure the AiAkiv MCP server in `.gemini/settings.json` for Gemini CLI only. Use a project-bound API key issued per project in the console; it is shown only once. ```json { "mcpServers": { "AiAkiv": { "httpUrl": "https://mcp.aiakiv.com/mcp", "headers": { "Authorization": "Bearer " } } } } ``` -------------------------------- ### TOML MCP config for Codex Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/docs/connect.md Pin a folder to a specific project in Codex/Codex CLI using a project-bound API key. The sign-in folder binding does not work in this client, so use this TOML configuration. Issue the API key per project in the console; it is shown only once. ```toml [mcp_servers.AiAkiv] url = "https://mcp.aiakiv.com/mcp" http_headers = { "Authorization" = "Bearer " } ``` -------------------------------- ### find_partner_memory_connections(relation, params, link_id) Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Same as `find_memory_connections` but across a linked partner org. Entry happens in your org only; the partner side is reached through bridges alone. It never reports `absent` — check `grounding_basis.remote_entry_not_searched` instead. ```APIDOC ## find_partner_memory_connections(relation, params, link_id) ### Description Same as `find_memory_connections` but across a linked partner org. Entry happens in your org only; the partner side is reached through bridges alone. It never reports `absent` — check `grounding_basis.remote_entry_not_searched` instead. ### Parameters - **relation** (string) - Required - The relation mode (same as `find_memory_connections`). - **params** (object) - Required - Additional parameters (same as `find_memory_connections`). - **link_id** (string) - Required - The link identifier from `list_partner_links`. ### Notes - Entry happens in your org only; the partner side is reached through bridges alone. - It never reports `absent` — check `grounding_basis.remote_entry_not_searched` instead. ``` -------------------------------- ### query_partner_memory_graph(link_id, query, params) Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Queries the memory graph across a linked partner org. The query language is the same as for home queries, but the walk crosses sides through aliased entities. Returned events carry a 'side' field to indicate remote content. ```APIDOC ## query_partner_memory_graph(link_id, query, params) ### Description Queries the memory graph across a linked partner org. The query language is the same as for home queries, but the walk crosses sides through aliased entities. Returned events carry a 'side' field to indicate remote content. ### Parameters - **link_id** (string) - Required - The link identifier from `list_partner_links`. - **query** (string) - Required - The query in the same language as home queries. - **params** (object) - Required - Additional parameters for the query. ### Notes - `START` resolves in your org only; the walk crosses sides through entities the link has aliased (they count as one entity for `PARTICIPATED_IN`/`SHARES`). - `SIMILAR`/`FAR` cross by vector. - `NEXT`/`MEMBER_OF`/`CONNECTED` stay within a side. - Returned events carry `side` (`remote` = partner); open remote content with `get_partner_memory_content`. - Remote budgets are tighter — prefer small `k` and `LIMIT` first. - The new syntax works here too; `CONTAINS` sees the home spelling of aliased names. - Not every server exposes this tool; if absent, only home queries are available. ``` -------------------------------- ### Run AiAkiv dashboard commands Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-dashboard/SKILL.md Use these commands to manage the AiAkiv account from a shell. The CLI uses the API key of the current folder, and the server decides what the key may do. Pass --dir when the AiAkiv folder is not the current one. ```bash npx aiakiv dashboard [--json] [--dir ] npx aiakiv console describe --json npx aiakiv console [--data '' | --data @file.json] [--json] [--dir ] [--yes] npx aiakiv console key [--expires-days N] [--dir ] ``` -------------------------------- ### Run aiakiv console invite_member with --yes Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-dashboard/SKILL.md Use to invite a member to a team after user confirmation. The command requires the --yes flag to proceed. ```bash npx aiakiv console invite_member --yes ``` -------------------------------- ### Run aiakiv console teams --json Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-dashboard/SKILL.md Use to list the user's teams. The output is JSON, which can be used to answer questions like 'What teams am I in?'. ```bash npx aiakiv console teams --json ``` -------------------------------- ### find_memory_connections(relation, params) Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Walks the same entity-event graph without a query language. Takes a `relation` instead of a `MATCH` clause, and its candidates are unverified pointers. Supports multiple relation modes and optional expansion rounds. ```APIDOC ## find_memory_connections(relation, params) ### Description Walks the same entity-event graph without a query language. Takes a `relation` instead of a `MATCH` clause, and its candidates are unverified pointers. Supports multiple relation modes and optional expansion rounds. ### Parameters - **relation** (string) - Required - The relation mode: `similar` (default), `before`, `after`, `evolution`, `contrast`, or `explore`. - **sentence** (string) - Optional - A sentence for vector ranking. Required for `similar`, `before`, `after`, `evolution`, `contrast`; forbidden for `explore`. - **anchor_entity_id** (string) - Optional - An entity ID to walk from directly. Required for `explore`; optional for others. - **reference_time** (string) - Optional - ISO-8601 timestamp. Required for `before`/`after` if `anchor_event_id` is not provided. - **anchor_event_id** (string) - Optional - An event ID. Required for `before`/`after` if `reference_time` is not provided. - **expansion_rounds** (integer) - Optional - Number of expansion rounds (default 1). `2` re-expands from round-1 picks through bridges that round 1 did not use. - **top_n** (integer) - Optional - Caps candidates per round. A 2-round call can return up to twice `top_n` in total. ### Relation Modes - **similar** (default) — time-stratified neighbours of what the sentence found. - **before** / **after** — one side of a point in time. Exactly one of `reference_time` or `anchor_event_id` is required; there is no implicit "now". - **evolution** — stratifies the candidate pool's own timeline into first sighting, transition points, and latest sighting. Works on the pool your sentence built and returns a handful of stratified picks. - **contrast** — narrows by cosine and hands back candidates. The engine does not judge opposition; read the candidates and judge contradiction yourself. `grounding_basis.contrast_protocol` restates this per call. - **explore** — question-free wandering. Requires `anchor_entity_id`, forbids `sentence`. Candidates are ordered by bridge lift (specificity) and recency, with the earliest sighting stratified in. `grounding` comes back as `"exploration"`. ### Response Each candidate carries its `round` so you can tell how far out it sits. Round 2 costs a second walk — reach for it on relational and `evolution`-shaped questions rather than on direct lookups. ``` -------------------------------- ### NEXT: thread / what happened next Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Walks the directional NEXT relation (1 to 3 hops) from a set of events to find subsequent events in a conversation or thread. Returns the event ID, summary, and hop count, ordered by hops. Use to explore what happened next after given events. ```cypher 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 ``` -------------------------------- ### events(entity + tag): name and tag together Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Finds events that contain a given entity and are tagged with a given tag. Returns up to 200 events. Add text: $q (with k up to 20) to rank the overlap by meaning. ```cypher events(entity: $a, tag: $t, k: 200) ``` -------------------------------- ### Variable-length NEXT relation Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Shows variable-length traversal on NEXT with hops 1..3, exposing n.hops. Only NEXT and SHARES support variable length. ```aiakiv-query -[n:NEXT*1..3]-> ``` -------------------------------- ### events(entity_all): A and B both appear Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Finds events that contain both entity A and entity B. The entity_all filter is applied before k is taken, so a large A does not hide the overlap. Returns up to 200 events. Add text: $q (with k up to 20) to rank the overlap by meaning. ```cypher START a = events(entity_all: [$a, $b], k: 200) RETURN a LIMIT 200 ``` -------------------------------- ### get_node Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-contents/SKILL.md Retrieves a node (e.g., a scene) with language-specific data. Use this before writing or translating a body to obtain the merged form settings, language pack brief, and continuity information for the specified language. ```APIDOC ## get_node ### Description Retrieves a node (e.g., a scene) with language-specific data. Use this before writing or translating a body to obtain the merged form settings, language pack brief, and continuity information for the specified language. ### Method GET ### Endpoint `get_node` ### Parameters #### Query Parameters - **data.lang** (string) - Optional - The language for which to retrieve the node. If omitted, defaults to the body's language for a body node, or the work's default language. ### Response #### Success Response (200) - **form** (object) - The merged form settings, with `slots` holding the values, `sources` naming which setting gave each value, and `texts` holding each setting's description, far to near. - **language** (object|null) - The language pack brief, with `relation_map`, `rendering_rules`, `typography`, `tells`, and `asks`. `null` when the app has no pack for that language. - **continuity.withhold** (object) - What earlier scenes' beats still withhold (the latest five scenes with beats, up to 40 items, `truncated` when cut). #### Response Example ```json { "form": { "slots": {}, "sources": {}, "texts": [] }, "language": { "relation_map": {}, "rendering_rules": {}, "typography": {}, "tells": {}, "asks": {} }, "continuity": { "withhold": { "items": [], "truncated": false } } } ``` ``` -------------------------------- ### Recovery: retry with payload (JSON object) Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-save-and-recall/SKILL.md Use this JSON object as the `payload` argument to retry a save when multi-argument calls fail due to merged, empty, or serialization-error arguments. The payload is a single argument with no boundary to collapse; other arguments are ignored. This is the recovery path, not the default. ```json {"summary": "...", "entities": [{"name": "X", "type": "Y"}], "tags": ["a/b"], "content": "..."} ``` -------------------------------- ### Both, switch off (older way): PARTICIPATED_IN filter Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Older approach to find events containing both A and B. It first retrieves A's newest 200 events, then filters those that also contain B. Because it only keeps A's newest 200, an overlap further back is missed. Use when start.hub is true. ```cypher START a = events(entity: $a, k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n {name: $b}) RETURN DISTINCT a LIMIT 200 ``` -------------------------------- ### PARTICIPATED_IN: entity co-participation ranking Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Ranks entities by how many distinct events they co-participate in with the top 5 events matching a text query. Returns entity name and count of distinct co-participating events, ordered by count descending. Use to find entities that frequently appear together with the query results. ```cypher 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 ``` -------------------------------- ### events(entity): A or B Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Finds events that contain either entity A or entity B. Returns up to 200 events. Use when you want events matching at least one of the entities. ```cypher START a = events(entity: [$a, $b], k: 200) RETURN a LIMIT 200 ``` -------------------------------- ### Retry save_memory via payload argument Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-onboarding/SKILL.md Use this single-argument form to recover from mangled save_memory calls caused by long or multi-line content or non-ASCII punctuation. The payload argument accepts a JSON object or string; other arguments are ignored when payload is provided. ```plaintext payload={"summary": "...", "entities": [{"name": "X", "type": "Y"}], "tags": ["a/b"], "content": "..."} ``` -------------------------------- ### SHARES + FAR: structurally close but semantically far Source: https://github.com/aiakiv/aiakiv-plugins/blob/main/aiakiv/skills/aiakiv-graph-query/SKILL.md Finds events that share at least 2 entities with a given event but are semantically far (cosine similarity < 0.5). Returns the event, shared entity count, shared entities (bridges), and cosine similarity, ordered by rarity-weighted weight. Useful for surfacing non-obvious connections from search results. ```cypher 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 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.