This release is a pre-release and may not be stable for production use.
redis-agent-lens
Python management and read clients for Redis Lens. This alpha prerelease contains the control-plane and data-plane REST APIs. Telemetry collection and OTel instrumentation are owned by redis-iris. This package does not import OpenTelemetry, initialize tracing, or export spans.
Installation and status
Prepared version: 0.1.0a1. Not published by this change.
pip install redis-agent-lens==0.1.0a1
Install after publication; pin alpha versions. Breaking changes may occur between alpha releases. Redis AI documentation and package page.
Two independently configured clients
LensService manages the deployment/account's singleton instance. Lens reads
one instance. Configure each URL and credential explicitly. Cloud instance responses include
endpoint candidates and accessibility metadata; select an appropriate endpoint
for the deployment. The package does not select an endpoint or mint a read key.
from redis_agent_lens import Lens, LensService
with LensService(server_url=service_url, token=service_token) as service:
instance = service.get_instance()
with Lens(server_url=read_url, instance_id=instance.instance_id, api_key=read_key) as lens:
agents = lens.list_agents()
sessions = lens.list_sessions(agent_id="support-bot", range="24h")
LensService has get/update instance and cloud-only register instance, list
databases by storage role (records or content), and get network info for
control-plane egress allow-listing. Database discovery exposes eligibility,
readiness, and accessibility flags; registration still performs live checks.
On-prem instances are provisioned at startup and have no registration or
discovery routes. Cloud responses include database bindings and endpoint
candidates; on-prem get/update responses omit them. Cloud get/update/register
and database discovery require the operator JWT, matching SM JSESSIONID cookie
and CSRF token. Use a session-aware transport/fetcher to supply these on every
request. Network info requires operator read authority.
Lens has list agents, list sessions, get session, get turn, get content, and
get Context Retriever result. instanceId is bound on the client. Session lists
require agent and range, support repeated outcome filters, and expose the opaque
next cursor without promising snapshot isolation. Preserve the filters across
pages. Session detail currently returns retained turn summaries together; the
server rejects sessions over its current 10,000-turn cap.
Turn IDs are OTel trace IDs. Turn detail includes component observations and
content references. Fetch content separately and inspect availability before
using its body: expired/not-captured/masked are valid states, not HTTP failures.
The wire envelope contains base64 bytes. The generated body representation is
shown in the operation/model reference; no implicit text or JSON parsing occurs.
Credentials and transports
- DP accepts a Bearer instance key with
readorfull. Cloud UI reads also accept an SM JWT with Lens read authority and matching tenant; supply it via the sameapi_key/apiKeyoption. SM JWTs do not authorize OTLP ingest. - CP uses
token; its fallback isLENS_SERVICE_TOKEN. - DP fallback is
LENS_API_KEY. Neither client reads the existing instrumentation credentialIRIS_LENS_API_KEYor falls back to the other plane. - Clients support independent transports, callable credentials, timeouts, and explicit retry configuration. Retries are not enabled by default.
- CP models/errors live under
redis_agent_lens.controlplane; DP models/errors retain their own namespace.
Python supports sync/async methods (async suffix _async), context managers, and caller-owned HTTP clients.
The SDK takes a service root. For a gateway that already inserts
/v1/instances/<id>, adapt its fetcher to avoid duplicating that prefix.
See DP operations and
CP operations.
Internal grant callbacks, Identity key lifecycle, OTLP ingestion, and planned
backend APIs are excluded. Use redis-iris for telemetry collection and instrumentation.
Metadata
Release files for redis-agent-lens 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| redis_agent_lens-0.1.0a1.tar.gz | 85.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| redis_agent_lens-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 262.0 kB
Release files / redis_agent_lens-0.1.0a1.tar.gz
| Download URL | redis_agent_lens-0.1.0a1.tar.gz |
|---|---|
| Size | 85.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72295f837fbfcfa7a9c640f42c951a08ebc498e5e0362754f927e2ccb8a569c7
|
|
BLAKE2b-256 checksum How to use checksums |
9c8632bd5c571650aaee1933363d28686ce8e58b4d0d80e45f86cd5ac02bdb60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.10.22 Linux/6.8.0-1064-azure
|
Release files / redis_agent_lens-0.1.0a1-py3-none-any.whl
| Download URL | redis_agent_lens-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 176.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83c8dd0c5068d43ce71d28962a2ab6779e3d6539f1fe6922dd16b5e805d20144
|
|
BLAKE2b-256 checksum How to use checksums |
9961a7270a3867dbdf7f53bfa65cc5a8b75f03a7c579b867931634b63069704a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.10.22 Linux/6.8.0-1064-azure
|
Security for redis-agent-lens 0.1.0a1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.