Skip to content

docs: add hybrid and keyword search references across documentation#264

Open
nkanu17 wants to merge 1 commit intomainfrom
pr/docs-hybrid-search-references
Open

docs: add hybrid and keyword search references across documentation#264
nkanu17 wants to merge 1 commit intomainfrom
pr/docs-hybrid-search-references

Conversation

@nkanu17
Copy link
Copy Markdown
Contributor

@nkanu17 nkanu17 commented Apr 2, 2026

Summary

Update all documentation and READMEs to consistently describe search as supporting semantic, keyword, and hybrid modes instead of only semantic.

This is Part 1 of 2 PRs split from #251 to make review easier. This PR contains only documentation changes. Part 2 (core fix + MCP) builds on this branch.

Changes

  • Expand feature descriptions across all docs to include keyword and hybrid search
  • Add SDK usage examples (Python, TypeScript/JS, Java) for keyword and hybrid search modes
  • Add full-text indexing table to long-term memory docs showing which fields are indexed
  • Fix deprecated function reference in agent examples (get_working_memory to get_or_create_working_memory)
  • Fix tuple unpacking order in error handling example
  • Update search capability descriptions across all guides and READMEs

Files Changed (12)

  • README.md
  • docs/README.md, docs/index.md, docs/long-term-memory.md, docs/quick-start.md, docs/use-cases.md, docs/java-sdk.md, docs/typescript-sdk.md, docs/agent-examples.md
  • examples/README.md
  • agent-memory-client/README.md, agent-memory-client/agent-memory-client-js/README.md

Context

The server already supports keyword (BM25) and hybrid (RRF) search modes via the search_mode parameter, but documentation only referenced semantic search. This brings docs in line with actual capabilities.

Per discussion on #251 (@vishal-bala, @abrookins, @tylerhutcherson, @nkanu17): MCP documentation for search modes is in Part 2 alongside the code changes, since MCP docs should stay coupled with the MCP implementation.

Review Notes

  • No code behavior changes in this PR
  • All changes are documentation and examples only
  • docs/mcp.md changes are intentionally in Part 2

Refs: #251 (superseded by this PR and #265), #253 (tracking issue for remaining MCP/REST gaps)


Note

Low Risk
Low risk because changes are documentation/examples only; main risk is minor confusion if examples or parameter names don’t match released SDK/server behavior.

Overview
Updates docs and READMEs to consistently describe long-term memory search as supporting semantic (default), keyword, and hybrid modes (including hybrid_alpha) instead of only semantic search.

Adds/updates SDK examples (Python, JS/TS, Java) to show search_mode/searchMode usage for keyword and hybrid search, and refreshes examples to use get_or_create_working_memory (including corrected tuple unpacking / “created” handling) rather than get_working_memory.

Written by Cursor Bugbot for commit 8095f77. This will update automatically on new commits. Configure here.

Update all documentation and READMEs to consistently describe search as
supporting semantic, keyword, and hybrid modes instead of only semantic.

Changes:
- Expand feature descriptions to include keyword and hybrid search
- Add SDK usage examples (Python, TypeScript/JS, Java) for keyword and
  hybrid search modes
- Add full-text indexing table to long-term memory docs
- Fix deprecated function reference in agent examples
- Fix tuple unpacking order in error handling example
- Update search capability descriptions across all guides

Context: The server already supports keyword (BM25) and hybrid (RRF)
search modes via the search_mode parameter, but documentation only
referenced semantic search. This brings docs in line with actual
capabilities.

Refs: #251, #253
Copilot AI review requested due to automatic review settings April 2, 2026 22:11
@jit-ci
Copy link
Copy Markdown

jit-ci bot commented Apr 2, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. The documentation changes accurately reflect the server's search capabilities and are consistently applied across all files. No suggestions at this time.

@nkanu17
Copy link
Copy Markdown
Contributor Author

nkanu17 commented Apr 2, 2026

@codex review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documentation-only update to align the project docs and SDK READMEs with the server’s existing support for semantic, keyword, and hybrid search modes, and to refresh examples to match current client APIs.

