mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-06 04:23:15 -05:00
Each turn the chat prompt gets the agent profile and the indexes of the registered context sources, after the persona and before the skill index. The scope of a source is derived from the chat record: the saved agent, and the binding when a connector started the chat. The text is the same at each turn, so the transcript does not grow, and it feeds the refresh key so the harness restarts only when a file changes. memory_read reads a topic next to an index as the user, outside the chat fence. A scoped agent reads its own notes and the user notes and gains no access to the files. The service exposes ContextSources and SetContextWriter so other parts of the host can register a source or plug in the save path. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>