Skip to content

fix(api): add full parameter to GET /api/v1/memories for full episode content#132

Closed
Jah-yee wants to merge 572 commits into
EverMind-AI:mainfrom
Jah-yee:fix/issue-131-add-full-episode-param
Closed

fix(api): add full parameter to GET /api/v1/memories for full episode content#132
Jah-yee wants to merge 572 commits into
EverMind-AI:mainfrom
Jah-yee:fix/issue-131-add-full-episode-param

Conversation

@Jah-yee
Copy link
Copy Markdown

@Jah-yee Jah-yee commented Mar 12, 2026

Good day,

I noticed that the GET /api/v1/memories endpoint does not return the full episode content, which prevents external users (benchmarks, third-party integrations) from accessing the complete episodic memory data.

Changes Made

  1. src/api_specs/dtos/memory.py: Added full: Optional[bool] = False parameter to FetchMemRequest
  2. src/api_specs/memory_models.py: Added optional episode field to EpisodicMemoryModel with proper documentation
  3. src/agentic_layer/fetch_mem_service.py:
    • Added full parameter to find_memories method signature
    • Updated _convert_episodic_memory to conditionally include episode content when full=True
  4. src/agentic_layer/memory_manager.py: Pass full parameter from request to fetch service

How It Works

  • Default behavior (full=False): Returns lightweight version with only title and summary (backward compatible)
  • With full=True: Returns complete episode field containing the full episodic content

Example Usage

# Default behavior (backward compatible)
curl http://localhost:1995/api/v1/memories?user_id=user_123

# Returns full episode content
curl http://localhost:1995/api/v1/memories?user_id=user_123&full=true

Testing

  • Python syntax validation passed (python3 -m py_compile)
  • All modified files have valid Python syntax
  • The change is backward compatible

Note on Issue #131

This addresses the first part of issue #131 (adding ?full=true parameter).


Thank you for your dedication to this project. I hope this helps. If there are any issues or areas for improvement, please leave a comment, and I will address them.

Warmly,
Spark

zhanghui and others added 30 commits December 10, 2025 15:38
feat:support eventlog/foresight in keyword/vector/hybird search mode for v1-api

See merge request npc-work/aic/ai/evermemos-opensource!52
Resolved conflicts:
- demo/extract_memory.py: Keep V3 API config and prompt_clear_data function
- Updated type imports: Memory -> BaseMemory, ForesightItem -> Foresight
- Kept PromptManager architecture with get_prompt_by()
- Used absolute imports per project standards

Risk check passed: all imports, prompts, and extractor compatibility verified.
feat: Optimize demo and related memory chat logic

See merge request npc-work/aic/ai/evermemos-opensource!40
:global_with_meridians: utc

:global_with_meridians: utc

:global_with_meridians: utc
:global_with_meridians: utc

See merge request npc-work/aic/ai/evermemos-opensource!55
refactor:v1 api search, support rrf and agentic search, update readme

See merge request npc-work/aic/ai/evermemos-opensource!53
Feature/boundary opt

See merge request npc-work/aic/ai/evermemos-opensource!54
cyfyifanchen and others added 27 commits February 5, 2026 03:05
* docs: add wechat badge to the community channel

* docs: update the description of the text

* docs: add wechat badge link
…Mind-AI#74)

The restriction is unnecessary as the community is open to all interested
participants regardless of language background.
* docs: add templates and link fix

* ci: add conventional commit linting via pre-commit hook
…ind-AI#76)

* docs(readme): fix share link reference and update message text

- Correct the share-weibo badge link reference from share-mastodon-link to share-weibo-link
- Update all social share link messages to a shorter, more consistent format

* docs: update social share link texts for broader appeal

Change the pre-filled text in social media share links from "persistent memory for AI agents" to "persistent memory for all agents" and add a more inviting introductory phrase. This broadens the project's perceived scope and makes the sharing message more engaging.

* docs: fix URL encoding in share links

Ensure Mastodon and Reddit share links use proper URL encoding for the GitHub repository URL.
Update Weibo share link to use HTTPS protocol for consistency.
* docs: update the banner on github

* docs: update the image
- Remove duplicate summary_text assignment in conv_memcell_extractor.py
- Remove redundant cluster state file exports in stage1_memcells_extraction.py since cluster_storage.save_cluster_state already handles saving both cluster_state and cluster_map internally

Co-authored-by: root <root@nlu-guishangtong-sbajo4-0.nlu-guishangtong-sbajo4.lizr-a.svc.dev00-bcebj.local>
Co-authored-by: Claude <noreply@anthropic.com>
* refactor: normalize request converter parsing

* refactor: dedupe request param parsing in memory controller

* refactor: harden lightweight retrieval similarity handling

* fix: close agentic services during business shutdown
* docs: update README with community links and branding

* docs: update community links and badge labels
* docs: update README with new competition banner and examples

* docs: update light mode divider image asset link

* docs: update README with corrected spelling and added links

* docs: update README with competition and example links

* docs: remove commented section and fix light mode divider

* docs: remove divider images from README
…Mind-AI#116)

Update the OpenClaw Long-Term Memory Plugin section to reflect its release status by removing "coming this week" label. Also fix the markdown image link syntax to properly wrap the image in a link to the agent_memory branch.
…#119)

Update the link for the use case image and add reference to the EverMind + OpenClaw plugin repository. The change clarifies the project structure and provides direct access to the plugin code.
* docs: update README with corrected links and plugin info

Update the link for the use case image and add reference to the EverMind + OpenClaw plugin repository. The change clarifies the project structure and provides direct access to the plugin code.

* docs: update usecases image link to point to agent_memory branch
- Rename stage3_memory_retrivel.py to stage3_memory_retrieval.py (typo fix)
- Replace == None with is None (Python anti-pattern)
- Replace != True with is not True (Python anti-pattern)
- Replace bare except with except Exception
- Remove duplicate 'rrf' entry in docstring
- Remove unused MongoDB init script volume mount from docker-compose.yaml
- Add missing env template setup step in STARTER_KIT.md quick start

Fixes: EverMind-AI#115, EverMind-AI#113, EverMind-AI#107, EverMind-AI#97, EverMind-AI#91, EverMind-AI#90, EverMind-AI#86
…v slicing

When using sliced runs (e.g. --from-conv 234 --to-conv 264), the index
files were being saved with sequential indices (0, 1, 2...) but search
was looking up with global conversation IDs (234, 235, 263), causing
'BM25 index not found' errors.

Changes:
- stage2_index_building.py: Use conversation_ids to name index files with
  extracted numeric IDs (e.g., 'bm25_index_conv_234.pkl')
- evermemos_adapter.py:
  - Pass conversation_ids to stage2 for proper file naming
  - Fix conv_id_to_index mapping to map conversation_id -> extracted
    numeric ID (not sequential index)
  - Update _check_missing_indexes to use proper file naming
  - Save conversation_index_mapping.json for debugging

This ensures index files and search lookups use consistent IDs.
… content

This commit addresses issue EverMind-AI#131 by adding a 'full' query parameter
to the GET /api/v1/memories endpoint. When full=True, the response
includes the complete episode field which is not returned by default
for backward compatibility.

Changes:
- Add 'full' parameter to FetchMemRequest DTO
- Add 'episode' field to EpisodicMemoryModel (optional, returned only when full=True)
- Update find_memories method to accept 'full' parameter
- Update _convert_episodic_memory to conditionally include episode content
- Update memory_manager to pass 'full' parameter to fetch service

This allows external benchmarks and third-party integrations to access
the full episodic memory content for auditing and verification purposes.

See: EverMind-AI#131
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.

10 participants