Integrations
Client libraries
Use the typed Klyro clients for TypeScript, Python, and Go, or connect through any Redis client. Both paths use the same RESP wire protocol.
Install a TypeScript, Python, or Go client for typed methods covering all 15 MEM.* commands. Each typed client also exposes its underlying Redis client, so standard commands and raw calls remain useful for other languages and direct protocol access. See SDKs and packages.
Verified clients
These were run against Klyro over its real socket, and all of them pass:
| Client | Language | RESP2 | RESP3 |
|---|---|---|---|
| redis-py 8.1 | Python | Yes | Yes |
| go-redis v9 | Go | Yes | Yes |
| ioredis 5 | Node.js | Yes | n/a |
Others — Jedis, Lettuce, StackExchange.Redis, redis-rs — should work too; they are simply untested here.
Typed client basics
Each Klyro client keeps its ecosystem's standard Redis API and adds a typed memory surface. These examples connect to the default address, execute ordinary commands, and close the connection cleanly.
What the typed clients provide
| Client | Standard commands | Memory commands | Connection lifecycle |
|---|---|---|---|
| TypeScript / JavaScript | The returned ioredis instance | memory and memoryBuffer | connect (with lazyConnect), quit, disconnect |
| Python | Klyro subclasses redis.Redis | memory | close, connection_pool.disconnect |
| Go | Client embeds redis.UniversalClient | Memory | Close |
The wrappers do not start the server. By default they connect to 127.0.0.1:7171. Connection, retry, timeout, TLS, and pool settings are passed to ioredis, redis-py, or go-redis respectively; only use settings that the Klyro server supports.
Using generic Redis clients
Generic Redis clients do not know Klyro's memory family. Use the raw-command call each client provides for MEM.*. Standard commands such as GET, HSET, and LPUSHuse the client's normal methods.
| Client | Memory command call |
|---|---|
| redis-py | r.execute_command("MEM.SEARCH", "notes", "database") |
| ioredis | r.call("MEM.SEARCH", "notes", "database") |
| go-redis | r.Do(ctx, "MEM.SEARCH", "notes", "database") |
| redis-rs | redis::cmd("MEM.SEARCH").arg("notes").arg("database").query(&mut con) |
The typed equivalents are db.memory.search in TypeScript,db.memory.search in Python, and db.Memory.Search in Go. The complete method mapping is in SDKs and packages.
Sending vectors
VEC expects raw little-endian float32 bytes, four per dimension. Every language already has that shape; it just needs handing over without being decoded as text.
FVEC n f1..fn spells the same vector as decimal words. It is slower to parse and larger on the wire, so keep it for redis-cli, tests, and documentation.
Command line
redis-cli works if you have it:
Without it, nc still works, because Klyro accepts Redis’s inline command form. Replies come back in RESP, so they carry type markers:
Protocol details
Klyro negotiates RESP3 when a client sends HELLO 3, and answers RESP2 otherwise. The type-shape differences are implemented, so a client gets the same shapes it would from Redis: maps for HGETALL and CONFIG GET, sets for SMEMBERS and SINTER, doubles for ZSCORE, and nested pairs for WITHSCORES.
Every client exposes far more of the Redis API than Klyro implements. Calling something unimplemented returns ERR unknown command, which surfaces as an exception. The notable absences are scripting and the Stream, Bitmap, HyperLogLog, and Geo types. Klyro also has no authentication or TLS termination, so leave credentials unset and keep the server on a trusted network (or terminate TLS in a private proxy).
