Skip to content

feat: add v2 API#907

Closed
Teingi wants to merge 16 commits into
mainfrom
dev_1.2.0_0420
Closed

feat: add v2 API#907
Teingi wants to merge 16 commits into
mainfrom
dev_1.2.0_0420

Conversation

@Teingi
Copy link
Copy Markdown
Member

@Teingi Teingi commented Apr 22, 2026

No description provided.

rongfeng.frf and others added 15 commits April 11, 2026 19:31
Introduce /api/v2 endpoints that accept SDK configuration (database,
LLM, embedding, etc.) in the request body instead of requiring
server-side .env setup. v1 and v2 coexist - v1 routes are unchanged.

Key design: business logic is extracted into shared _do_xxx() functions;
v1 and v2 handlers are thin wrappers that differ only in how they
obtain the MemoryService (singleton from app.state vs per-request
construction from body.config). All v2 endpoints use POST so config
can be carried in the JSON body.
…ules

Extract shared business logic into api/shared/, move v2 handlers into
api/v2/, and split v2 request models into models/request_v2.py so that
each API version lives in its own directory with clear boundaries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Downshift m0 from a fat app to a thin API layer by moving all
intelligence algorithms into the powermem library:

- SearchQueryOptimizer: pronoun resolution, compound query splitting,
  keyword extraction for semantic search (sync + async)
- ExperienceManager: distill reusable task-solving experiences from
  conversations and merge similar experiences (sync + async)
- ContentReviewer: dual-layer safety review with keyword blocklist
  (66 keywords) and LLM-based contextual review (sync + async)
- ExperienceQueryRewriter: title-style query rewriting for experience
  search (sync + async)
- strip_think_tags utility for reasoning model compatibility
- Enhanced FACT_RETRIEVAL_PROMPT and UPDATE_MEMORY_PROMPT with
  sensitive content filtering rules and language preservation
- Integrated search_with_rewrite() with parallel sub-query fan-out
  and deduplication in both Memory and AsyncMemory
- All new modules exposed via public API on Memory/AsyncMemory classes

Source: seekdb-m0 (always-merge experience logic, no skip)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: port intelligence capabilities from m0 into powermem core

See merge request oceanbase-ce-publish/powermem!62
…nal vector index

- Enrich SEARCH_QUERY_REWRITE_PROMPT with complex query decomposition
  rules (parallel intents, comparisons, conditionals, time spans),
  synonym expansion, and more examples
- Add "memory" field alongside "content" in StorageAdapter.get_memory()
  for API compatibility with m0
- Add create_vector_index parameter to OceanBase vector store to allow
  skipping vector index creation when not needed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: enhance search query prompt, add memory field to get, and optional vector index

See merge request oceanbase-ce-publish/powermem!63
feat: complete v2 API parity

See merge request oceanbase-ce-publish/powermem!64
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


rongfeng.frf seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Teingi Teingi closed this Apr 27, 2026
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.

2 participants