Models¶
Data models used across all providers.
memio.models.Fact
dataclass
¶
A stored piece of knowledge about a user or agent.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Unique identifier for the fact. |
content |
str
|
The textual content of the fact. |
user_id |
str | None
|
Optional user scope for the fact. |
agent_id |
str | None
|
Optional agent scope for the fact. |
metadata |
dict | None
|
Optional dictionary of extra metadata. |
score |
float | None
|
Optional relevance score from search. |
created_at |
datetime | None
|
Timestamp when the fact was created. |
updated_at |
datetime | None
|
Timestamp when the fact was last updated. |
memio.models.Message
dataclass
¶
A conversation message in a session.
Attributes:
| Name | Type | Description |
|---|---|---|
role |
str
|
The role of the message sender (e.g. "user", "assistant"). |
content |
str
|
The textual content of the message. |
metadata |
dict | None
|
Optional dictionary of extra metadata. |
timestamp |
datetime | None
|
Optional timestamp when the message was created. |
name |
str | None
|
Optional display name of the sender. |
memio.models.Document
dataclass
¶
A stored document with optional metadata.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Unique identifier for the document. |
content |
str
|
The textual content of the document. |
metadata |
dict | None
|
Optional dictionary of extra metadata. |
score |
float | None
|
Optional relevance score from search. |
created_at |
datetime | None
|
Timestamp when the document was created. |
updated_at |
datetime | None
|
Timestamp when the document was last updated. |
memio.models.Triple
dataclass
¶
A knowledge graph triple representing a relationship.
Attributes:
| Name | Type | Description |
|---|---|---|
subject |
str
|
The subject entity of the triple. |
predicate |
str
|
The relationship between subject and object. |
object |
str
|
The object entity of the triple. |
metadata |
dict | None
|
Optional dictionary of extra metadata. |