Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

adjust default value for recallTokenBudget and recallMaxContentChars. (#1617)

Eurakaxun299166c92878
diff --git a/examples/openclaw-plugin/config.ts b/examples/openclaw-plugin/config.ts
index 4730a5422..9836a8858 100644
--- a/examples/openclaw-plugin/config.ts
+++ b/examples/openclaw-plugin/config.ts
@@ -61,9 +61,9 @@ const DEFAULT_CAPTURE_MODE = "semantic";
const DEFAULT_CAPTURE_MAX_LENGTH = 24000;
const DEFAULT_RECALL_LIMIT = 6;
const DEFAULT_RECALL_SCORE_THRESHOLD = 0.15;
-const DEFAULT_RECALL_MAX_CONTENT_CHARS = 500;
+const DEFAULT_RECALL_MAX_CONTENT_CHARS = 5000;
const DEFAULT_RECALL_PREFER_ABSTRACT = true;
-const DEFAULT_RECALL_TOKEN_BUDGET = 2000;
+const DEFAULT_RECALL_TOKEN_BUDGET = 8000;
const DEFAULT_COMMIT_TOKEN_THRESHOLD = 20000;
const DEFAULT_BYPASS_SESSION_PATTERNS: string[] = [];
const DEFAULT_EMIT_STANDARD_DIAGNOSTICS = false;
diff --git a/examples/openclaw-plugin/index.ts b/examples/openclaw-plugin/index.ts
index 2f7359666..e9e6dd691 100644
--- a/examples/openclaw-plugin/index.ts
+++ b/examples/openclaw-plugin/index.ts
@@ -1968,8 +1968,8 @@ export type BuildMemoryLinesWithBudgetOptions = BuildMemoryLinesOptions & {
*
* The first memory is always included even if its token count exceeds the
* remaining budget. This is intentional (spec Section 6.2): with
- * `recallMaxContentChars=500`, a single line is at most ~128 tokens — well
- * within the 2000-token default budget — so overshoot is bounded and
+ * `recallMaxContentChars=5000`, a single line is at most ~1250 tokens — well
+ * within the 8000-token default budget — so overshoot is bounded and
* guarantees at least one memory is surfaced.
*/
export async function buildMemoryLinesWithBudget(
diff --git a/examples/openclaw-plugin/tests/ut/config.test.ts b/examples/openclaw-plugin/tests/ut/config.test.ts
index 165da6f34..d94de3817 100644
--- a/examples/openclaw-plugin/tests/ut/config.test.ts
+++ b/examples/openclaw-plugin/tests/ut/config.test.ts
@@ -20,11 +20,11 @@ describe("memoryOpenVikingConfigSchema.parse()", () => {
expect(cfg.autoCapture).toBe(true);
expect(cfg.autoRecall).toBe(true);
expect(cfg.recallPreferAbstract).toBe(false);
- expect(cfg.recallTokenBudget).toBe(2000);
+ expect(cfg.recallTokenBudget).toBe(8000);
expect(cfg.commitTokenThreshold).toBe(20000);
expect(cfg.captureMode).toBe("semantic");
expect(cfg.captureMaxLength).toBe(24000);
- expect(cfg.recallMaxContentChars).toBe(500);
+ expect(cfg.recallMaxContentChars).toBe(5000);
expect(cfg.agentId).toBe("default");
expect(cfg.serverAuthMode).toBe("api_key");
expect(cfg.isolateUserScopeByAgent).toBe(false);