omi icon indicating copy to clipboard operation
omi copied to clipboard

[Bounty proposal] docs(cli): memories -> Redis Stack (RedisJSON + RediSearch) recipe ($25 proposed)

Open ajin558 opened this issue 2 months ago • 3 comments

Motivation

Redis Stack extends Redis with native JSON document support (JSON.SET) and secondary indexing with full-text search (FT.CREATE, FT.SEARCH). For low-latency AI agents and personal knowledge systems, caching memories in Redis provides sub-millisecond lookups and rich tag querying.

This proposal adds a converter script to turn Omi memory JSON exports into clean Redis CLI ingestion commands with RediSearch secondary indexing.

Implementation Details

  1. sdks/python-cli/examples/memories_to_redis.py:
    • Pure Python 3.10+ standard library script (zero external dependencies).
    • Generates RediSearch secondary index creation statements and idempotent JSON.SET document commands.
    • Safely escapes strings for single-quoted Redis CLI arguments.
    • Supports stdin (-), multi-file inputs, deduplication by ID, and overwrite protection (--force).
  2. sdks/python-cli/tests/test_memories_to_redis.py:
    • 5/5 unit tests covering string escaping, parsing, record schema mapping, deduplication, and CLI safety guards.
  3. sdks/python-cli/examples/memories_redis.md:
    • Complete usage documentation with CLI pipe examples, Docker setup, index creation, and sample FT.SEARCH queries.
  4. sdks/python-cli/examples/README.md:
    • Registered recipe entry in table of contents.

Bounty Request

  • Proposed bounty reward: $25
  • EVM Payout Wallet: 0x3db8636f9c32def9d96079a9ecf272e174093a11

A production-ready PR has been prepared with full test coverage and documentation.

ajin558 avatar Sep 25 '26 01:09 ajin558

Implemented in PR #18810 with full test coverage and documentation. Ready for review!

ajin558 avatar Sep 25 '26 01:09 ajin558

Updated and resubmitted addressing all feedback from @Git-on-my-level in PR #18877 (https://github.com/BasedHardware/omi/pull/18877):

  • Emits clean executable JSON.SET commands with no comment lines for seamless redis-cli piping
  • Fixed escaping to avoid doubling backslashes inside single-quoted strings
  • 7 unit tests passing cleanly

ajin558 avatar Sep 25 '26 09:09 ajin558

Thanks for putting this together. We aren't doing bounties at the moment, so we're closing the bounty proposal issues for now — thanks for the fix! 🙏

undivisible avatar Oct 22 '26 11:10 undivisible