You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**`project`** — human-readable name (e.g., `"main"`). Easy to use, but can collide across cloud workspaces.
174
+
-**`project_id`** — stable `external_id` UUID. Always unambiguous; takes precedence over `project` when both are passed.
175
+
176
+
**When to prefer `project_id`:**
177
+
178
+
1.**Cloud multi-workspace setups.** If the user belongs to more than one workspace (personal + organization, or several organizations) and the same project name might exist in more than one of them, pass `project_id` to route to the exact project. Without it, name resolution falls back to the default workspace, which may not be the one the user means.
179
+
2.**After `list_memory_projects()`.** Once you have the `external_id`, prefer using it — it's the same number of characters in JSON and saves a name-resolution round-trip.
180
+
3.**When persisting a project choice across a long session.** UUIDs are stable; names can be renamed.
181
+
182
+
**When `project` (name) is fine:**
183
+
184
+
- Local single-workspace setups (no collision risk).
185
+
- One-off operations where the name is clearly visible to the user (e.g., quick `search_notes(project="main", ...)`).
186
+
- The user explicitly references a project by name in their message.
187
+
188
+
**Example — cloud multi-workspace pattern:**
189
+
190
+
```python
191
+
# Discover and pick the right project for this user
192
+
projects =await list_memory_projects()
193
+
target =next(p for p in projects if p["name"] =="research"and p["workspace"]["slug"] =="acme")
194
+
195
+
# Use the UUID for all subsequent operations — no ambiguity
**Precedence rule:** When both are passed, `project_id` wins. This lets you safely supply `project="main"` for backward compatibility while still routing precisely with `project_id`.
206
+
167
207
### Cross-Project Operations
168
208
169
209
**Some tools work across all projects when project parameter omitted:**
0 commit comments