fleet-memory/hindsight-control-plane/src
Nicolò Boschi 5d05962db0
feat: add source facts token limits to consolidation and recall (#509)
* feat: add source facts token limits to consolidation and recall

- Add two new configurable (per-bank) parameters:
  - consolidation_source_facts_max_tokens: total token budget for source
    facts across all observations in the consolidation prompt (-1 = unlimited)
  - consolidation_source_facts_max_tokens_per_observation: per-observation
    cap so each observation gets a fair share of source facts (-1 = unlimited,
    default 256)
- Both are also exposed as recall API parameters via SourceFactsIncludeOptions
  (max_tokens and max_tokens_per_observation)
- Consolidation now uses resolve_full_config to respect bank-level overrides
- Improve consolidation prompt: temporal metadata (occurred_start=, | Involving:)
  is now clearly separated from observation text, with a concrete example showing
  the expected synthesis style and explicit rules not to copy raw fact lines
- Add tests for recall source facts capping and consolidation config forwarding
- Expose all three new fields in the control plane bank config UI
- Document new env vars in configuration.md
- Regenerate OpenAPI spec and all SDK clients

* fix: reorder observations UI fields and rename Label Groups to Entity Labels

* fix: revert Entities section title (only rename inner label)

* doc: add consolidation source facts and batch size fields to memory-banks docs
2026-03-06 13:01:33 +01:00
..
app feat: webhook system with retain.completed event, UI, and docs (#487) 2026-03-04 14:17:01 +01:00
components feat: add source facts token limits to consolidation and recall (#509) 2026-03-06 13:01:33 +01:00
lib feat: webhook system with retain.completed event, UI, and docs (#487) 2026-03-04 14:17:01 +01:00
instrumentation.ts feat: increase customization for reflect, retain and consolidation (#419) 2026-02-23 20:35:32 +01:00