Bases: Tool
Memory tool that enables Claude to store and retrieve information across conversations.
Claude can create, read, update, and delete files in the /memories directory to store what it learns while working, then reference those memories in future conversations.
This is a client-side tool: the application is responsible for implementing the handlers for each memory command (view, create, str_replace, insert, delete, rename).
See: https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool
Source code in autogen/beta/tools/builtin/memory.py
| def __init__(
self,
*,
version: Literal["memory_20250818"] = "memory_20250818",
) -> None:
self._schema = MemoryToolSchema(version=version)
self.name = MEMORY_TOOL_NAME
|
Source code in autogen/beta/tools/builtin/memory.py
| async def schemas(self, context: "Context") -> list[ToolSchema]:
return [self._schema]
|
register(stack, context, *, middleware=())
Source code in autogen/beta/tools/builtin/memory.py
| def register(
self,
stack: "ExitStack",
context: "Context",
*,
middleware: Iterable["BaseMiddleware"] = (),
) -> None:
async def execute(event: "ToolCallEvent", context: "Context") -> None:
pass
stack.enter_context(
context.stream.where(BuiltinToolCallEvent.name == MEMORY_TOOL_NAME).sub_scope(execute),
)
|
Source code in autogen/beta/tools/tool.py
| def set_provider(self, provider: Provider) -> None:
pass
|