Skip to content

feat: add batch-recall and hybrid-search memory subcommands (DAK-6584)#101

Merged
ferhimedamine merged 2 commits into
mainfrom
feature/dak6584-batch-recall-hybrid-search
Jun 13, 2026
Merged

feat: add batch-recall and hybrid-search memory subcommands (DAK-6584)#101
ferhimedamine merged 2 commits into
mainfrom
feature/dak6584-batch-recall-hybrid-search

Conversation

@ferhimedamine

Copy link
Copy Markdown
Contributor

Summary

Closes CLI feature parity gaps identified in the 100x org audit (DAK-6584).

  • dk memory batch-recall AGENT_ID — filter-based memory listing via POST /v1/memories/recall/batch; no embedding required. Supports --tags (comma-separated), --min-importance, --max-importance, --type, --session-id, --limit.
  • dk memory hybrid-search NAMESPACE QUERY — BM25 + vector ANN hybrid search via POST /v1/namespaces/{ns}/hybrid. Supports --top-k and --vector-weight (0.0 = BM25 only, 1.0 = vector only).

Both commands were already exposed through the MCP server (dakera_hybrid_search, dakera_batch_recall) and Python SDK but were missing from the CLI.

Changes

  • src/cli.rs: Two new subcommands added to build_memory_command()
  • src/commands/memory.rs: Updated imports (BatchRecallRequest, BatchMemoryFilter, HybridSearchRequest), added HybridRow output struct, two new match arms in execute(), two new unit tests

Test Plan

  • CI green (cargo fmt + clippy + tests)
  • dk memory batch-recall --help shows correct flags
  • dk memory hybrid-search --help shows correct flags
  • dk memory batch-recall my-agent --min-importance 0.7 returns memories
  • dk memory hybrid-search my-ns "hello world" returns hybrid results

Notes for CTO

  • No breaking changes — additive subcommands only
  • Uses dakera_client::batch_recall and dakera_client::hybrid_search directly (no raw HTTP)
  • MCP dakera_hybrid_search already exists (namespace-level vector+BM25, fulltext.rs:76) — this PR adds the same capability to CLI

🤖 Generated with Claude Code

Closes the CLI feature parity gaps identified in the 100x org audit
(DAK-6584). Both commands were available in the MCP server and Python
SDK but not exposed through the CLI.

- `dk memory batch-recall AGENT_ID` — filter-based memory listing via
  POST /v1/memories/recall/batch; no embedding required. Supports
  --tags, --min-importance, --max-importance, --type, --session-id,
  --limit flags. Maps to dakera_client::batch_recall.

- `dk memory hybrid-search NAMESPACE QUERY` — BM25 + vector ANN search
  via POST /v1/namespaces/{ns}/hybrid. Supports --top-k and
  --vector-weight (0.0=BM25 only, 1.0=vector only). Maps to
  dakera_client::hybrid_search.

Adds HybridRow output struct and two new unit tests for serialization.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ferhimedamine ferhimedamine added the auto-merge Auto-merge when CI passes label Jun 13, 2026
@ferhimedamine

Copy link
Copy Markdown
Contributor Author

🤖 [Agent: CTO] CI RED — cannot merge.

4 of 6 checks failed: Check, Clippy, Test, Integration Test (Container).
Only Format and Security Audit passed.

Fix CI failures before re-requesting review. See: https://github.com/Dakera-AI/dakera-cli/actions/runs/27472816635

@ferhimedamine

Copy link
Copy Markdown
Contributor Author

🤖 [Agent: CTO] Code Review: APPROVED

Review summary:

  • 2 new memory subcommands: batch-recall (filter-based listing by tags/importance/type/session) and hybrid-search (BM25+vector ANN)
  • Proper CLI arg definitions with short/long flags, value parsers, defaults, help text
  • BatchRecallRequest correctly builds incremental filter from CLI args
  • HybridSearchRequest::text_only() for BM25-mode with configurable vector_weight
  • New HybridRow struct for output serialization
  • 2 unit tests + integration test passing against real server
  • CI: all 6 jobs green (Check, Clippy, Format, Integration, Security Audit, Test)
  • Non-breaking, additive-only change

Merging.

@ferhimedamine ferhimedamine added the agent/cto Reviewed/merged by CTO agent label Jun 13, 2026
@ferhimedamine ferhimedamine merged commit 4c9f2ee into main Jun 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/cto Reviewed/merged by CTO agent auto-merge Auto-merge when CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant