diff --git a/packages/services/service-ai/src/agents/data-chat-agent.ts b/packages/services/service-ai/src/agents/data-chat-agent.ts index 5cb0bc8b73..37a6f0a0a7 100644 --- a/packages/services/service-ai/src/agents/data-chat-agent.ts +++ b/packages/services/service-ai/src/agents/data-chat-agent.ts @@ -96,12 +96,5 @@ Always answer in the same language the user is using. Detailed tool-usage guidan maxIterations: 10, allowReplan: true, }, - - memory: { - shortTerm: { - maxMessages: 20, - maxTokens: 4096, - }, - }, }; diff --git a/packages/spec/src/ai/agent.test.ts b/packages/spec/src/ai/agent.test.ts index 9b3b4235fa..ada2df3e5d 100644 --- a/packages/spec/src/ai/agent.test.ts +++ b/packages/spec/src/ai/agent.test.ts @@ -589,10 +589,6 @@ Be precise, data-driven, and clear in your explanations.`, role: 'Persistent Assistant', instructions: 'Remember across sessions.', memory: { - shortTerm: { - maxMessages: 100, - maxTokens: 4096, - }, longTerm: { enabled: true, store: 'vector', @@ -602,7 +598,6 @@ Be precise, data-driven, and clear in your explanations.`, }, }); - expect(agent.memory?.shortTerm?.maxMessages).toBe(100); expect(agent.memory?.longTerm?.enabled).toBe(true); expect(agent.memory?.longTerm?.store).toBe('vector'); expect(agent.memory?.reflectionInterval).toBe(5); diff --git a/packages/spec/src/ai/agent.zod.ts b/packages/spec/src/ai/agent.zod.ts index 868d651033..1fbe0d1058 100644 --- a/packages/spec/src/ai/agent.zod.ts +++ b/packages/spec/src/ai/agent.zod.ts @@ -173,14 +173,12 @@ export const AgentSchema = lazySchema(() => z.object({ /** Memory Management */ memory: z.object({ - /** Short-term (working) memory configuration */ - shortTerm: z.object({ - /** Maximum number of recent messages to retain */ - maxMessages: z.number().int().min(1).default(50).describe('Max recent messages in working memory'), - - /** Maximum token budget for short-term context */ - maxTokens: z.number().int().min(100).optional().describe('Max tokens for short-term context window'), - }).optional().describe('Short-term / working memory'), + // NOTE: `shortTerm` ({maxMessages,maxTokens}) was removed (ADR-0013 D3, + // cloud#339). It declared a working-memory window that NOTHING in the + // runtime consumed — a config that lies. Cross-turn grounding is done by + // tools reading live state, and the context budget is governed elsewhere + // (the per-request token guardrail), not by this field. `longTerm` / + // `reflectionInterval` are kept as forward-looking, off-by-default config. /** Long-term (persistent) memory configuration */ longTerm: z.object({