Skip to content

API Reference parrot.memory.user.models

github-actions[bot] edited this page Dec 2, 2026 · 1 revision

parrot.memory.user.models

View source

Cross-session user knowledge, candidates, commands and durable receipts.

Attribute MAX_CONTEXT_CHARS

Attribute MAX_CONTEXT_ITEMS

Attribute MAX_EVIDENCE_CHARS

Attribute MAX_EVIDENCE_REFS

Attribute MAX_KEY_CHARS

Attribute MAX_VALUE_CHARS

Class UserKnowledge

A scoped fact with independent provenance, revision and validity.

Fields:

Field Type Default Description
knowledge_id str
tenant_id str
agent_id str
user_id str
kind Literal['fact', 'preference', 'goal', 'constraint']
normalized_key str | None None
value Any
context dict[str, str]
provenance Literal['explicit', 'inferred']
evidence_refs tuple[str, ...] ()
status Literal['active', 'pending', 'superseded', 'invalidated']
created_at datetime
updated_at datetime
confirmed_at datetime | None None
valid_from datetime | None None
expires_at datetime | None None
revision int
supersedes_id str | None None

Class UserKnowledgeCandidate

A bounded extraction proposal; it cannot choose its trusted principal.

Fields:

Field Type Default Description
kind Literal['fact', 'preference', 'goal', 'constraint']
value Any
provenance Literal['explicit', 'inferred']
evidence_refs tuple[str, ...]
context dict[str, str]
normalized_key str | None None
valid_from datetime | None None
expires_at datetime | None None

Attributes:

Attribute Type Description
initial_status Literal['active', 'pending'] Return the admission status: explicit may be active, inferred is pending.

Class UserKnowledgeCommand

Idempotent revision-checked operation applied under a separate trusted scope.

Fields:

Field Type Default Description
event_id str
knowledge_id str | None None
expected_revision int | None None
candidate UserKnowledgeCandidate | None None
operation Literal['upsert', 'correct', 'forget'] 'upsert'
evidence_refs tuple[str, ...] ()

Class UserMemoryReceipt

Acknowledge only committed changes; duplicate/conflict retain their identities.

Fields:

Field Type Default Description
knowledge_id str | None None
revision int | None None
status Literal['applied', 'duplicate', 'conflict', 'ignored', 'storage_unavailable']

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally