Skip to main content

Module active_inference

Module active_inference 

Source
Expand description

Active Inference Preload — predictive context loading.

Uses the agent’s task description and recent interactions to predict which providers and resources will be needed next, then preloads them into the session cache before the agent asks.

Scientific basis: Active Inference (Friston 2010; Parr, Pezzulo & Friston 2022). The system acts to reduce expected surprise by preloading context that minimizes the predicted free energy of future queries.

Strategy:

  1. Parse task keywords → predict relevant provider actions
  2. Score predictions using the provider bandit
  3. Preload top-k predictions into session cache

Structs§

PreloadPrediction
A predicted preload action.

Functions§

predict_preloads
Predict which provider actions should be preloaded based on the task.