Summary
Build a shared memoryhub-agent Python package that provides the common authenticate/dequeue/process/report lifecycle pattern used by all four curation agents. Agent-specific logic lives in separate modules as plugins.
Design reference
planning/autonomous-curation-agents.md Section 13 Open Question 1 (shared framework vs independent codebases)
Scope
- Python package:
memoryhub-agent with plugin architecture
- Common lifecycle: MCP authentication via
register_session, Valkey queue dequeue, process loop, metrics reporting
- Per-agent configuration via environment variables:
AGENT_TYPE, MH_MCP_URL, MH_API_KEY, LLM_ENDPOINT, LLM_MODEL, VALKEY_URL
- Leader election helper (for singleton agents: Curator, Statistician)
- Exponential backoff with jitter for MCP server unavailability (5 retries per tool call)
- Per-agent daily token budget enforcement via operator CRD config
- Container image: single
memoryhub-agent:latest image, agent type selected by env var
- Agent-specific modules can be split out if coupling becomes a problem
Dependencies
Summary
Build a shared
memoryhub-agentPython package that provides the common authenticate/dequeue/process/report lifecycle pattern used by all four curation agents. Agent-specific logic lives in separate modules as plugins.Design reference
planning/autonomous-curation-agents.mdSection 13 Open Question 1 (shared framework vs independent codebases)Scope
memoryhub-agentwith plugin architectureregister_session, Valkey queue dequeue, process loop, metrics reportingAGENT_TYPE,MH_MCP_URL,MH_API_KEY,LLM_ENDPOINT,LLM_MODEL,VALKEY_URLmemoryhub-agent:latestimage, agent type selected by env varDependencies