Skip to content

cayu.memory.context

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.

from cayu.memory import AutomaticRecallContextPolicy

Freeze one bounded automatic-memory contribution per real user interaction.

Bases: RuntimeManagedContextPolicy.

AutomaticRecallContextPolicy.execution_profile_identity() -> ExecutionProfileBehaviorIdentity | None

Optional application-versioned identity for opaque policy behavior.

async AutomaticRecallContextPolicy.build(request: ContextRequest) -> list[Message]
async AutomaticRecallContextPolicy.build_with_checkpoint(request: ContextRequest, *, checkpoint: dict[str, Any] | None) -> ContextBuildResult
AutomaticRecallContextPolicy.__init__(base_policy: ContextPolicy | None=None, *, admission_policy: AutomaticRecallPolicy, fusion_config: WeightedReciprocalRankFusionConfig, sources: AutomaticRecallSourceConfig | None=None, custom_sources: Sequence[AutomaticRecallSourceRegistration]=(), engine_config: RecallEngineConfig | None=None, delta_policy: MemoryDeltaPolicy | None=None, max_projection_bytes: int=128000) -> None
AutomaticRecallContextPolicy.configuration_material() -> dict[str, Any]

Return the complete behavior identity for automatic recall.

AutomaticRecallContextPolicy.configuration_fingerprint() -> str

Fingerprint every setting that can change the frozen contribution.

Release source · Runtime guarantees · Capability guides

from cayu.memory import AutomaticRecallSourceConfig

Immutable source membership and work bounds for automatic recall.

Bases: BaseModel.

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
include_knowledge bool True
include_transcript bool True
knowledge_required bool True
transcript_required bool False
knowledge_namespace str DEFAULT_KNOWLEDGE_NAMESPACE
knowledge_candidate_limit int 20
transcript_candidate_limit int 20
knowledge_max_bytes int 64000
knowledge_max_record_bytes int 8000
transcript_max_bytes int 64000
transcript_max_records_scanned int 10000
semantic_timeout_seconds float 1.0
recent_conversation_items int 8
recent_conversation_bytes int 16000
AutomaticRecallSourceConfig.validate_bool(value: Any, info) -> bool
AutomaticRecallSourceConfig.validate_namespace(value: str) -> str
AutomaticRecallSourceConfig.validate_candidate_limit(value: Any, info) -> int
AutomaticRecallSourceConfig.validate_positive_int(value: Any, info) -> int
AutomaticRecallSourceConfig.validate_semantic_timeout(value: Any) -> float
AutomaticRecallSourceConfig.validate_source_set() -> AutomaticRecallSourceConfig

Release source · Runtime guarantees · Capability guides