@yugabytedb/meko-mcp 1.0.8 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +242 -44
- package/assets/hooks-handlers/before-submit-prompt.sh +44 -0
- package/assets/hooks-handlers/cursor-session-start.sh +42 -0
- package/assets/hooks-handlers/lib/capture.js +457 -107
- package/assets/hooks-handlers/lib/package.json +1 -0
- package/assets/hooks-handlers/test_single_conversation.sh +1 -1
- package/assets/scripts/package-desktop-skill.sh +36 -0
- package/assets/skills/meko-mcp-tools/SKILL.md +167 -53
- package/assets/skills/meko-mcp-tools/references/_sections.md +1 -1
- package/assets/skills/meko-mcp-tools/references/tools-agent-id-conventions.md +84 -22
- package/assets/skills/meko-mcp-tools/references/tools-cookbook.md +89 -56
- package/assets/skills/meko-mcp-tools/references/tools-datapack-workflow.md +15 -7
- package/assets/skills/meko-mcp-tools/references/tools-known-limitations.md +17 -9
- package/assets/skills/meko-mcp-tools/references/tools-memory-vs-conversation.md +94 -5
- package/assets/skills/meko-mcp-tools/references/tools-overview.md +52 -37
- package/assets/skills/meko-mcp-tools/references/tools-rag-workflow.md +108 -37
- package/assets/skills/meko-mcp-tools/references/tools-scope-permissions.md +6 -10
- package/assets/skills/meko-mcp-tools/references/tools-troubleshooting.md +30 -18
- package/assets/skills/meko-mcp-tools/references/tools-user-id-conventions.md +55 -69
- package/assets/skills/meko-mcp-tools-desktop/SKILL.md +251 -0
- package/assets/skills/meko-mcp-tools-desktop/desktop/README.md +150 -0
- package/assets/skills/meko-mcp-tools-desktop/references/_sections.md +24 -0
- package/assets/skills/meko-mcp-tools-desktop/references/tools-agent-id-conventions.md +99 -0
- package/assets/skills/meko-mcp-tools-desktop/references/tools-cookbook.md +406 -0
- package/assets/skills/meko-mcp-tools-desktop/references/tools-known-limitations.md +69 -0
- package/assets/skills/meko-mcp-tools-desktop/references/tools-memory-vs-conversation.md +217 -0
- package/assets/skills/meko-mcp-tools-desktop/references/tools-overview.md +112 -0
- package/assets/skills/meko-mcp-tools-desktop/references/tools-rag-workflow.md +134 -0
- package/assets/skills/meko-mcp-tools-desktop/references/tools-scope-permissions.md +75 -0
- package/assets/skills/meko-mcp-tools-desktop/references/tools-troubleshooting.md +155 -0
- package/bin/create-meko-setup.mjs +151 -22
- package/lib/clients/claude-code.mjs +378 -68
- package/lib/clients/claude-desktop.mjs +45 -8
- package/lib/clients/codex.mjs +1209 -0
- package/lib/clients/common.mjs +223 -1
- package/lib/clients/cursor.mjs +118 -13
- package/lib/clients/index.mjs +2 -0
- package/lib/config.mjs +56 -0
- package/lib/detect.mjs +52 -44
- package/lib/installer.mjs +11 -4
- package/lib/mcp-transport.mjs +61 -2
- package/lib/migrate/adapters/memory-md.mjs +13 -6
- package/lib/migrate/datapack.mjs +167 -0
- package/lib/migrate/id.mjs +127 -9
- package/lib/migrate/orchestrator.mjs +68 -10
- package/lib/migrate.mjs +346 -3
- package/lib/prompt.mjs +22 -4
- package/lib/validate.mjs +313 -9
- package/lib/version-check.mjs +178 -0
- package/package.json +2 -1
- package/scripts/bundle-assets.mjs +8 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "commonjs" }
|
|
@@ -17,7 +17,7 @@ set -euo pipefail
|
|
|
17
17
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
18
18
|
CAPTURE_JS="$SCRIPT_DIR/lib/capture.js"
|
|
19
19
|
MCP_URL="${1:-${MEKO_MCP_URL:-http://localhost:8000/mcp}}"
|
|
20
|
-
AGENT_ID="${MEKO_AGENT_ID:-
|
|
20
|
+
AGENT_ID="${MEKO_AGENT_ID:-agent}"
|
|
21
21
|
|
|
22
22
|
# Temp dirs for isolation
|
|
23
23
|
WATERMARK_DIR="$(mktemp -d -t meko-test-wm-XXXXXX)"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Package meko-mcp-tools-desktop as a .skill file for Claude Desktop distribution.
|
|
3
|
+
# Usage: bash scripts/package-desktop-skill.sh
|
|
4
|
+
# Output: meko-mcp-tools-desktop.skill (ZIP archive)
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
9
|
+
SKILLS_ROOT="$SCRIPT_DIR/../skills"
|
|
10
|
+
SKILL_NAME="meko-mcp-tools-desktop"
|
|
11
|
+
OUTPUT="$SCRIPT_DIR/../$SKILL_NAME.skill"
|
|
12
|
+
|
|
13
|
+
if [ ! -d "$SKILLS_ROOT/$SKILL_NAME" ]; then
|
|
14
|
+
echo "Error: Skill directory not found at $SKILLS_ROOT/$SKILL_NAME" >&2
|
|
15
|
+
exit 1
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
if [ ! -f "$SKILLS_ROOT/$SKILL_NAME/SKILL.md" ]; then
|
|
19
|
+
echo "Error: SKILL.md not found in $SKILLS_ROOT/$SKILL_NAME/" >&2
|
|
20
|
+
exit 1
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# Remove previous build if it exists
|
|
24
|
+
rm -f "$OUTPUT"
|
|
25
|
+
|
|
26
|
+
# Package skill + references (exclude OS artifacts and desktop README)
|
|
27
|
+
cd "$SKILLS_ROOT"
|
|
28
|
+
zip -r "$OUTPUT" \
|
|
29
|
+
"$SKILL_NAME/SKILL.md" \
|
|
30
|
+
"$SKILL_NAME/references/" \
|
|
31
|
+
-x "*.DS_Store" "*__pycache__*"
|
|
32
|
+
|
|
33
|
+
echo "Created $OUTPUT ($(du -h "$OUTPUT" | cut -f1))"
|
|
34
|
+
echo ""
|
|
35
|
+
echo "Contents:"
|
|
36
|
+
unzip -l "$OUTPUT" | grep -E "^\s+[0-9]" | grep -v "files$"
|
|
@@ -4,53 +4,55 @@ description: Behavioral guide for AI agents using Meko MCP tools. Triggers when
|
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
author: Meko
|
|
7
|
-
version: "2.
|
|
7
|
+
version: "2.3.0"
|
|
8
8
|
tags: mcp, yugabytedb, tools, datapack, memory, conversation, rag, meko
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Meko MCP Tools — Agent Behavioral Guide
|
|
12
12
|
|
|
13
|
-
Meko is agent-native data infrastructure that enables continuous learning from context windows through collective memory and shared knowledge. This skill teaches you how to use Meko's
|
|
13
|
+
Meko is agent-native data infrastructure that enables continuous learning from context windows through collective memory and shared knowledge. This skill teaches you how to use Meko's 26 MCP tools — and more importantly, **when to use them proactively** without waiting to be asked.
|
|
14
14
|
|
|
15
15
|
## What Meko enables
|
|
16
16
|
|
|
17
17
|
Meko turns your volatile context window into persistent, shareable knowledge:
|
|
18
18
|
|
|
19
|
-
- **Personal memory** — Store who the user is, their preferences, role, and working style. Survives across sessions.
|
|
20
|
-
- **Team
|
|
21
|
-
- **Shared knowledge** — Persist domain knowledge (product specs, data dictionaries, research) into a searchable knowledge base via RAG.
|
|
19
|
+
- **Personal memory** — Store who the user is, their preferences, role, and working style. Private to you (scoped per-user and per-agent). Survives across sessions.
|
|
20
|
+
- **Team-shared knowledge** — When the user promotes important memories from the Cloud UI's Learnings tab (or uploads documents via **Add Knowledge**), the content becomes visible to every member of the datapack. Queryable via `knowledgebase_search`.
|
|
22
21
|
- **Conversation history** — Preserve full dialog exchanges with reasoning traces for audit, replay, and learning transfer.
|
|
23
22
|
- **Decision traces** — Capture how and why decisions were made, enabling debugging and continuous improvement.
|
|
24
|
-
- **Structured data** — Store and query tabular data in a real database, not squeezed into memory.
|
|
25
23
|
|
|
26
24
|
## When to use this skill
|
|
27
25
|
|
|
28
|
-
- You are calling tools on a Meko
|
|
29
|
-
- You need to decide what to store, where, and how
|
|
30
|
-
- You
|
|
31
|
-
- You are
|
|
32
|
-
- You
|
|
33
|
-
- You want to understand scope/permission requirements, `agent_id` constraints, or `datapack_id` routing
|
|
26
|
+
- You are calling tools on a Meko MCP server
|
|
27
|
+
- You need to decide what to store, where, and how (personal memory vs. team-shared knowledge)
|
|
28
|
+
- You want to search the team's shared knowledge base (`knowledgebase_search`)
|
|
29
|
+
- You are managing datapacks
|
|
30
|
+
- You want to understand scope/permission requirements, `agent_id` conventions, or `datapack_id` routing
|
|
34
31
|
|
|
35
|
-
##
|
|
32
|
+
## `agent_id` — multi-agent identity
|
|
36
33
|
|
|
37
|
-
`agent_id`
|
|
34
|
+
`agent_id` identifies which agent wrote a memory or conversation. It is **not a constant**. On Cloud Meko today, different agents (Claude Code, Cursor, Claude Desktop — and different projects within each) each use their own `agent_id`, and the Cloud UI renders the value as a badge on every row.
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
**Three buckets:**
|
|
40
37
|
|
|
41
|
-
|
|
38
|
+
- **Project bucket** — `<client>:<repo-basename>`, e.g. `claude_code:meko-mcp-server`. The default for almost every memory in a coding session. The hook derives it from the cwd and injects it via SessionStart `additionalContext`.
|
|
39
|
+
- **Common bucket** — `meko_agent`. The cross-project bucket for facts any agent should see regardless of project (user identity, global preferences). Empty / missing `agent_id` lands here automatically; you can also pass it explicitly.
|
|
40
|
+
- **Loose name** — non-coding clients (Claude Desktop, generic MCP) use a stable client name like `claude_desktop`. Not relevant in this skill (Claude Code is a coding agent).
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
4. Cache the chosen value. Use it for every `memory_*` and `conversation_*` call in this session.
|
|
42
|
+
```
|
|
43
|
+
agent_id = "claude_code:meko-mcp-server" # this session's project bucket
|
|
44
|
+
agent_id = "meko_agent" # cross-project facts
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The SessionStart hook injects the project-bucket value into the first-turn `additionalContext`. Use that value verbatim for project-scoped Meko MCP calls in this session; do not re-derive it. Use `meko_agent` explicitly when you want a write or read to span projects.
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
**Read scoping varies by tool:**
|
|
50
|
+
- `memory_search` / `memory_get_all` / `conversation_list` / `conversation_get` — scoped to `(datapack_id, user_id, agent_id)`. Each agent_id is its own bucket; pass the exact value you want to read from. Empty/whitespace gets rewritten to `meko_agent` server-side, so it returns common-bucket rows only — **not** a cross-agent fan-out.
|
|
51
|
+
- `knowledgebase_search` — scoped to `(datapack_id)` only. `agent_id` on the request is **ignored**; you see the team's shared knowledge regardless of what you pass. Includes uploaded documents and memories that the user promoted via the UI's "Promote to Knowledge" flow.
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
See `tools-agent-id-conventions.md` for the full model, including how promotion works and how to phrase broad-query responses to the user.
|
|
54
|
+
|
|
55
|
+
Some pre-existing rows in real datapacks use the older `agent_id="agent"` constant or other ad-hoc shapes (`claude_code`, `cursor:<slug>`). They remain readable — query them with `agent_id="agent"` explicitly. New writes should follow the schema above.
|
|
54
56
|
|
|
55
57
|
## Critical: Use Meko tools, not local storage
|
|
56
58
|
|
|
@@ -62,6 +64,54 @@ The SessionStart hook may seed a `conversation_id` in the watermark, but it does
|
|
|
62
64
|
|
|
63
65
|
If a Meko tool call fails, you may fall back to local storage and tell the user — but Meko is always the first choice.
|
|
64
66
|
|
|
67
|
+
## When spawning subagents
|
|
68
|
+
|
|
69
|
+
Subagents (dispatched via the `Agent` / `Task` tool) do **not** receive the SessionStart `additionalContext` block. If they touch Meko, they either invoke tools with a nil-UUID `conversation_id` (orphaned from the parent's trace) or guess an `agent_id` / fabricate a `conversation_id` (split namespace, broken trace). A 2026-04-30 probe found 5 orphan memories written by a general-purpose subagent.
|
|
70
|
+
|
|
71
|
+
### Rule (parent's responsibility)
|
|
72
|
+
|
|
73
|
+
**Every spawn prompt MUST prepend an inherited-context block** with the parent's actual `agent_id` and `conversation_id`:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
Meko context (inherited from parent session):
|
|
77
|
+
- agent_id: "<parent's agent_id, verbatim>"
|
|
78
|
+
- conversation_id: "<parent's conversation_id>"
|
|
79
|
+
- Use these for all Meko MCP calls. Consult the meko-mcp-tools skill first for anything novel; do not re-derive these values.
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Both values come from the SessionStart `additionalContext` that was injected into your first turn. Pass them through verbatim — the `agent_id` is not a fixed constant; it reflects the client + project the parent is running in.
|
|
83
|
+
|
|
84
|
+
**Default: inject unconditionally.** The skill-listing heuristic (subagent seeing `meko-agent-skills:meko-mcp-tools` in its available skills) is unreliable, and injecting a 4-line block costs nothing. Don't try to predict whether the subagent will touch Meko — inject always.
|
|
85
|
+
|
|
86
|
+
### What the subagent does with it
|
|
87
|
+
|
|
88
|
+
The subagent treats the block as authoritative. Apply this hierarchy in order:
|
|
89
|
+
|
|
90
|
+
1. **Default: reuse the inherited `conversation_id`.** The parent decides scope. Do NOT re-derive these values. Do NOT create a fresh conversation on a "feels separate" judgment — a separate-feeling task is not an explicit signal.
|
|
91
|
+
2. **Exception: create a new conversation only when the spawn prompt (or user) explicitly says so.** An explicit signal means the parent's prompt says something like "use a fresh conversation" or "start your own conversation scope," or the user directly asks for one. Absent that signal, reuse.
|
|
92
|
+
|
|
93
|
+
Whichever path applies, always use the inherited `agent_id` as-is — do not replace it, slugify it, or fall back to a constant.
|
|
94
|
+
|
|
95
|
+
If the inherited block is **absent**, the subagent MUST NOT guess — see the self-diagnosis subsection below.
|
|
96
|
+
|
|
97
|
+
### You may be a subagent — self-diagnosis
|
|
98
|
+
|
|
99
|
+
**Tell-tale signs:**
|
|
100
|
+
- You did NOT receive a SessionStart `additionalContext` block naming a Meko `conversation_id`.
|
|
101
|
+
- You see `meko-agent-skills:meko-mcp-tools` in your available skills but no watermark / inherited-context reference in your initial prompt.
|
|
102
|
+
- Your spawn prompt mentions you were "spawned" / "dispatched" / "launched" by a parent, or mentions a `Task` / `Agent` tool.
|
|
103
|
+
|
|
104
|
+
**What to do:**
|
|
105
|
+
- Look for a `Meko context (inherited from parent session):` block in the spawn prompt. If present, use those values verbatim for every Meko MCP call.
|
|
106
|
+
- If absent, **refuse to invoke Meko write tools** and respond to the parent with a clarification request: ask for the parent's `agent_id` and `conversation_id`. The parent can re-dispatch with the block prepended.
|
|
107
|
+
|
|
108
|
+
**What NOT to do:**
|
|
109
|
+
- Do NOT fall back to the nil UUID (`"00000000-0000-0000-0000-000000000000"`) for `conversation_id` — that's an orphan-write pattern.
|
|
110
|
+
- Do NOT invent an `agent_id`. The right value is whatever the parent is using (typically `claude_code:<repo-basename>`); don't assume `"agent"`, `"claude-code"`, `"meko_agent"`, or a different basename. Ask.
|
|
111
|
+
- Do NOT silently create your own conversation to "just get moving" — ask the parent.
|
|
112
|
+
|
|
113
|
+
Subagents cannot auto-discover the parent's watermark today: Claude Code does not expose a `CLAUDE_PARENT_SESSION_ID` env var or any equivalent marker file to subagent processes (see the spike note in `skills/hooks-handlers/lib/capture.js`). Prompt injection is the only enforcement mechanism.
|
|
114
|
+
|
|
65
115
|
## Core principle: Be Meko's persistent brain
|
|
66
116
|
|
|
67
117
|
**Do not wait for the user to say "save this to memory."** Proactively store context that would be valuable in future sessions. Think of Meko as your long-term memory that persists across conversations.
|
|
@@ -73,12 +123,14 @@ If a Meko tool call fails, you may fall back to local storage and tell the user
|
|
|
73
123
|
| User shares personal info ("I'm Amiram", "I'm a VP of Product") | Store as personal memory immediately | `memory_add` |
|
|
74
124
|
| User states a preference ("I prefer dark mode", "always use Python") | Store as personal preference | `memory_add` |
|
|
75
125
|
| User shares org convention ("we write in Go", "our standard is X") | Store as organizational memory | `memory_add` |
|
|
76
|
-
| User teaches domain knowledge ("Meko traces are decision traces") | Store as memory
|
|
126
|
+
| User teaches domain knowledge ("Meko traces are decision traces") | Store as memory; consider suggesting they promote it to Shared Knowledge from the Learnings tab | `memory_add` |
|
|
77
127
|
| User corrects your behavior ("don't do X, do Y instead") | Store the correction as a learning | `memory_add` |
|
|
78
|
-
| User asks "what do you know about X?" |
|
|
128
|
+
| User asks "what do you know about X?" | Three-call sweep: your project's memories, then the cross-project common bucket, then team-shared knowledge | `memory_search(agent_id=<yours>)` → `memory_search(agent_id="meko_agent")` → `knowledgebase_search` |
|
|
129
|
+
| User asks "what do we (as a team) know about X?" or about uploaded documents | Query the team's Shared Knowledge directly | `knowledgebase_search` (returns uploaded docs + promoted memories) |
|
|
79
130
|
| Session produced a valuable multi-turn exchange | Preserve the full conversation | `conversation_create` + `conversation_add_message` |
|
|
80
|
-
| Significant learnings accumulated during session | Offer to persist key takeaways | Summarize and propose `memory_add` calls |
|
|
81
|
-
| User provides structured/tabular data (CSV, data dictionary) | Store as
|
|
131
|
+
| Significant learnings accumulated during session | Offer to persist key takeaways; remind the user they can promote important ones to Shared Knowledge from the Cloud UI | Summarize and propose `memory_add` calls |
|
|
132
|
+
| User provides structured/tabular data (CSV, data dictionary) | Not natively supported via MCP on Cloud today — `db_run_write_query` returns `{"error": "not_available"}`. Store the key facts as memories or point the user at the UI's knowledge-base upload for file form | `memory_add` for facts, UI "Add Knowledge" for files |
|
|
133
|
+
| User wants to add documents to the team's knowledge base | Point them at the Cloud UI flow — Datapack → Actions → **Add Knowledge** (PDF/TXT/MD/JSON/MP4, 5MB each, 10/batch). The MCP ingestion tools are not available on Cloud. | UI only |
|
|
82
134
|
|
|
83
135
|
### Information classification
|
|
84
136
|
|
|
@@ -89,19 +141,21 @@ User says something → Classify:
|
|
|
89
141
|
├── About themselves (name, role, preferences)
|
|
90
142
|
│ → memory_add — personal profile
|
|
91
143
|
├── About how their team/org works (conventions, standards, policies)
|
|
92
|
-
│ → memory_add —
|
|
144
|
+
│ → memory_add — personal memory; the user can promote it to Shared
|
|
145
|
+
│ Knowledge from the UI's Learnings tab so teammates see it too
|
|
93
146
|
├── Domain knowledge (facts, definitions, specs, research)
|
|
94
|
-
│ → memory_add for quick recall
|
|
147
|
+
│ → memory_add for quick recall; for bulk documents, the user uploads
|
|
148
|
+
│ files via the UI's Datapack → Actions → Add Knowledge flow
|
|
95
149
|
├── A correction or learning ("don't do X", "always do Y")
|
|
96
150
|
│ → memory_add — behavioral feedback
|
|
97
151
|
├── Full conversation worth preserving (multi-turn, reasoning traces)
|
|
98
152
|
│ → conversation_create + conversation_add_message — verbatim
|
|
99
153
|
└── Structured/tabular data (CSV rows, schemas, data dictionaries)
|
|
100
|
-
→
|
|
154
|
+
→ Not MCP-supported on Cloud today (db_run_write_query returns
|
|
155
|
+
{"error": "not_available"}). Extract key facts to memory_add
|
|
156
|
+
or tell the user this isn't a Cloud feature yet.
|
|
101
157
|
```
|
|
102
158
|
|
|
103
|
-
**Why not memory_add for tabular data?** Mem0 extracts individual facts from text. Passing CSV rows through it loses columns, rows, and structural relationships. Use the database for structured data.
|
|
104
|
-
|
|
105
159
|
## Automatic conversation capture
|
|
106
160
|
|
|
107
161
|
The Meko plugin automatically captures conversations via three mechanisms that coordinate through a shared watermark file:
|
|
@@ -117,10 +171,10 @@ All three are handled automatically. **Do NOT set up CronCreate for conversation
|
|
|
117
171
|
The SessionStart hook has already done the setup for you:
|
|
118
172
|
|
|
119
173
|
1. **Created a Meko conversation** — `conversation_id` is injected into `additionalContext` on the first turn. Use that value for all subsequent MCP tool calls that accept `conversation_id`.
|
|
120
|
-
2. **
|
|
174
|
+
2. **Echoed the session's `agent_id`** — also injected into `additionalContext`. Use the injected value verbatim for project-scoped Meko tool calls. It's a per-session value derived from the cwd (shape: `claude_code:<repo-basename>`), not a constant. For genuinely cross-project facts, write/read with `agent_id="meko_agent"` (the common bucket) instead.
|
|
121
175
|
3. **Preloaded recent memories** — `additionalContext` may include a `### Memories from prior sessions` block. Inspect it before acting so you don't re-ask questions the user has already answered.
|
|
122
176
|
|
|
123
|
-
If `additionalContext` is absent or empty (hook failed, MCP unavailable),
|
|
177
|
+
If `additionalContext` is absent or empty (hook failed, MCP unavailable), ask the user for their `agent_id` — do not invent one. See `tools-agent-id-conventions.md`.
|
|
124
178
|
|
|
125
179
|
### Before potentially destructive actions
|
|
126
180
|
|
|
@@ -128,9 +182,11 @@ Before any action that deletes, overwrites, or restructures user content — `Wr
|
|
|
128
182
|
|
|
129
183
|
```
|
|
130
184
|
memory_search(scope="read", query="destructive <action type> preferences feedback",
|
|
131
|
-
agent_id=<
|
|
185
|
+
agent_id=<your agent_id>, conversation_id=<session_conversation_id>)
|
|
132
186
|
```
|
|
133
187
|
|
|
188
|
+
Also consider a second call with `agent_id="meko_agent"` to surface common-bucket feedback — preferences the user (or any other agent) wrote under the cross-project bucket. And a `knowledgebase_search` for team-wide guidance if the action is one the team has promoted policy on.
|
|
189
|
+
|
|
134
190
|
If a relevant feedback memory exists (e.g., "always ask before deleting content"), confirm with the user before proceeding. If the search is empty, proceed, but treat the action as irreversible and prefer a dry-run / preview when one is available.
|
|
135
191
|
|
|
136
192
|
### Capture rules
|
|
@@ -144,41 +200,99 @@ If a relevant feedback memory exists (e.g., "always ask before deleting content"
|
|
|
144
200
|
|
|
145
201
|
**Use only the required parameters. Do not guess optional parameters.**
|
|
146
202
|
|
|
203
|
+
In the examples below, `<your-agent-id>` means the value the SessionStart hook injected into `additionalContext` — for Claude Code, something like `claude_code:meko-mcp-server`. Not the literal string `"<your-agent-id>"`.
|
|
204
|
+
|
|
147
205
|
### memory_add — correct call pattern
|
|
148
206
|
```
|
|
149
|
-
memory_add(scope="write",
|
|
207
|
+
memory_add(scope="write",
|
|
208
|
+
text="User is VP of Product at YugabyteDB",
|
|
209
|
+
agent_id="<your-agent-id>",
|
|
210
|
+
conversation_id="<session_conversation_id>")
|
|
150
211
|
```
|
|
151
|
-
Required parameters: `scope`, `text`, `
|
|
212
|
+
Required parameters: `scope`, `text`, `conversation_id`. On **writes**, `conversation_id` must be a real UUID (from `conversation_create` or the SessionStart hook) — writes attached to a nil/empty conversation are orphaned in Langfuse traces. NEVER pass `"current"` or other non-UUID values. `agent_id` is technically optional — empty/missing routes the write into the `meko_agent` common bucket — but for project-scoped facts pass the SessionStart-injected value verbatim.
|
|
152
213
|
|
|
153
214
|
### memory_search — correct call pattern
|
|
154
215
|
```
|
|
155
|
-
memory_search(scope="read",
|
|
216
|
+
memory_search(scope="read",
|
|
217
|
+
query="user role",
|
|
218
|
+
agent_id="<your-agent-id>",
|
|
219
|
+
conversation_id="<session_conversation_id>")
|
|
220
|
+
```
|
|
221
|
+
Required parameters: `scope`, `query`, `agent_id`, `conversation_id`. On **`memory_search`** specifically, `conversation_id` is used only for Langfuse trace nesting — it does NOT filter results. Pass the session's UUID so the search span appears under the active conversation in Observe; passing `""` is accepted and means "don't nest under any trace." For conversation-scoped filtering use the separate `run_id` parameter.
|
|
222
|
+
|
|
223
|
+
For cross-project common-bucket search (facts written under `agent_id="meko_agent"`, including everything you wrote with empty/missing agent_id), pass it explicitly:
|
|
224
|
+
```
|
|
225
|
+
memory_search(scope="read", query="user role",
|
|
226
|
+
agent_id="meko_agent", conversation_id="<session_conversation_id>")
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Empty string also resolves to `meko_agent` server-side, but be explicit so it's obvious from the call you mean the common bucket. To search results across multiple specific projects (e.g. also see what was written from `claude_code:other-repo`), call `memory_search` once per agent_id — there's no single-call fan-out.
|
|
230
|
+
|
|
231
|
+
### knowledgebase_search — correct call pattern
|
|
232
|
+
```
|
|
233
|
+
knowledgebase_search(scope="read",
|
|
234
|
+
query="...",
|
|
235
|
+
agent_id="<anything — ignored>",
|
|
236
|
+
conversation_id="<session_conversation_id>",
|
|
237
|
+
datapack_id="<datapack UUID>",
|
|
238
|
+
limit=10)
|
|
156
239
|
```
|
|
157
|
-
Required parameters: `scope`, `query`, `agent_id`, `conversation_id`.
|
|
240
|
+
Required parameters: `scope`, `query`, `agent_id`, `conversation_id`, `datapack_id`. `datapack_id` has no default here. `agent_id` is ignored for filtering — results are the team's shared knowledge on the datapack regardless of what you pass.
|
|
158
241
|
|
|
159
242
|
### Critical parameter rules
|
|
160
243
|
|
|
161
|
-
- **agent_id**:
|
|
162
|
-
- **conversation_id**:
|
|
163
|
-
- **scope**: Only `"read"`, `"write"`, or `"admin"`. Nothing else.
|
|
244
|
+
- **agent_id**: Per-session value, injected via `additionalContext` by the SessionStart hook. Shape: `<client>:<repo-basename>`. Pass verbatim on project-scoped writes and reads. Pass `"meko_agent"` for the cross-project common bucket (or empty/omit — server rewrites empty to `meko_agent`). Ignored on `knowledgebase_search`. See `tools-agent-id-conventions.md`.
|
|
245
|
+
- **conversation_id**: Behavior varies by tool. On write tools (`memory_add`, `conversation_add_message`) pass a real UUID from `conversation_create` or the SessionStart hook — a nil/empty value orphans the Langfuse trace. On `memory_search` it's used only for trace nesting (not for filtering), and empty-string is accepted; on `memory_get_all` and most read tools, still pass the session UUID when you have one. Never pass `"current"` or other non-UUID junk — only a real UUID or an intentionally empty string where the tool allows it.
|
|
246
|
+
- **scope**: Only `"read"`, `"write"`, or `"admin"`. Nothing else. Use the minimum the code actually requires (the per-tool cookbook shows it).
|
|
164
247
|
- **When in doubt about optional parameters, omit them.** The server has sensible defaults.
|
|
165
248
|
|
|
249
|
+
### Verify after writing
|
|
250
|
+
|
|
251
|
+
Never confirm a successful save to the user without first validating via a read-back. `{"status": "accepted"}` or HTTP 200 from a write tool is not proof of persistence — indexing lag, silent server errors, and wrong-datapack routing all surface as "the write looked fine but nothing is there." Always read back before reporting success.
|
|
252
|
+
|
|
253
|
+
- **After `memory_add`**: call `memory_search` with a distinctive token from the stored text (a name, UUID, rare phrase — not a common word). Assert the new memory appears in the results. Only then tell the user it was saved.
|
|
254
|
+
- **After `conversation_add_message`**: call `conversation_get(include_messages=true)` with the returned `conversation_id`. Assert `message_count` > 0 and that the new message is in the returned list.
|
|
255
|
+
- **On verification failure**: tell the user the save did not succeed — do **not** claim it did. Include the verification-failure detail (empty search, missing message, HTTP error) so they can act — wrong datapack, scope mismatch, expired API key are the common causes.
|
|
256
|
+
|
|
257
|
+
### First-run connection test
|
|
258
|
+
|
|
259
|
+
On the first Meko tool call in a fresh session (no prior Meko tool call since process start), and whenever the user explicitly asks "is Meko working?" or "test Meko connection", run a canary round-trip before proceeding with their actual request. This is the user-visible proof that the MCP transport, auth, and datapack routing are wired correctly end-to-end — a silent failure at install time will otherwise only surface much later, when real memories go missing.
|
|
260
|
+
|
|
261
|
+
**What it does.** Write a canary memory with the shape below, capture the `id` returned by `memory_add`, then verify with `memory_get_by_id` — a direct pgvector row lookup. If the row is returned, delete it (default) and tell the user "Meko connection OK". If any step fails, tell the user exactly which step failed — do not swallow the error. Do not retry: routing errors need to surface, not be papered over. (We use `memory_get_by_id` rather than `memory_search` deliberately: mem0 does not index metadata and is inconsistent about indexing the memory text for very short strings, so a search-based canary false-negatives against the real service.)
|
|
262
|
+
|
|
263
|
+
**Canary memory shape.** This is the spec; keep the fields stable so support can grep for them.
|
|
264
|
+
|
|
265
|
+
- `scope`: `"write"`
|
|
266
|
+
- `agent_id`: the session's `agent_id` (from `additionalContext`); not a constant
|
|
267
|
+
- `conversation_id`: the session's `conversation_id` (from `additionalContext`). If the hook failed and you truly have no conversation_id, call `conversation_create` first and use the returned id — do not use a nil UUID, it orphans the canary trace.
|
|
268
|
+
- `text`: `"Meko connection test: <client> @ <installer-version> — <ISO timestamp>. Safe to delete."`
|
|
269
|
+
- `metadata` (JSON): `{"type": "connection-test", "marker": "<uuid>", "client": "claude-code" | "claude-desktop" | "cursor", "installer_version": "<x.y.z>", "installed_at": "<ISO>"}`
|
|
270
|
+
|
|
271
|
+
**Gating.** The canary runs at most once per session. Persist a one-line-per-session marker (JSON `{ "last_canary_at": "<ISO>", "result": "ok" | "failed", "marker": "<uuid>" }`) under `~/.claude/meko-capture/canary-<agent_id-slugified>.json` — mirroring the watermark-file convention the capture hook already uses. On session start, check the file's mtime; if it was written during this process's uptime, skip. On success, rewrite the file. When the user explicitly asks to test the connection, ignore the gate and run anyway.
|
|
272
|
+
|
|
273
|
+
**Keeping the canary for support.** By default the canary is deleted after read-back. If the user passes `--keep-canary` (or equivalent) or is debugging an issue with support, leave it in place — the `metadata.type: "connection-test"` label makes it safe to identify and purge later.
|
|
274
|
+
|
|
275
|
+
**Reporting.** This is user-visible — the whole point is to give the user concrete proof. On success: `"Meko connection OK (canary round-trip succeeded)"`. On failure, name the failing step and include the raw error: `"Meko canary failed at memory_add: <error>. Likely causes: wrong datapack, expired API key, server unreachable."`
|
|
276
|
+
|
|
166
277
|
## Key concepts
|
|
167
278
|
|
|
168
|
-
1. **
|
|
169
|
-
2. **Scope hierarchy**: `read < write < admin` — every tool validates scope at entry. Only three valid values: `"read"`, `"write"`, `"admin"`. Using anything else (e.g., `"all"`) will fail.
|
|
170
|
-
3. **datapack_id routing**:
|
|
171
|
-
4. **agent_id is
|
|
172
|
-
5. **
|
|
173
|
-
6. **
|
|
174
|
-
7. **
|
|
175
|
-
8. **
|
|
279
|
+
1. **26 tools in 5 groups**: Memory (8), Conversation (6), Knowledge Base (4), Datapack (5), Database (3). On Cloud Meko today, all DB tools and the three KB ingestion tools return `{"error": "not_available"}` — only `knowledgebase_search` works in the KB group. See `tools-overview.md` for the full availability map.
|
|
280
|
+
2. **Scope hierarchy**: `read < write < admin` — every tool validates scope at entry. Only three valid values: `"read"`, `"write"`, `"admin"`. Using anything else (e.g., `"all"`) will fail. Tool docstrings sometimes say `"Pass 'admin'"` but the code only requires `"read"` or `"write"` — use the minimum the code actually enforces.
|
|
281
|
+
3. **datapack_id routing**: DB, RAG, and memory tools accept optional `datapack_id` (default datapack if omitted). `knowledgebase_search` is the exception: `datapack_id` is **required** there.
|
|
282
|
+
4. **agent_id is multi-agent**: Each client+project uses its own `agent_id` (shape `<client>:<repo-basename>`). Writes are scoped to `(datapack_id, user_id, agent_id)`. Personal reads (`memory_search`, `memory_get_all`) filter strictly on this tuple. Empty/missing `agent_id` lands in the `meko_agent` common bucket — use it explicitly for cross-project facts. `knowledgebase_search` ignores `agent_id` entirely and returns the team-shared knowledge on the datapack. See `tools-agent-id-conventions.md`.
|
|
283
|
+
5. **Personal memory vs. team-shared knowledge**: Un-promoted memories (`mem0_collection`) are scoped per-user and per-agent — only you see them. The user can promote important memories to Shared Knowledge via the Cloud UI's Learnings tab, which makes them visible to every team member on the datapack (user_id filter stripped). `knowledgebase_search` is the MCP read path for both Shared Knowledge and uploaded documents. See `tools-memory-vs-conversation.md`.
|
|
284
|
+
6. **conversation_id IS the Langfuse trace ID**: every MCP tool call inside a conversation becomes a span under that trace. Observable in the Meko UI's Observe hub (`/observe-hub?project=<langfuse_pid>&session=<conversation_id>`) or directly from a datapack's Conversations tab via the **Open in Observe** button. See `tools-memory-vs-conversation.md`.
|
|
285
|
+
7. **Adding documents or growing a knowledge base is UI-only on Cloud today**: users upload files via Datapack → Actions → **Add Knowledge** (PDF/TXT/MD/JSON/MP4, 5MB each). The MCP ingestion tools are not available on Cloud. See `tools-rag-workflow.md`.
|
|
286
|
+
8. **Conversation dedup**: `conversation_add_message` supports seed-based deterministic trace IDs to prevent duplicates.
|
|
287
|
+
9. **Memory latencies are not cheap**: observed on prod 2026-05-07 — `memory_add` 12-21s/call (calls OpenAI), `memory_search` 2-6s/call. Budget accordingly.
|
|
288
|
+
10. **Known limitations**: see `tools-known-limitations.md` before attempting write operations on tools that appear in the catalog but aren't available on Cloud.
|
|
289
|
+
11. **Error recovery**: Connection errors are common with memory tools — see `tools-troubleshooting.md` for retry strategies and fallbacks.
|
|
176
290
|
|
|
177
291
|
## Reference sections
|
|
178
292
|
|
|
179
293
|
| File | What it covers |
|
|
180
294
|
|------|---------------|
|
|
181
|
-
| `tools-overview.md` | Complete catalog of all
|
|
295
|
+
| `tools-overview.md` | Complete catalog of all 26 tools with decision tree + cloud Free-Tier gating map |
|
|
182
296
|
| `tools-cookbook.md` | Per-tool examples with correct parameters, responses, and error cases |
|
|
183
297
|
| `tools-memory-vs-conversation.md` | When to use memory tools vs conversation tools |
|
|
184
298
|
| `tools-datapack-workflow.md` | Datapack lifecycle and datapack_id routing |
|
|
@@ -6,7 +6,7 @@ description: Maps reference files to their topics for the meko-mcp-tools skill
|
|
|
6
6
|
# Reference Sections
|
|
7
7
|
|
|
8
8
|
## Tool Selection & Catalog
|
|
9
|
-
- [tools-overview.md](tools-overview.md) — Complete catalog of all
|
|
9
|
+
- [tools-overview.md](tools-overview.md) — Complete catalog of all 26 tools with a decision tree and cloud Free-Tier gating map
|
|
10
10
|
|
|
11
11
|
## Tool-Specific Guidance
|
|
12
12
|
- [tools-memory-vs-conversation.md](tools-memory-vs-conversation.md) — Decision framework: memory_add vs conversation_create/conversation_add_message
|
|
@@ -1,39 +1,101 @@
|
|
|
1
|
-
# agent_id
|
|
1
|
+
# agent_id — multi-agent identity on Cloud Meko
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`agent_id` identifies **which agent wrote a memory or created a conversation**. It is not a constant. Pick a value that represents the specific agent + project you're acting for, use it consistently for writes within this session, and use it to scope your own reads.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The Cloud UI (`cloud.mekodata.ai`) renders `agent_id` as a badge on every memory and conversation row — so the value you pick is user-visible. Multiple different agents with different `agent_id` values can write into the same datapack; each one's personal view is scoped to itself, and the UI shows the full cross-agent picture.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## The three buckets
|
|
8
|
+
|
|
9
|
+
Memories segregate strictly by `agent_id`. Pick the right bucket up front:
|
|
10
|
+
|
|
11
|
+
| Pattern | When to use | Example |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| `<client>:<repo-basename>` | Coding agents (Claude Code, Cursor) writing project-scoped facts. The default for almost every memory in a coding session. | `claude_code:meko-mcp-server` |
|
|
14
|
+
| Loose client name | Non-coding agents (Claude Desktop, generic MCP clients) where there's no project concept. | `claude_desktop` |
|
|
15
|
+
| `meko_agent` | Cross-project common bucket — facts any agent should see regardless of project (user identity, global preferences). The server stores empty/missing `agent_id` here automatically. | `meko_agent` |
|
|
16
|
+
|
|
17
|
+
**Discover the value at session start.** The SessionStart hook injects the chosen `agent_id` into the first-turn `additionalContext` based on the cwd's repo basename. Use that value verbatim — do not re-derive it. If the block is absent, fall back to `<client>:<basename(cwd)>` or ask the user.
|
|
18
|
+
|
|
19
|
+
For genuinely cross-project facts ("the user's name is Amiram", "the user prefers dark mode") write with `agent_id="meko_agent"` so future agents in different projects can read them.
|
|
20
|
+
|
|
21
|
+
## Valid characters
|
|
22
|
+
|
|
23
|
+
The server stores `agent_id` as a row-level column value — it never becomes a PostgreSQL identifier on Cloud. Any printable string works: colons, hyphens, dots, underscores, spaces. Stay within what's readable in the UI badge.
|
|
24
|
+
|
|
25
|
+
Pre-existing data in real datapacks includes a mix of legacy shapes — `agent`, `claude-code`, `claude_code`, `cursor:<slug>`, `claude-code:-Users-...`. None of them cause errors. To query those rows, pass the literal legacy value as `agent_id` (e.g. `agent_id="agent"` for rows from before the rewrite). New writes should follow the table above.
|
|
26
|
+
|
|
27
|
+
## How agent_id filters reads and writes
|
|
28
|
+
|
|
29
|
+
### Writes — `memory_add`, `conversation_create`, `conversation_add_message`
|
|
30
|
+
|
|
31
|
+
- The row stores `(meko_datapack_id, meko_user_id, meko_agent_id)` — the user_id comes from your cognito account; the datapack_id defaults or is explicit; the agent_id is what you pass.
|
|
32
|
+
- If you pass an empty or whitespace-only `agent_id`, the server stores `meko_agent`. That's the common bucket — fine for cross-project facts; not what you want for project-scoped writes.
|
|
33
|
+
|
|
34
|
+
### Personal reads — `memory_search`, `memory_get_all`, `conversation_list`, `conversation_get`
|
|
35
|
+
|
|
36
|
+
Filter tuple: `(datapack_id, user_id, agent_id)`.
|
|
37
|
+
|
|
38
|
+
- `user_id` is **always enforced**: you can only see memories and conversations you wrote (or that other team members shared with you via promotion — see below). One user cannot read another team member's un-promoted memories directly from MCP.
|
|
39
|
+
- `agent_id` is **strictly matched**: a search with `agent_id="claude_code:meko-mcp-server"` returns only rows whose stored value is exactly that. A memory written by `agent_id="cursor:foo"` is invisible to it.
|
|
40
|
+
- An empty `agent_id` is rewritten to `meko_agent` server-side, so a "broad" read with empty string returns only common-bucket rows — **not** a cross-agent fan-out. To search across multiple agent_ids, call once per known value.
|
|
41
|
+
|
|
42
|
+
Empirically verified 2026-05-19 on Cloud prod (free-tier multitenant mode, segregation via row-level filter).
|
|
43
|
+
|
|
44
|
+
### Team-shared reads — `knowledgebase_search`
|
|
45
|
+
|
|
46
|
+
Filter tuple: `(datapack_id)` only. **`agent_id` on the request is ignored.** Whatever value you pass, `knowledgebase_search` returns every row on the datapack.
|
|
47
|
+
|
|
48
|
+
This is the multi-user, multi-agent read path. Content in `knowledgebase_search` is shared across:
|
|
49
|
+
- All agents on the datapack (any `agent_id` value)
|
|
50
|
+
- All users with access to the datapack (`user_id` is not a column on the shared table)
|
|
51
|
+
|
|
52
|
+
The originating `agent_id` is preserved in each result's `metadata_filters.agent_id` for provenance, but it does not affect which rows come back.
|
|
53
|
+
|
|
54
|
+
## What lives where
|
|
8
55
|
|
|
9
56
|
```
|
|
10
|
-
|
|
11
|
-
|
|
57
|
+
memory_add(agent_id=X, text=...)
|
|
58
|
+
│
|
|
59
|
+
▼
|
|
60
|
+
mem0_collection ── personal memories, scoped (datapack, user, agent)
|
|
61
|
+
│
|
|
62
|
+
│ UI "Promote to Knowledge" (Learnings tab)
|
|
63
|
+
│ ─────────────────────────────────────────
|
|
64
|
+
│ Strips user_id, keeps agent_id as metadata,
|
|
65
|
+
│ copies into team-shared table
|
|
66
|
+
▼
|
|
67
|
+
knowledge_base ── team-shared, scoped (datapack) only
|
|
68
|
+
│
|
|
69
|
+
▼
|
|
70
|
+
knowledgebase_search(agent_id=anything, query=...)
|
|
12
71
|
```
|
|
13
72
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
73
|
+
- **Personal memories** are what you get from `memory_search` / `memory_get_all`. Private to you.
|
|
74
|
+
- **Shared Knowledge** is what you get from `knowledgebase_search`. Visible to every user and every agent on the datapack.
|
|
75
|
+
- **Promotion is UI-only.** There is no MCP tool for promoting a memory to Shared Knowledge — the user triggers it from the datapack's Learnings tab in the Cloud UI.
|
|
17
76
|
|
|
18
|
-
|
|
19
|
-
- Each agent_id gets its own pgvector collection (`{agent_id}_mem0_collection`) and AGE graph (`{agent_id}_mem0_graph`)
|
|
20
|
-
- `memory_search` and `memory_get_all` only return data from the specified agent's namespace
|
|
77
|
+
## When to use what — broad-query guidance
|
|
21
78
|
|
|
22
|
-
|
|
23
|
-
- Traces tagged with `agent:{agent_id}`, names prefixed with `{agent_id}:message`, `{agent_id}:start`, `{agent_id}:update`
|
|
24
|
-
- `conversation_list` and `conversation_get` filter by and verify agent ownership
|
|
79
|
+
If the user asks "what do you know about X?" and you want to maximize recall:
|
|
25
80
|
|
|
26
|
-
|
|
81
|
+
1. **First call**: `memory_search(agent_id="<your agent_id>", query="X")` — returns your own project's memories. Most relevant if the context is "what have you and I done in this repo."
|
|
82
|
+
2. **Second call**: `memory_search(agent_id="meko_agent", query="X")` — returns the common cross-project bucket (user identity, global preferences). Anything you wrote with `agent_id="meko_agent"` from any agent or project, plus rows the server stored under that name when called with empty `agent_id`.
|
|
83
|
+
3. **Third call**: `knowledgebase_search(agent_id="<anything>", datapack_id="<datapack>", query="X")` — returns team-shared knowledge. Useful when the answer may have been promoted by the user or a teammate.
|
|
27
84
|
|
|
28
|
-
|
|
85
|
+
For a true cross-agent fan-out (e.g. you also want to see what was written from `claude_code:other-repo` or `cursor:foo`), call `memory_search` once per known agent_id — the empty-string shortcut does not bypass the filter; the server rewrites empty to `meko_agent`.
|
|
29
86
|
|
|
30
|
-
|
|
87
|
+
Always tell the user what scope you searched, so they understand why the answer is or isn't there. Example wording: "I found this in your project memories" vs. "I found this in your common cross-project bucket" vs. "I found this in your team's shared knowledge."
|
|
31
88
|
|
|
32
|
-
## Sub-
|
|
89
|
+
## Sub-scoping within an agent
|
|
33
90
|
|
|
34
|
-
|
|
35
|
-
- `user_id` —
|
|
36
|
-
- `app_id` — per-application (e.g., "web_app" vs "mobile_app")
|
|
91
|
+
Optional parameters narrow further within the same `agent_id`:
|
|
92
|
+
- `user_id` — explicitly scope writes/reads to a specific end-user if your agent serves multiple (rare in Claude Code; more common in API products)
|
|
37
93
|
- `run_id` — per-execution run
|
|
38
94
|
|
|
39
95
|
Available on `memory_add`, `memory_search`, `memory_get_all`, `memory_delete_all`, `conversation_create`, `conversation_list`.
|
|
96
|
+
|
|
97
|
+
## Things I checked and found in-data on real Cloud datapacks
|
|
98
|
+
|
|
99
|
+
- `agent_id="agent"` appears on many legacy rows — it was the previous canonical constant. New writes should use the schema in the table above; query legacy rows with `agent_id="agent"` explicitly.
|
|
100
|
+
- Memory Summary UI (`/datapacks/<name>/memory-summary`) is agent-id-agnostic — shows every row in the datapack, renders the stored `agent_id` as a badge. The filtering is MCP-side only.
|
|
101
|
+
- Subagents spawned via the `Agent` tool in Claude Code do not automatically inherit the parent's `agent_id`. The parent must inject it into the spawn prompt. See the SKILL.md "When spawning subagents" section.
|