Skip to content

Refactor: move shared orchestration into basic_memory/app/ services; keep adapters thin #495

@phernandez

Description

@phernandez

Refactor: move shared orchestration into basic_memory/app/ services; keep adapters thin

Why

API routers and MCP tools often duplicate orchestration: resolve project → call services/repos → format response. Domain-ish orchestration should live in reusable application services.

Scope

  • Create basic_memory/app/ layer for shared orchestration returning typed results (not strings):
    • e.g. NotesAppService, ProjectsAppService, ContextAppService
  • Keep adapters thin:
    • API routers map to HTTP schemas
    • MCP tools map to markdown/guidance strings

Acceptance criteria

  • Reduced duplication between MCP and API.
  • Application services are independently testable.
  • Adapters remain small and focused.

Dependencies

  • Works best after typed internal API clients + config injection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions