Expand description
POLICY_KERNEL – persistent routing policy store (H2.5).
Stores IntelligentRouter routing policies and cost records to disk
so they survive agent restarts. The default location is
~/.clawft/agents/<id>/policy_kernel.json, falling back to
~/.clawft/memory/policy_kernel.json when no agent ID is set.
The store is loaded on startup and saved on every policy change. Format is intentionally JSON for debuggability.
This module is gated behind the vector-memory feature flag.
Structs§
- Persisted
Cost Record - A persisted cost record.
- Policy
Entry - A persisted routing policy entry.
- Policy
Kernel - Persistent routing policy store.
- Policy
Kernel State - The full persisted state of the policy kernel.
Enums§
- Policy
Kernel Error - Errors from policy kernel persistence.
Functions§
- load_
policy_ kernel - Try to load a policy kernel for a specific agent, falling back to the global kernel, and finally to a fresh empty kernel at the global path.