haive.agents.memory.models ========================== .. py:module:: haive.agents.memory.models .. autoapi-nested-parse:: 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 ------- .. autoapisummary:: haive.agents.memory.models.ConversationSummary haive.agents.memory.models.KnowledgeTriple haive.agents.memory.models.MemoryExtraction haive.agents.memory.models.MemoryItem haive.agents.memory.models.MemorySearchResult haive.agents.memory.models.MemoryType Module Contents --------------- .. py:class:: ConversationSummary(/, **data) Bases: :py:obj:`pydantic.BaseModel` Summary 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. .. py:class:: KnowledgeTriple(/, **data) Bases: :py:obj:`pydantic.BaseModel` A 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. .. py:class:: MemoryExtraction(/, **data) Bases: :py:obj:`pydantic.BaseModel` Structured 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. .. py:class:: MemoryItem(/, **data) Bases: :py:obj:`pydantic.BaseModel` A 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. .. py:class:: MemorySearchResult(/, **data) Bases: :py:obj:`pydantic.BaseModel` Result 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. .. py:class:: MemoryType Bases: :py:obj:`str`, :py:obj:`enum.Enum` Classification of memory types (inspired by cognitive science + langmem). Initialize self. See help(type(self)) for accurate signature.