Skip to content

feat(agent-content): add stable memory carrier API#1427

Open
yeyitech wants to merge 3 commits intovolcengine:mainfrom
yeyitech:feat/issue-1251-agent-content-api
Open

feat(agent-content): add stable memory carrier API#1427
yeyitech wants to merge 3 commits intovolcengine:mainfrom
yeyitech:feat/issue-1251-agent-content-api

Conversation

@yeyitech
Copy link
Copy Markdown
Contributor

Summary

  • add a dedicated /api/v1/agent-content API for stable named agent memory carriers
  • support create, replace, append, and merge flows while preserving generic /api/v1/content/write semantics
  • expose the same capability through embedded SDK entry points and add focused server/service tests

Details

  • restrict the new API to agent-scoped markdown files under viking://agent/<agent_space>/memories/<category>/...
  • allow create-if-missing and error-if-exists carrier registration semantics
  • reuse memory refresh plumbing after writes and reuse MemoryExtractor._merge_memory_bundle() for merge, with append-style fallback when structured merge is unavailable

Verification

  • python -m compileall openviking/async_client.py openviking/client/local.py openviking/server/routers/agent_content.py openviking/service/fs_service.py openviking/storage/content_write.py openviking/sync_client.py tests/server/test_api_agent_content.py tests/server/test_agent_content_service.py tests/server/test_content_write_service.py
  • manual embedded/ASGI verification for service + endpoint + SDK flows (create/append/merge)
  • note: targeted pytest is currently blocked in this repo by the existing pytest-asyncio collection bug: AttributeError: 'Package' object has no attribute 'obj'

Fixes #1251

@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

1251 - Partially compliant

Compliant requirements:

  • Add a dedicated /api/v1/agent-content API for stable named agent memory carriers
  • Support create, replace, append, and merge flows
  • Preserve generic /api/v1/content/write semantics
  • Expose capability through embedded SDK entry points
  • Add focused server/service tests
  • Restrict API to agent-scoped markdown files under viking://agent/<agent_space>/memories/<category>/...
  • Allow create-if-missing and error-if-exists carrier registration semantics
  • Reuse memory refresh plumbing and MemoryExtractor._merge_memory_bundle() for merge

Non-compliant requirements:

(no items)

Requires further human verification:

(no items)

⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🏅 Score: 90
🧪 PR contains tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@github-actions
Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

RFC: dedicated agent content API for stable named memory carriers

1 participant