Skip to main content

Module perception

Module perception 

Source
Expand description

Lens-based perception pipeline for the agentic loop.

Implements the Perceive phase: query substrate → re-rank through lens → format as intrinsic knowledge. Each agent sees the same substrate differently based on its lens.

Functions§

assemble_context
Assemble budget-aware context from the substrate through the lens.
format_as_intrinsic_knowledge
Format perceived experiences as intrinsic knowledge messages.
pack_within_budget
Pack ranked experiences within the token budget.
query_substrate
Query the substrate for perception candidates.
rerank
Re-rank experiences through the lens using domain, type, and temporal weighting.