haive.core.tools.store_tools¶
Store tools for Haive agents.
This module provides LangChain-compatible tools that agents can use to interact with the store system for memory management, similar to LangMem.
Classes¶
Input schema for deleting memories. |
|
Input schema for retrieving specific memories. |
|
Input schema for searching memories. |
|
Input schema for storing memories. |
|
Input schema for updating memories. |
Functions¶
|
Create a tool for deleting memories. |
|
Create a manage memory tool (alias for store_memory_tool). |
|
Create a complete suite of memory tools. |
|
Create a tool for retrieving specific memories. |
|
Create a tool for searching memories. |
|
Create a search memory tool (alias for better naming consistency). |
|
Create a tool for storing memories. |
|
Create a tool for updating memories. |
Module Contents¶
- class haive.core.tools.store_tools.DeleteMemoryInput(/, **data)[source]¶
Bases:
pydantic.BaseModel
Input schema for deleting memories.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class haive.core.tools.store_tools.RetrieveMemoryInput(/, **data)[source]¶
Bases:
pydantic.BaseModel
Input schema for retrieving specific memories.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class haive.core.tools.store_tools.SearchMemoryInput(/, **data)[source]¶
Bases:
pydantic.BaseModel
Input schema for searching memories.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class haive.core.tools.store_tools.StoreMemoryInput(/, **data)[source]¶
Bases:
pydantic.BaseModel
Input schema for storing memories.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class haive.core.tools.store_tools.UpdateMemoryInput(/, **data)[source]¶
Bases:
pydantic.BaseModel
Input schema for updating memories.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- haive.core.tools.store_tools.create_delete_memory_tool(store_manager, namespace=None, tool_name='delete_memory')[source]¶
Create a tool for deleting memories.
- Parameters:
store_manager (haive.core.tools.store_manager.StoreManager) – The store manager instance
namespace (tuple[str, Ellipsis] | None) – Optional namespace for operations
tool_name (str) – Name for the tool
- Returns:
LangChain Tool for deleting memories
- Return type:
langchain_core.tools.Tool
- haive.core.tools.store_tools.create_manage_memory_tool(store_manager, namespace=None)[source]¶
Create a manage memory tool (alias for store_memory_tool).
This provides compatibility with LangMem-style naming.
- Parameters:
store_manager (haive.core.tools.store_manager.StoreManager)
- Return type:
langchain_core.tools.Tool
- haive.core.tools.store_tools.create_memory_tools_suite(store_manager, namespace=None, include_tools=None)[source]¶
Create a complete suite of memory tools.
- Parameters:
store_manager (haive.core.tools.store_manager.StoreManager) – The store manager instance
namespace (tuple[str, Ellipsis] | None) – Optional namespace for operations
include_tools (list[str] | None) – Optional list of tools to include (store, search, retrieve, update, delete)
- Returns:
List of memory management tools
- Return type:
list[langchain_core.tools.Tool]
- haive.core.tools.store_tools.create_retrieve_memory_tool(store_manager, namespace=None, tool_name='retrieve_memory')[source]¶
Create a tool for retrieving specific memories.
- Parameters:
store_manager (haive.core.tools.store_manager.StoreManager) – The store manager instance
namespace (tuple[str, Ellipsis] | None) – Optional namespace for operations
tool_name (str) – Name for the tool
- Returns:
LangChain Tool for retrieving memories
- Return type:
langchain_core.tools.Tool
- haive.core.tools.store_tools.create_search_memory_tool(store_manager, namespace=None, tool_name='search_memory')[source]¶
Create a tool for searching memories.
- Parameters:
store_manager (haive.core.tools.store_manager.StoreManager) – The store manager instance
namespace (tuple[str, Ellipsis] | None) – Optional namespace for operations
tool_name (str) – Name for the tool
- Returns:
LangChain Tool for searching memories
- Return type:
langchain_core.tools.Tool
- haive.core.tools.store_tools.create_search_memory_tool_alias(store_manager, namespace=None)[source]¶
Create a search memory tool (alias for better naming consistency).
This provides compatibility with LangMem-style naming.
- Parameters:
store_manager (haive.core.tools.store_manager.StoreManager)
- Return type:
langchain_core.tools.Tool
- haive.core.tools.store_tools.create_store_memory_tool(store_manager, namespace=None, tool_name='store_memory')[source]¶
Create a tool for storing memories.
- Parameters:
store_manager (haive.core.tools.store_manager.StoreManager) – The store manager instance
namespace (tuple[str, Ellipsis] | None) – Optional namespace for operations
tool_name (str) – Name for the tool
- Returns:
LangChain Tool for storing memories
- Return type:
langchain_core.tools.Tool
- haive.core.tools.store_tools.create_update_memory_tool(store_manager, namespace=None, tool_name='update_memory')[source]¶
Create a tool for updating memories.
- Parameters:
store_manager (haive.core.tools.store_manager.StoreManager) – The store manager instance
namespace (tuple[str, Ellipsis] | None) – Optional namespace for operations
tool_name (str) – Name for the tool
- Returns:
LangChain Tool for updating memories
- Return type:
langchain_core.tools.Tool