haive.agents.memory.models¶
Memory system Pydantic models for structured extraction and storage.
Inspired by langmem’s memory management approach but built on haive.core store/persistence for async Postgres support.
Classes¶
Summary of a conversation for long-term storage. |
|
A subject-predicate-object knowledge graph triple. |
|
Structured extraction from a conversation - what to remember. |
|
A single memory stored in the system. |
|
Result from memory search. |
|
Classification of memory types (inspired by cognitive science + langmem). |
Module Contents¶
- class haive.agents.memory.models.ConversationSummary(/, **data)¶
Bases:
pydantic.BaseModelSummary of a conversation for long-term storage.
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.agents.memory.models.KnowledgeTriple(/, **data)¶
Bases:
pydantic.BaseModelA subject-predicate-object knowledge graph triple.
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.agents.memory.models.MemoryExtraction(/, **data)¶
Bases:
pydantic.BaseModelStructured extraction from a conversation - what to remember.
The memory extractor agent outputs this to decide what gets stored. Similar to langmem’s MemoryStoreManager extraction but using our SimpleAgent with structured output.
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.agents.memory.models.MemoryItem(/, **data)¶
Bases:
pydantic.BaseModelA single memory stored in the system.
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.agents.memory.models.MemorySearchResult(/, **data)¶
Bases:
pydantic.BaseModelResult from memory search.
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)