Changes:

  • Expand documentation language to consistently describe semantic/keyword/hybrid search across guides and READMEs.
  • Add keyword/hybrid search usage examples for TypeScript/JS and Java SDK docs (and Python client README).
  • Update working-memory example code to use get_or_create_working_memory and correct tuple unpacking (created, memory).

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Updates feature list + architecture diagram text to mention semantic/keyword/hybrid search.
examples/README.md Updates example feature description to include keyword/hybrid search.
docs/use-cases.md Updates best-practice guidance to reference all search modes.
docs/typescript-sdk.md Adds keyword + hybrid search examples for the TS SDK.
docs/README.md Updates the feature matrix row label to include semantic/keyword/hybrid search modes.
docs/quick-start.md Updates quick-start narrative bullets to mention all search modes.
docs/long-term-memory.md Updates long-term memory overview and adds keyword/hybrid sections + examples.
docs/java-sdk.md Adds keyword + hybrid search examples for the Java SDK.
docs/index.md Updates landing-page bullets to mention semantic/keyword/hybrid search.
docs/agent-examples.md Updates example descriptions and fixes working-memory example to use get_or_create_working_memory.
agent-memory-client/README.md Updates working-memory example to get_or_create_working_memory and adds keyword/hybrid search examples.
agent-memory-client/agent-memory-client-js/README.md Adds keyword/hybrid search examples and clarifies default search mode.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| Feature | REST API | MCP Server | CLI | Documentation |
|---------|----------|------------|-----|---------------|
| **Memory Search** | ✅ `/v1/long-term-memory/search` | ✅ `search_long_term_memory` | ❌ | [REST API](api.md), [MCP](mcp.md) |
| **Memory Search** (semantic, keyword, hybrid) | ✅ `/v1/long-term-memory/search` | ✅ `search_long_term_memory` | ❌ | [REST API](api.md), [MCP](mcp.md) |
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Feature Cross-Reference table marks CLI support for “Memory Search” as ❌, but the CLI does provide a agent-memory search command (see agent_memory_server/cli.py). Please update the CLI column to ✅ (and ideally link to the CLI search docs/section) so this matrix reflects actual capabilities.

Suggested change
| **Memory Search** (semantic, keyword, hybrid) |`/v1/long-term-memory/search` |`search_long_term_memory` | | [REST API](api.md), [MCP](mcp.md) |
| **Memory Search** (semantic, keyword, hybrid) |`/v1/long-term-memory/search` |`search_long_term_memory` | `agent-memory search` | [REST API](api.md), [MCP](mcp.md), [CLI](cli.md) |

Copilot uses AI. Check for mistakes.
Comment on lines 347 to +351
MemoryServerError
)

try:
memory = await client.get_working_memory("nonexistent-session")
except MemoryNotFoundError:
print("Session not found")
created, memory = await client.get_or_create_working_memory("nonexistent-session")
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this error-handling example, MemoryNotFoundError is still imported but is no longer used (the example now uses get_or_create_working_memory, which creates instead of raising not-found). Remove the unused import to avoid confusion for readers copying this snippet.

Copilot uses AI. Check for mistakes.
Comment on lines +271 to 274
- Messages - Semantic, keyword & hybrid search
- Structured memories - Topic modeling
- Summary of past messages - Entity recognition
- Metadata - Deduplication
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The architecture diagram is inside a code block and uses spaced columns; removing the |- indentation on this line makes the first column start at column 1, which visually misaligns with the arrows above. Consider keeping the prior indentation (or using a consistent prefix like |-) so the two-column layout stays aligned and easier to read.

Suggested change
- Messages - Semantic, keyword & hybrid search
- Structured memories - Topic modeling
- Summary of past messages - Entity recognition
- Metadata - Deduplication
|- Messages - Semantic, keyword & hybrid search
|- Structured memories - Topic modeling
|- Summary of past messages - Entity recognition
|- Metadata - Deduplication

Copilot uses AI. Check for mistakes.
Comment on lines +7 to 11
Long-term memory provides persistent storage that survives server restarts and session expiration. It's optimized for semantic, keyword, and hybrid search, deduplication, and rich metadata to enable intelligent retrieval of relevant information.

| Feature | Details |
|---------|---------|
| **Scope** | Cross-session, persistent |
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated overview/table emphasize keyword + hybrid search and full-text indexing, but the “Characteristics” list immediately below still says “Vector Indexed: Semantic search …”, which now reads as semantic-only. Consider updating that bullet to be search-mode-agnostic (or explicitly mention full-text + hybrid support) for internal consistency on this page.

Copilot uses AI. Check for mistakes.
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 347 to +351
MemoryServerError
)

try:
memory = await client.get_working_memory("nonexistent-session")
except MemoryNotFoundError:
print("Session not found")
created, memory = await client.get_or_create_working_memory("nonexistent-session")
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this error-handling snippet, MemoryNotFoundError (and MemoryValidationError) are imported but not used, and MemoryNotFoundError is no longer applicable to the shown get_or_create_working_memory() call (it creates the session instead of raising not-found). Please either remove the unused imports or adjust the example to demonstrate the exceptions being imported.

Copilot uses AI. Check for mistakes.

# Get only the 3 most recent messages
memory = await client.get_working_memory(
created, memory = await client.get_or_create_working_memory(
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example now unpacks created, memory = ... but never uses created. For clarity in docs (and to avoid encouraging unused variables), consider naming it _created/_ or adding a brief note/branch showing how to handle the created flag.

Suggested change
created, memory = await client.get_or_create_working_memory(
_created, memory = await client.get_or_create_working_memory(

Copilot uses AI. Check for mistakes.
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