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
passwordand modern Redis 6+username/passwordACLs. - 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.Redisclient 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:
| Variable | Description | Default |
|---|---|---|
REDIS_HOST |
Redis server hostname | localhost |
REDIS_PORT |
Redis server port | 6379 |
REDIS_DB |
Redis database number | 0 |
REDIS_USERNAME |
Username for ACL authentication | None |
REDIS_PASSWORD |
Password for authentication | None |
REDIS_SSL |
Enable SSL/TLS connection (true/false) |
false |
Usage
Environmental Configuration (Recommended)
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")
Release files for agentswarm-redis-store 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentswarm_redis_store-0.1.0.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentswarm_redis_store-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.7 kB
Release files / agentswarm_redis_store-0.1.0.tar.gz
| Download URL | agentswarm_redis_store-0.1.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed2e155cf325bd3141735c804fcc947272b01be65ee3607deb8ca141b14895c1
|
|
BLAKE2b-256 checksum How to use checksums |
108fc1bfc37b6a06a2052f0eaef18ef8114132c0b7a47c59642f33cb4dbb86d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 27, 2026.
Transparency logRelease files / agentswarm_redis_store-0.1.0-py3-none-any.whl
| Download URL | agentswarm_redis_store-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51c8799a76f720ae8bf35eca65fbf1f2877798e671927f300eb8be0d7d67881d
|
|
BLAKE2b-256 checksum How to use checksums |
8792ba66e6acf6760c9361fa575462a056e149c03c6721fe79e87d0d32fe0e2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 27, 2026.
Transparency log