From e24b304ecb4f3ba2987ea9375366e2f0f1b9875e Mon Sep 17 00:00:00 2001
From: Alessandro
Date: Wed, 25 Mar 2026 21:32:52 +0100
Subject: [PATCH 1/2] fix: call _memory plugin paths for knowledge reindex
Import knowledge and project knowledge browse POSTed to /api/knowledge_reindex, which is not registered. Route those calls through /plugins/_memory/knowledge_reindex so dispatch matches plugin api handlers.
Chat import already used knowledge_path_get under the plugin; its call is reformatted only.
update knowledge_reindex.py
---
webui/components/chat/input/input-store.js | 9 +++++----
webui/components/projects/projects-store.js | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/webui/components/chat/input/input-store.js b/webui/components/chat/input/input-store.js
index 25bad7eb9..d86383209 100644
--- a/webui/components/chat/input/input-store.js
+++ b/webui/components/chat/input/input-store.js
@@ -101,9 +101,10 @@ const model = {
async loadKnowledge() {
try {
- const resp = await shortcuts.callJsonApi("/plugins/_memory/knowledge_path_get", {
- ctxid: shortcuts.getCurrentContextId(),
- });
+ const resp = await shortcuts.callJsonApi(
+ "/plugins/_memory/knowledge_path_get",
+ { ctxid: shortcuts.getCurrentContextId() }
+ );
if (!resp.ok) throw new Error("Error getting knowledge path");
const path = resp.path;
@@ -121,7 +122,7 @@ const model = {
});
// then reindex knowledge
- await globalThis.sendJsonData("/knowledge_reindex", {
+ await globalThis.sendJsonData("/plugins/_memory/knowledge_reindex", {
ctxid: shortcuts.getCurrentContextId(),
});
diff --git a/webui/components/projects/projects-store.js b/webui/components/projects/projects-store.js
index a13f5a2c3..965e33d11 100644
--- a/webui/components/projects/projects-store.js
+++ b/webui/components/projects/projects-store.js
@@ -459,7 +459,7 @@ const model = {
});
// call reindex knowledge
- const reindexCall = api.callJsonApi("/knowledge_reindex", {
+ const reindexCall = api.callJsonApi("/plugins/_memory/knowledge_reindex", {
ctxid: shortcuts.getCurrentContextId(),
});
From a2567b4af34087df307b7dccf4c42e6c5ebd2a89 Mon Sep 17 00:00:00 2001
From: Alessandro
Date: Wed, 25 Mar 2026 21:39:27 +0100
Subject: [PATCH 2/2] update API examples for projects usage
---
docs/developer/connectivity.md | 6 +++---
webui/components/settings/external/api-examples.html | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/docs/developer/connectivity.md b/docs/developer/connectivity.md
index ba9e4e9c5..339e51097 100644
--- a/docs/developer/connectivity.md
+++ b/docs/developer/connectivity.md
@@ -25,7 +25,7 @@ Send messages to Agent Zero and receive responses. Supports text messages, file
* `message` (string, required): The message to send
* `attachments` (array, optional): Array of `{filename, base64}` objects
* `lifetime_hours` (number, optional): Chat lifetime in hours (default: 24)
-* `project` (string, optional): Project name to activate (only on first message)
+* `project_name` (string, optional): Project name to activate (only on first message)
**Headers:**
* `X-API-KEY` (required)
@@ -185,7 +185,7 @@ async function sendMessageWithProject() {
},
body: JSON.stringify({
message: "Analyze the project structure",
- project: "my-web-app" // Activates this project
+ project_name: "my-web-app" // Activates this project
})
});
@@ -206,7 +206,7 @@ async function sendMessageWithProject() {
body: JSON.stringify({
context_id: data.context_id,
message: "What files are in the project?"
- // Do NOT include project field here - already set on first message
+ // Do NOT include project_name here - already set on first message
})
});
diff --git a/webui/components/settings/external/api-examples.html b/webui/components/settings/external/api-examples.html
index c403a6297..8c577ffcf 100644
--- a/webui/components/settings/external/api-examples.html
+++ b/webui/components/settings/external/api-examples.html
@@ -35,7 +35,7 @@
• message (string, required): The message to send
• attachments (array, optional): Array of {filename, base64} objects
• lifetime_hours (number, optional): Chat lifetime in hours (default: 24)
- • project (string, optional): Project name to activate (only on first message)
+ • project_name (string, optional): Project name to activate (only on first message)
Headers: X-API-KEY (required), Content-Type: application/json
@@ -629,7 +629,7 @@ async function sendMessageWithProject() {
},
body: JSON.stringify({
message: "Analyze the project structure",
- project: "my-web-app" // Activates this project
+ project_name: "my-web-app" // Activates this project
})
});
@@ -650,7 +650,7 @@ async function sendMessageWithProject() {
body: JSON.stringify({
context_id: data.context_id,
message: "What files are in the project?"
- // Do NOT include project field here - already set on first message
+ // Do NOT include project_name here - already set on first message
})
});