Background
Sub-issue of #3011. The inject_memories builtin needs new configuration fields exposed in the agent YAML so users can opt in per agent.
Scope
Add the following fields to AgentConfig and the JSON schema, with sensible defaults and no migration required (false by default preserves existing behaviour).
Fields
| YAML key |
Go type |
Default |
Description |
inject_memories |
*bool |
nil (off) |
Master toggle for the proactive memory injection builtin |
max_inject_memories |
*int |
20 |
Cap on the number of memories injected per turn |
inject_memories_strategy |
string |
"local" |
Keyword extraction strategy: local (BM25) or llm (defined in #3013) |
YAML example
agents:
my_agent:
tools:
- type: memory
inject_memories: true
max_inject_memories: 20
inject_memories_strategy: local
Implementation Checklist
Acceptance Criteria
Background
Sub-issue of #3011. The
inject_memoriesbuiltin needs new configuration fields exposed in the agent YAML so users can opt in per agent.Scope
Add the following fields to
AgentConfigand the JSON schema, with sensible defaults and no migration required (false by default preserves existing behaviour).Fields
inject_memories*boolnil(off)max_inject_memories*int20inject_memories_strategystring"local"local(BM25) orllm(defined in #3013)YAML example
Implementation Checklist
pkg/config/latest/types.go— add the three fields toAgentConfigagent-schema.json— extend the schema with the new properties + descriptions + enum forinject_memories_strategyinject_memories: truewhen nomemorytoolset is configured (return a clear config error)max_inject_memories <= 0inject_memories_strategyvaluesAcceptance Criteria
inject_memories: truewithout amemorytoolset returns a clear validation erroragent-schema.jsonvalidates new configs and is consistent withAgentConfig