Skip to content

API Reference parrot.memory.user.extraction

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

parrot.memory.user.extraction

View source

Extract bounded user claims without selecting scope or persisting them.

Alias AbstractClient

Re-exported from parrot.clients.base.AbstractClient.

Attribute MAX_CANDIDATES

Attribute MAX_INPUT_CHARS

Attribute MAX_OUTPUT_CHARS

Alias MemoryEvent

Re-exported from parrot.memory.agent_memory.models.MemoryEvent.

Alias UserKnowledgeCandidate

Re-exported from parrot.memory.user.models.UserKnowledgeCandidate.

Function extract_user_knowledge

Propose claims from user evidence; inference is pending until explicitly confirmed.

Output is capped at inferred: a candidate is explicit only when its value appears verbatim (case/whitespace-normalised) in the user-authored text. The model-asserted provenance is never trusted, so an inferred candidate can neither supersede an active claim nor lift a forget suppression.

The trusted scope is never read from model output: candidates forbid identity fields, and evidence references always come from the event, not from the model.

extract_user_knowledge(event: MemoryEvent, *, client: AbstractClient, model: str | None = None) -> list[UserKnowledgeCandidate]

Parameter Type Default Description
event MemoryEvent Observed event carrying the user text in its payload.
client AbstractClient AbstractClient used for the single bounded extraction call.
model str | None None Optional model override; defaults to the client's configured model.

Returns: list[UserKnowledgeCandidate] — Validated candidates; malformed, oversized or forged items are dropped.

Attribute logger

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