[EPIC] Pluggable memory engine: typed family + external providers #888

Closed
opened 2026-10-27 13:38:09 +00:00 by sam · 0 comments
Owner

Make the memory subsystem a pluggable engine family so an external memory backend (Honcho, or a future alternative) can be bolted on without touching the agent loop, while the file-writing store ships as the default. internal/memory already has a Manager and lifecycle hooks (TurnStartHook, SessionEndHook, SessionSwitchHook); this epic promotes that into a conforming engine family per the strict plugin engine rule in ARCHITECTURE.md rather than inventing a parallel abstraction.

Design

Constraint from the plugin engine rule: 'engine' requires a typed domain contract, an owning Registry or Manager, explicit lifecycle/health, and narrow typed registrars -- providers never receive *daemon.Daemon or untyped hook maps. The contract must express real memory operations (write observation, query, list, forget), not just Name/Version.

Acceptance Criteria

Memory is a typed engine family with an owning registry/manager, start/health/stop lifecycle, and narrow typed host access, satisfying every invariant in ARCHITECTURE.md 'Plugin engine rule (strict)' and passing internal/plugin/architecture_test.go. The builtin file-writing store is the shipped default engine and remains the behaviour when nothing is configured. At least one external engine is implementable against the contract without changes to the agent loop or gateway. Engine selection and per-engine settings are configurable, validated, and documented. Failure of a non-default engine degrades to a reported error rather than taking down a turn.

Close reason

All children completed


Imported from beads archie-core-1786637499161-356-e424e40d · GitHub #377 · type epic · priority P2 · created 2026-08-08 · closed 2026-09-02

Make the memory subsystem a pluggable engine family so an external memory backend (Honcho, or a future alternative) can be bolted on without touching the agent loop, while the file-writing store ships as the default. internal/memory already has a Manager and lifecycle hooks (TurnStartHook, SessionEndHook, SessionSwitchHook); this epic promotes that into a conforming engine family per the strict plugin engine rule in ARCHITECTURE.md rather than inventing a parallel abstraction. ### Design Constraint from the plugin engine rule: 'engine' requires a typed domain contract, an owning Registry or Manager, explicit lifecycle/health, and narrow typed registrars -- providers never receive *daemon.Daemon or untyped hook maps. The contract must express real memory operations (write observation, query, list, forget), not just Name/Version. ### Acceptance Criteria Memory is a typed engine family with an owning registry/manager, start/health/stop lifecycle, and narrow typed host access, satisfying every invariant in ARCHITECTURE.md 'Plugin engine rule (strict)' and passing internal/plugin/architecture_test.go. The builtin file-writing store is the shipped default engine and remains the behaviour when nothing is configured. At least one external engine is implementable against the contract without changes to the agent loop or gateway. Engine selection and per-engine settings are configurable, validated, and documented. Failure of a non-default engine degrades to a reported error rather than taking down a turn. ### Close reason All children completed --- _Imported from beads `archie-core-1786637499161-356-e424e40d` · GitHub #377 · type epic · priority P2 · created 2026-08-08 · closed 2026-09-02_
sam added the mediumepic labels 2026-10-27 13:38:09 +00:00
sam self-assigned this 2026-10-27 13:38:09 +00:00
sam closed this issue 2026-10-27 13:38:09 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#888