cayu.memory.recall
Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.
KNOWLEDGE_LEXICAL_CHANNEL
Section titled “KNOWLEDGE_LEXICAL_CHANNEL”from cayu.memory import KNOWLEDGE_LEXICAL_CHANNELKNOWLEDGE_LEXICAL_CHANNEL = 'knowledge.lexical'Release source · Runtime guarantees · Capability guides
KNOWLEDGE_SEMANTIC_CHANNEL
Section titled “KNOWLEDGE_SEMANTIC_CHANNEL”from cayu.memory import KNOWLEDGE_SEMANTIC_CHANNELKNOWLEDGE_SEMANTIC_CHANNEL = 'knowledge.semantic'Release source · Runtime guarantees · Capability guides
KnowledgeFrontierRecallSource
Section titled “KnowledgeFrontierRecallSource”from cayu.memory import KnowledgeFrontierRecallSourceKnowledge recall lane restricted to one captured processing frontier.
Bases: KnowledgeRecallSource.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
name |
class attribute |
'knowledge' |
channel_names |
class attribute |
(KNOWLEDGE_LEXICAL_CHANNEL, KNOWLEDGE_SEMANTIC_CHANNEL) |
continuation_channels |
tuple[str, ...] |
() |
init (method)
Section titled “init (method)”KnowledgeFrontierRecallSource.__init__(store: KnowledgeStore, *, knowledge_sequence: int, index_readiness_sequence: int, required: bool=True, candidate_limit: int=20, max_bytes: int=64000, max_record_bytes: int=8000, semantic_timeout_seconds: float=1.0, lineage_limit: int=0, lineage_candidate_limit: int=10, lineage_max_bytes: int=MAX_KNOWLEDGE_RELATION_BYTES) -> Noneretrieve (method)
Section titled “retrieve (method)”async KnowledgeFrontierRecallSource.retrieve(situation: RecallSituation) -> RecallSourceResultRelease source · Runtime guarantees · Capability guides
KnowledgeRecallSource
Section titled “KnowledgeRecallSource”from cayu.memory import KnowledgeRecallSourceRevision-exact lexical and optional semantic lanes from one KnowledgeStore.
Bases: RecallSource.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
name |
class attribute |
'knowledge' |
channel_names |
class attribute |
(KNOWLEDGE_LEXICAL_CHANNEL, KNOWLEDGE_SEMANTIC_CHANNEL) |
continuation_channels |
tuple[str, ...] |
() |
init (method)
Section titled “init (method)”KnowledgeRecallSource.__init__(store: KnowledgeStore, *, required: bool=True, candidate_limit: int=20, max_bytes: int=64000, max_record_bytes: int=8000, semantic_timeout_seconds: float=1.0, lineage_limit: int=0, lineage_candidate_limit: int=10, lineage_max_bytes: int=MAX_KNOWLEDGE_RELATION_BYTES) -> Noneretrieve (method)
Section titled “retrieve (method)”async KnowledgeRecallSource.retrieve(situation: RecallSituation) -> RecallSourceResultRelease source · Runtime guarantees · Capability guides
KnowledgeRevisionRecallSource
Section titled “KnowledgeRevisionRecallSource”from cayu.memory import KnowledgeRevisionRecallSourceKnowledge recall lane restricted to an exact bounded revision set.
Bases: KnowledgeRecallSource.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
name |
class attribute |
'knowledge' |
channel_names |
class attribute |
(KNOWLEDGE_LEXICAL_CHANNEL, KNOWLEDGE_SEMANTIC_CHANNEL) |
continuation_channels |
tuple[str, ...] |
() |
init (method)
Section titled “init (method)”KnowledgeRevisionRecallSource.__init__(store: KnowledgeStore, revision_refs: Sequence[KnowledgeRevisionRef], *, knowledge_sequence: int | None=None, index_readiness_sequence: int | None=None, required: bool=True, candidate_limit: int=20, max_bytes: int=64000, max_record_bytes: int=8000, semantic_timeout_seconds: float=1.0, lineage_limit: int=0, lineage_candidate_limit: int=10, lineage_max_bytes: int=MAX_KNOWLEDGE_RELATION_BYTES) -> Noneretrieve (method)
Section titled “retrieve (method)”async KnowledgeRevisionRecallSource.retrieve(situation: RecallSituation) -> RecallSourceResultRelease source · Runtime guarantees · Capability guides
RECALL_ENGINE_VERSION
Section titled “RECALL_ENGINE_VERSION”from cayu.memory import RECALL_ENGINE_VERSIONRECALL_ENGINE_VERSION = 'cayu.recall.v1'Release source · Runtime guarantees · Capability guides
RecallCandidate
Section titled “RecallCandidate”from cayu import RecallCandidateBases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
fused |
FusedRetrievalCandidate |
required |
record |
RecallRecord |
required |
copy_fused (method)
Section titled “copy_fused (method)”RecallCandidate.copy_fused(value) -> FusedRetrievalCandidatecopy_record (method)
Section titled “copy_record (method)”RecallCandidate.copy_record(value) -> RecallRecordvalidate_identity (method)
Section titled “validate_identity (method)”RecallCandidate.validate_identity() -> RecallCandidateRelease source · Runtime guarantees · Capability guides
RecallEngine
Section titled “RecallEngine”from cayu import RecallEngineRun bounded sources concurrently and fuse their recorded ranks deterministically.
init (method)
Section titled “init (method)”RecallEngine.__init__(sources: Sequence[RecallSource], *, fusion_config: WeightedReciprocalRankFusionConfig, config: RecallEngineConfig | None=None) -> Nonerecall (method)
Section titled “recall (method)”async RecallEngine.recall(situation: RecallSituation) -> RecallResultRelease source · Runtime guarantees · Capability guides
RecallEngineConfig
Section titled “RecallEngineConfig”from cayu.memory import RecallEngineConfigBases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
source_timeout_seconds |
float |
2.0 |
overall_timeout_seconds |
float |
5.0 |
max_parallel_sources |
int |
4 |
max_source_result_bytes |
int |
256000 |
max_result_bytes |
int |
128000 |
engine_version |
str |
RECALL_ENGINE_VERSION |
validate_timeout (method)
Section titled “validate_timeout (method)”RecallEngineConfig.validate_timeout(value, info) -> floatvalidate_parallelism (method)
Section titled “validate_parallelism (method)”RecallEngineConfig.validate_parallelism(value) -> intvalidate_byte_limits (method)
Section titled “validate_byte_limits (method)”RecallEngineConfig.validate_byte_limits(value, info) -> intvalidate_engine_version (method)
Section titled “validate_engine_version (method)”RecallEngineConfig.validate_engine_version(value: str) -> strRelease source · Runtime guarantees · Capability guides
RecallRecord
Section titled “RecallRecord”from cayu.memory import RecallRecordBounded representation and exact locator for one canonical candidate.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
identity |
RetrievalCandidateIdentity |
required |
representation |
str |
required |
text |
str |
required |
text_complete |
bool |
required |
content_hash |
str |
required |
title |
str | None |
Field(default=None, exclude_if=lambda value: value is None) |
locator |
Mapping[str, Any] |
required |
lineage |
KnowledgeLineageResult | None |
Field(default=None, exclude_if=lambda value: value is None) |
copy_identity (method)
Section titled “copy_identity (method)”RecallRecord.copy_identity(value)validate_representation (method)
Section titled “validate_representation (method)”RecallRecord.validate_representation(value: str) -> strvalidate_text (method)
Section titled “validate_text (method)”RecallRecord.validate_text(value: str) -> strvalidate_title (method)
Section titled “validate_title (method)”RecallRecord.validate_title(value: str | None) -> str | Nonevalidate_text_complete (method)
Section titled “validate_text_complete (method)”RecallRecord.validate_text_complete(value) -> boolvalidate_content_hash (method)
Section titled “validate_content_hash (method)”RecallRecord.validate_content_hash(value: str) -> strcopy_locator (method)
Section titled “copy_locator (method)”RecallRecord.copy_locator(value) -> dict[str, Any]freeze_locator (method)
Section titled “freeze_locator (method)”RecallRecord.freeze_locator(value: Mapping[str, Any]) -> Mapping[str, Any]serialize_locator (method)
Section titled “serialize_locator (method)”RecallRecord.serialize_locator(value: Mapping[str, Any]) -> dict[str, Any]copy_lineage (method)
Section titled “copy_lineage (method)”RecallRecord.copy_lineage(value)validate_lineage_locator (method)
Section titled “validate_lineage_locator (method)”RecallRecord.validate_lineage_locator() -> RecallRecordRelease source · Runtime guarantees · Capability guides
RecallResult
Section titled “RecallResult”from cayu import RecallResultCross-source retrieval output; not admission, context, or exposure evidence.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
engine_version |
str |
required |
situation_sha256 |
str |
required |
candidates |
tuple[RecallCandidate, ...] |
required |
fusion |
RetrievalFusionDiagnostics |
required |
sources |
tuple[RecallSourceDiagnostic, ...] |
required |
continuations |
Mapping[str, str] |
Field(default_factory=dict) |
truncated |
bool |
required |
relevance_query |
str | None |
Field(default=None, max_length=RECALL_MAX_QUERY_BYTES) |
omitted_by_result_bytes |
int |
0 |
validate_relevance_query (method)
Section titled “validate_relevance_query (method)”RecallResult.validate_relevance_query(value: str | None) -> str | Nonevalidate_engine_version (method)
Section titled “validate_engine_version (method)”RecallResult.validate_engine_version(value: str) -> strvalidate_situation_hash (method)
Section titled “validate_situation_hash (method)”RecallResult.validate_situation_hash(value: str) -> strcopy_candidates (method)
Section titled “copy_candidates (method)”RecallResult.copy_candidates(value) -> tuple[RecallCandidate, ...]copy_fusion (method)
Section titled “copy_fusion (method)”RecallResult.copy_fusion(value) -> RetrievalFusionDiagnosticscopy_sources (method)
Section titled “copy_sources (method)”RecallResult.copy_sources(value) -> tuple[RecallSourceDiagnostic, ...]copy_continuations (method)
Section titled “copy_continuations (method)”RecallResult.copy_continuations(value) -> dict[str, str]freeze_continuations (method)
Section titled “freeze_continuations (method)”RecallResult.freeze_continuations(value: Mapping[str, str]) -> Mapping[str, str]serialize_continuations (method)
Section titled “serialize_continuations (method)”RecallResult.serialize_continuations(value: Mapping[str, str]) -> dict[str, str]validate_truncated (method)
Section titled “validate_truncated (method)”RecallResult.validate_truncated(value) -> boolvalidate_omitted (method)
Section titled “validate_omitted (method)”RecallResult.validate_omitted(value) -> intvalidate_result (method)
Section titled “validate_result (method)”RecallResult.validate_result() -> RecallResultRelease source · Runtime guarantees · Capability guides
RecallSituation
Section titled “RecallSituation”from cayu import RecallSituationImmutable per-boundary retrieval input; never provider-visible by itself.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
query_resolution_version |
Literal['cayu.query_resolution.v2'] |
QUERY_RESOLUTION_VERSION |
query |
str |
required |
recent_conversation |
tuple[str, ...] |
() |
recent_user_context_clipped |
bool |
False |
current_query_clipped |
bool |
False |
work_context |
str | None |
None |
knowledge_access_scope |
KnowledgeAccessScope | None |
None |
knowledge_namespace |
str |
DEFAULT_KNOWLEDGE_NAMESPACE |
transcript_session_ids |
tuple[str, ...] |
() |
transcript_before_indexes |
Mapping[str, int] |
Field(default_factory=dict) |
continuations |
Mapping[str, str] |
Field(default_factory=dict) |
knowledge_aspect_groups |
tuple[tuple[str, ...], ...] |
() |
knowledge_filter_only |
bool |
False |
current_time |
datetime |
Field(default_factory=lambda: datetime.now(UTC)) |
validate_resolution_clipping (method)
Section titled “validate_resolution_clipping (method)”RecallSituation.validate_resolution_clipping(value, info) -> boolvalidate_query (method)
Section titled “validate_query (method)”RecallSituation.validate_query(value: str) -> strvalidate_recent_conversation (method)
Section titled “validate_recent_conversation (method)”RecallSituation.validate_recent_conversation(value) -> tuple[str, ...]validate_work_context (method)
Section titled “validate_work_context (method)”RecallSituation.validate_work_context(value: str | None) -> str | Nonevalidate_knowledge_aspect_groups (method)
Section titled “validate_knowledge_aspect_groups (method)”RecallSituation.validate_knowledge_aspect_groups(value: object) -> tuple[tuple[str, ...], ...]validate_knowledge_filter_only (method)
Section titled “validate_knowledge_filter_only (method)”RecallSituation.validate_knowledge_filter_only(value: object) -> boolvalidate_knowledge_filter (method)
Section titled “validate_knowledge_filter (method)”RecallSituation.validate_knowledge_filter() -> RecallSituationcopy_access_scope (method)
Section titled “copy_access_scope (method)”RecallSituation.copy_access_scope(value) -> KnowledgeAccessScope | Nonefreeze_access_scope (method)
Section titled “freeze_access_scope (method)”RecallSituation.freeze_access_scope(value: KnowledgeAccessScope | None) -> KnowledgeAccessScope | Nonecopy_transcript_before_indexes (method)
Section titled “copy_transcript_before_indexes (method)”RecallSituation.copy_transcript_before_indexes(value) -> dict[str, int]freeze_transcript_before_indexes (method)
Section titled “freeze_transcript_before_indexes (method)”RecallSituation.freeze_transcript_before_indexes(value: Mapping[str, int]) -> Mapping[str, int]serialize_transcript_before_indexes (method)
Section titled “serialize_transcript_before_indexes (method)”RecallSituation.serialize_transcript_before_indexes(value: Mapping[str, int]) -> dict[str, int]serialize_access_scope (method)
Section titled “serialize_access_scope (method)”RecallSituation.serialize_access_scope(value: KnowledgeAccessScope | None) -> dict[str, Any] | Nonevalidate_namespace (method)
Section titled “validate_namespace (method)”RecallSituation.validate_namespace(value: str) -> strvalidate_transcript_session_ids (method)
Section titled “validate_transcript_session_ids (method)”RecallSituation.validate_transcript_session_ids(value) -> tuple[str, ...]copy_continuations (method)
Section titled “copy_continuations (method)”RecallSituation.copy_continuations(value) -> dict[str, str]freeze_continuations (method)
Section titled “freeze_continuations (method)”RecallSituation.freeze_continuations(value: Mapping[str, str]) -> Mapping[str, str]serialize_continuations (method)
Section titled “serialize_continuations (method)”RecallSituation.serialize_continuations(value: Mapping[str, str]) -> dict[str, str]validate_current_time (method)
Section titled “validate_current_time (method)”RecallSituation.validate_current_time(value: datetime) -> datetimevalidate_transcript_before_index_scope (method)
Section titled “validate_transcript_before_index_scope (method)”RecallSituation.validate_transcript_before_index_scope() -> RecallSituationquery_resolution (method)
Section titled “query_resolution (method)”RecallSituation.query_resolution() -> dict[str, Any]Bounded evidence of whether a current question needs an antecedent.
Only the most recent caller-supplied user turn (or explicit work context) may resolve a follow-up. Assistant prose never supplies search terms. Unknown discourse forms conservatively remain current-query-only.
retrieval_text (method)
Section titled “retrieval_text (method)”RecallSituation.retrieval_text() -> strfingerprint (method)
Section titled “fingerprint (method)”RecallSituation.fingerprint() -> strmodel_copy (method)
Section titled “model_copy (method)”RecallSituation.model_copy(*, update: Mapping[str, Any] | None=None, deep: bool=False) -> SelfRelease source · Runtime guarantees · Capability guides
RecallSource
Section titled “RecallSource”from cayu.memory import RecallSourceTrusted read-only extension that returns bounded independently ranked lanes.
Bases: ABC.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
name |
str |
required |
channel_names |
tuple[str, ...] |
required |
continuation_channels |
tuple[str, ...] |
() |
init (method)
Section titled “init (method)”RecallSource.__init__(*, required: bool, candidate_limit: int) -> Noneretrieve (method)
Section titled “retrieve (method)”async RecallSource.retrieve(situation: RecallSituation) -> RecallSourceResultReturn source-owned channels after hard source filtering.
Release source · Runtime guarantees · Capability guides
RecallSourceDiagnostic
Section titled “RecallSourceDiagnostic”from cayu import RecallSourceDiagnosticBases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
source |
str |
required |
required |
bool |
required |
status |
RecallSourceStatus |
required |
channels |
tuple[str, ...] |
required |
failure_code |
str | None |
None |
validate_source (method)
Section titled “validate_source (method)”RecallSourceDiagnostic.validate_source(value: str) -> strvalidate_required (method)
Section titled “validate_required (method)”RecallSourceDiagnostic.validate_required(value) -> boolvalidate_channels (method)
Section titled “validate_channels (method)”RecallSourceDiagnostic.validate_channels(value) -> tuple[str, ...]validate_failure_code (method)
Section titled “validate_failure_code (method)”RecallSourceDiagnostic.validate_failure_code(value: str | None) -> str | Nonevalidate_status (method)
Section titled “validate_status (method)”RecallSourceDiagnostic.validate_status() -> RecallSourceDiagnosticRelease source · Runtime guarantees · Capability guides
RecallSourceResult
Section titled “RecallSourceResult”from cayu.memory import RecallSourceResultValidated source output before cross-source fusion.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
source |
str |
required |
channels |
tuple[RankedRetrievalChannel, ...] |
required |
records |
tuple[RecallRecord, ...] |
required |
coverage_complete |
bool |
required |
partial_reason |
str | None |
None |
validate_source (method)
Section titled “validate_source (method)”RecallSourceResult.validate_source(value: str) -> strcopy_channels (method)
Section titled “copy_channels (method)”RecallSourceResult.copy_channels(value) -> tuple[RankedRetrievalChannel, ...]copy_records (method)
Section titled “copy_records (method)”RecallSourceResult.copy_records(value) -> tuple[RecallRecord, ...]validate_coverage_complete (method)
Section titled “validate_coverage_complete (method)”RecallSourceResult.validate_coverage_complete(value) -> boolvalidate_partial_reason (method)
Section titled “validate_partial_reason (method)”RecallSourceResult.validate_partial_reason(value: str | None) -> str | Nonevalidate_source_result (method)
Section titled “validate_source_result (method)”RecallSourceResult.validate_source_result() -> RecallSourceResultRelease source · Runtime guarantees · Capability guides
RecallSourceStatus
Section titled “RecallSourceStatus”from cayu.memory import RecallSourceStatusBases: StrEnum.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
COMPLETE |
class attribute |
'complete' |
PARTIAL |
class attribute |
'partial' |
UNAVAILABLE |
class attribute |
'unavailable' |
Release source · Runtime guarantees · Capability guides
RecallSourceUnavailable
Section titled “RecallSourceUnavailable”from cayu.memory import RecallSourceUnavailableA required source could not produce an access-safe bounded result.
Bases: RuntimeError.
init (method)
Section titled “init (method)”RecallSourceUnavailable.__init__(source: str, code: str) -> NoneRelease source · Runtime guarantees · Capability guides
TRANSCRIPT_LEXICAL_CHANNEL
Section titled “TRANSCRIPT_LEXICAL_CHANNEL”from cayu.memory import TRANSCRIPT_LEXICAL_CHANNELTRANSCRIPT_LEXICAL_CHANNEL = 'transcript.lexical'Release source · Runtime guarantees · Capability guides
TranscriptRecallSource
Section titled “TranscriptRecallSource”from cayu.memory import TranscriptRecallSourceAuthoritative transcript narrative lane over explicit session scope.
Bases: RecallSource.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
name |
class attribute |
'transcript' |
channel_names |
class attribute |
(TRANSCRIPT_LEXICAL_CHANNEL,) |
continuation_channels |
class attribute |
(TRANSCRIPT_LEXICAL_CHANNEL,) |
init (method)
Section titled “init (method)”TranscriptRecallSource.__init__(store: SessionStore, *, required: bool=False, candidate_limit: int=20, max_bytes: int=64000, max_records_scanned: int=10000) -> Noneretrieve (method)
Section titled “retrieve (method)”async TranscriptRecallSource.retrieve(situation: RecallSituation) -> RecallSourceResultsupports_store (method)
Section titled “supports_store (method)”TranscriptRecallSource.supports_store(store: object) -> boolReturn whether a store exposes the bounded transcript-search contract.