Skip to content

Conversation

@dcloud347
Copy link
Collaborator

This pull request refactors the memory API into distinct episodic and semantic memory endpoints, updates service initialization to support the new structure, and improves the embedding and database services for better async support and reliability. The changes also rename and update related service files and models to reflect the new separation between episodic and semantic memory.

API Refactoring

  • The /memory/search and /memory/{memory_id} endpoints in main.py are removed and replaced by two new routers: episodic_memory and semantic_memory, each with their own endpoints for search, retrieval, storage, and deletion. (athena/app/api/main.py)
  • New episodic memory endpoints are added for searching and retrieving memory units, scoped to the episodic memory service. (athena/app/api/routes/episodic_memory.py)
  • Semantic memory endpoints are introduced for storing, retrieving, and deleting semantic memory units, supporting weighted multi-vector similarity search. (athena/app/api/routes/semantic_memory.py)

Service Initialization and Dependency Updates

  • The service initialization in dependencies.py is updated to replace the old monolithic memory service with separate episodic_memory_service and semantic_memory_service, each with their own storage backends. (athena/app/dependencies.py) [1] [2]

Database and Embedding Service Improvements

  • The embedding service is refactored to use httpx.AsyncClient for async support, and its API is made fully async. (athena/app/services/embedding_service.py) [1] [2]
  • The database service startup logic is simplified, with extension creation and table creation separated, and health check logic removed. (athena/app/services/database_service.py) [1] [2]

Episodic Memory Extraction Service Renaming and Model Updates

  • The memory_extraction_service.py is renamed to episodic_memory_extraction_service.py, and all references to generic memory models are updated to use episodic memory models and types. (athena/app/services/episodic_memory_extraction_service.py) [1] [2] [3] [4] [5] [6] [7] [8]

Other Changes

  • The health check endpoint is simplified to always return "healthy" without checking database connectivity. (athena/app/main.py)

Zhaoyang-Chu and others added 30 commits October 1, 2025 04:26
@dcloud347 dcloud347 merged commit 9c25b12 into main Oct 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants