Catalog PyPI
PACKAGE EXPLORERView in registry

agentswarm-redis-store

PyPI

Redis implementation of the Store interface for ai-agentswarm.

agentsaipersistenceredisstore
Versions collected1
Direct dependencies8From release 0.1.0
Last observed20 Oct, 23:31 UTC

README

Version 0.1.0 documentation

agentswarm-redis-store

Redis implementation of the Store interface for ai-agentswarm.

Security Configuration

This project focuses on secure Redis connections. It supports:

  • SSL/TLS: For encrypted communication.
  • ACL/Passwords: For authenticated access.
  • Safe Serialization: Uses JSON by default for structured data.

Installation

pip install agentswarm-redis-store

Local Development

If you are working on the source code:

# Clone the repository
cd agentswarm-redis-store

# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate

# Install in editable mode
pip install -e .

Security Focus

The RedisStore is designed with security as a primary concern:

  • SSL/TLS: Mandatory for production environments to prevent eavesdropping.
  • Authentication: Supports both legacy password and modern Redis 6+ username/password ACLs.
  • Secure Reconstruction: to_dict() returns a minimal configuration that triggers reconstruction from environment variables on the remote side, ensuring sensitive credentials are never serialized or transmitted.
  • Client Injection: Allows passing a pre-configured redis.Redis client for advanced use cases (e.g., custom pooling, sentinel).

Configuration Environment Variables

When using RedisStore.from_env() or remote reconstruction, the following environment variables are supported:

VariableDescriptionDefault
REDIS_HOSTRedis server hostnamelocalhost
REDIS_PORTRedis server port6379
REDIS_DBRedis database number0
REDIS_USERNAMEUsername for ACL authenticationNone
REDIS_PASSWORDPassword for authenticationNone
REDIS_SSLEnable SSL/TLS connection (true/false)false

Usage

Set REDIS_HOST, REDIS_PASSWORD, etc., in your environment and use:

from agentswarm.redis.store import RedisStore
store = RedisStore.from_env()

Direct Client Injection

import redis
from agentswarm.redis.store import RedisStore

client = redis.Redis(host="localhost", db=0)
store = RedisStore(redis_client=client)

Remote Reconstruction

store = RedisStore.from_env()
config = store.to_dict() # Returns {"recreate_from_env": True}

# On a remote machine (with its own REDIS_HOST env var)
remote_store = RedisStore.recreate(config)

Integration with Agentswarm

You can use the RedisStore as the backend for the agentswarm.Context:

from agentswarm.redis.store import RedisStore
from agentswarm.datamodels.context import Context

# 1. Initialize the store (e.g., from environment)
store = RedisStore.from_env()

# 2. Inject into the Context
context = Context(
    trace_id="my-unique-trace",
    messages=[],
    store=store,
    tracing=my_tracing_instance
)

# 3. Use as usual
context.store.set("key", "value")

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.027 Jan 20268

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
ai-agentswarm/agentswarm-redis-store

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 23:31 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:658f6d412fe4c98cb88ea7ccb937200c61a2c4f31d63add520ca44aec700ff33