Skip to content

agents: Build shared agent framework for authenticate/dequeue/process/report pattern #286

@rdwj

Description

@rdwj

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions