diff --git a/hindsight-integrations/openclaw/openclaw.plugin.json b/hindsight-integrations/openclaw/openclaw.plugin.json index b3036995..7e2875b7 100644 --- a/hindsight-integrations/openclaw/openclaw.plugin.json +++ b/hindsight-integrations/openclaw/openclaw.plugin.json @@ -63,6 +63,16 @@ "bankIdPrefix": { "type": "string", "description": "Optional prefix for bank IDs (e.g., 'prod' results in 'prod-slack-U123'). Useful for separating environments." + }, + "autoRecall": { + "type": "boolean", + "description": "Automatically recall memories on every prompt and inject them as context. Set to false when agent has its own recall tool.", + "default": true + }, + "excludeProviders": { + "type": "array", + "items": { "type": "string" }, + "description": "Message providers to exclude from recall and retain (e.g. ['telegram', 'discord'])" } }, "additionalProperties": false @@ -119,6 +129,14 @@ "bankIdPrefix": { "label": "Bank ID Prefix", "placeholder": "e.g., prod, staging (optional)" + }, + "autoRecall": { + "label": "Auto-Recall", + "placeholder": "true (inject memories on every prompt)" + }, + "excludeProviders": { + "label": "Excluded Providers", + "placeholder": "e.g. telegram, discord" } } } diff --git a/hindsight-integrations/openclaw/src/index.ts b/hindsight-integrations/openclaw/src/index.ts index fe0f5bcf..588487ba 100644 --- a/hindsight-integrations/openclaw/src/index.ts +++ b/hindsight-integrations/openclaw/src/index.ts @@ -440,6 +440,7 @@ function getPluginConfig(api: MoltbotPluginAPI): PluginConfig { dynamicBankId: config.dynamicBankId !== false, bankIdPrefix: config.bankIdPrefix, excludeProviders: Array.isArray(config.excludeProviders) ? config.excludeProviders : [], + autoRecall: config.autoRecall !== false, // Default: true (on) — backward compatible }; } @@ -726,6 +727,12 @@ export default function (api: MoltbotPluginAPI) { return; } + // Skip auto-recall when disabled (agent has its own recall tool) + if (!pluginConfig.autoRecall) { + console.log('[Hindsight] Auto-recall disabled via config, skipping'); + return; + } + // Derive bank ID from context const bankId = deriveBankId(ctx, pluginConfig); console.log(`[Hindsight] before_agent_start - bank: ${bankId}, channel: ${ctx?.messageProvider}/${ctx?.channelId}`); diff --git a/hindsight-integrations/openclaw/src/types.ts b/hindsight-integrations/openclaw/src/types.ts index d6015d19..3c9f43ea 100644 --- a/hindsight-integrations/openclaw/src/types.ts +++ b/hindsight-integrations/openclaw/src/types.ts @@ -43,6 +43,7 @@ export interface PluginConfig { dynamicBankId?: boolean; // Enable per-channel memory banks (default: true) bankIdPrefix?: string; // Prefix for bank IDs (e.g. 'prod' -> 'prod-slack-C123') excludeProviders?: string[]; // Message providers to exclude from recall/retain (e.g. ['telegram', 'discord']) + autoRecall?: boolean; // Auto-recall memories on every prompt (default: true). Set to false when agent has its own recall tool. } export interface ServiceConfig {