diff --git a/packages/core/src/agent/openai/base.ts b/packages/core/src/agent/openai/base.ts
index 6f57ccf87ab65538f0497bd55260413d1df5658b..eb89d231715248ef6e6143a97ccbd47f78b8603f 100644
--- a/packages/core/src/agent/openai/base.ts
+++ b/packages/core/src/agent/openai/base.ts
@@ -1,6 +1,7 @@
 import { Settings } from "../../Settings.js";
 import type { ChatMessage } from "../../llm/index.js";
 import { OpenAI } from "../../llm/index.js";
+import type { BaseMemory } from "../../memory/types.js";
 import type { ObjectRetriever } from "../../objects/base.js";
 import type { BaseTool } from "../../types.js";
 import { AgentRunner } from "../runner/base.js";
@@ -9,7 +10,7 @@ import { OpenAIAgentWorker } from "./worker.js";
 type OpenAIAgentParams = {
   tools?: BaseTool[];
   llm?: OpenAI;
-  memory?: any;
+  memory?: BaseMemory;
   prefixMessages?: ChatMessage[];
   maxFunctionCalls?: number;
   defaultToolChoice?: string;
diff --git a/packages/core/src/agent/react/base.ts b/packages/core/src/agent/react/base.ts
index 57b0da518aafcc794188896d9a384056bcec69ad..5f7f1b06abc1aaa1e49c4d77af10e53876355b6a 100644
--- a/packages/core/src/agent/react/base.ts
+++ b/packages/core/src/agent/react/base.ts
@@ -1,4 +1,5 @@
 import type { ChatMessage, LLM } from "../../llm/index.js";
+import type { BaseMemory } from "../../memory/types.js";
 import type { ObjectRetriever } from "../../objects/base.js";
 import type { BaseTool } from "../../types.js";
 import { AgentRunner } from "../runner/base.js";
@@ -7,7 +8,7 @@ import { ReActAgentWorker } from "./worker.js";
 type ReActAgentParams = {
   tools: BaseTool[];
   llm?: LLM;
-  memory?: any;
+  memory?: BaseMemory;
   prefixMessages?: ChatMessage[];
   maxInteractions?: number;
   defaultToolChoice?: string;
diff --git a/packages/core/src/agent/types.ts b/packages/core/src/agent/types.ts
index d81ba8ebfa7c38c3ccbcd5916ced01ca1711417e..5864c3202f01b53f8ef404417f3105791ea5bb1b 100644
--- a/packages/core/src/agent/types.ts
+++ b/packages/core/src/agent/types.ts
@@ -4,6 +4,7 @@ import type {
   StreamingAgentChatResponse,
 } from "../engines/chat/index.js";
 
+import type { BaseMemory } from "../memory/types.js";
 import type { QueryEngineParamsNonStreaming } from "../types.js";
 
 export interface AgentWorker<ExtraParams extends object = object> {
@@ -72,7 +73,7 @@ export abstract class BaseAgent implements BaseChatEngine, BaseQueryEngine {
 type TaskParams = {
   taskId: string;
   input: string;
-  memory: any;
+  memory: BaseMemory;
   extraState: Record<string, any>;
 };
 
@@ -84,7 +85,7 @@ export class Task {
   taskId: string;
   input: string;
 
-  memory: any;
+  memory: BaseMemory;
   extraState: Record<string, any>;
 
   constructor({ taskId, input, memory, extraState }: TaskParams) {