Skip to content

feat(python-sdk): MemoryClient with store/search/delete (GOV-39)#8

Closed
Shaivpidadi wants to merge 1 commit intofeat/1.4c-usage-budgetfrom
feat/1.4d-context-memory
Closed

feat(python-sdk): MemoryClient with store/search/delete (GOV-39)#8
Shaivpidadi wants to merge 1 commit intofeat/1.4c-usage-budgetfrom
feat/1.4d-context-memory

Conversation

@Shaivpidadi
Copy link
Copy Markdown
Member

@Shaivpidadi Shaivpidadi commented Apr 17, 2026

Summary

  • src/governs_ai/memory.py: new MemoryClient class
    • store(content, metadata, user_id, agent_id)dict
    • search(query, top_k, user_id, threshold)List[MemoryResult]
    • delete(memory_id) → None
    • Async variants: async_store, async_search, async_delete
  • MemoryResult dataclass: memory_id, content, score, metadata
  • client.memory property wired into GovernsAIClient
  • 5 unit tests: store payload, search result list, empty search, delete id, async store

GovernsAI Tracker

GOV-39: 1.4d context_memory client

Test plan

  • Unit test: store() sends correct payload (content, metadata)
  • Unit test: search() returns list of MemoryResult objects with correct fields
  • Unit test: search() returns empty list when no results
  • Unit test: delete() sends correct memory_id
  • Unit test: async_store() sends correct payload

- src/governs_ai/memory.py: MemoryClient class
  - store(content, metadata, user_id, agent_id) → dict
  - search(query, top_k, user_id, threshold) → List[MemoryResult]
  - delete(memory_id) → None
  - async variants: async_store, async_search, async_delete
  - MemoryResult dataclass: memory_id, content, score, metadata
- client.memory property wired into GovernsAIClient
- 5 unit tests: store payload, search result list, empty search, delete id, async store

Refs: GOV-39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant