Skip to content
Merged
1 change: 1 addition & 0 deletions content/develop/ai/context-engine/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Redis Iris eliminates the infrastructure burden of building context-aware AI age
{{< tile-card icon="images/dev/icons/icon-redis-iris-64-duotone.png" title="Context Gateway" description="One MCP endpoint for the tools of any MCP server and your Redis data" url="/develop/ai/context-engine/context-gateway" >}}
{{< tile-card icon="images/dev/icons/icon-redis-iris-64-duotone.png" title="Agent Playbooks" description="Publish reusable answers and procedures for agents" url="/develop/ai/context-engine/agent-playbook" >}}
{{< tile-card icon="images/dev/icons/icon-redis-iris-64-duotone.png" title="Lens" description="Debug agent answers by tracing the context behind each turn" url="/develop/ai/context-engine/lens" >}}
{{< tile-card icon="images/dev/icons/icon-redis-code-64-duotone.png" title="Agent Mesh (preview)" description="Share agent-to-agent task state across Python replicas and resume event delivery" url="/develop/ai/context-engine/agent-mesh" >}}
</div>

## What is Redis Iris?
Expand Down
31 changes: 31 additions & 0 deletions content/develop/ai/context-engine/agent-mesh/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Agent Mesh documentation

- Agent Mesh is a preview Python SDK integration distributed through `redis-iris`.
Imports use `redis_iris.agent_mesh`.
- Lead with resumable event streams on Redis. Present A2A task state storage as
a supporting capability, and A2A and FastAPI SSE as two Python integration paths.
- Distinguish the independent `[a2a]` and `[fastapi-sse]` extras. The A2A
integration does not require the FastAPI SSE integration. Both extras can be
installed together; their shared redis-py range is `>=8.0.1,<9`. Keep Redis
server requirements (A2A 8.6+, FastAPI 8.6.2+) distinct from Python client versions.
- Use Agent2Agent (A2A), server-sent events (SSE), Task snapshots, event replay,
and application-owned execution. Explain acronyms on first use on each page.
- Write for the intended released package. Use package-index installation
commands with the documented extras, not PR refs, source installs or commit pins.
Do not invent a release version.
- Applications supply authentication and agent execution. A2A accepts application-owned
Redis clients; FastAPI uses SDK-managed pools and producer lifecycle.
Task IDs and cursors are not credentials. Derive ownership from verified identity
in deployed applications. The explicitly authorized loopback-only browser demos
use a fixed demo owner without authentication; keep that exception local.
- Replay is bounded by retention and can fall back to a current snapshot. Do not
promise automatic execution restart or exactly-once external effects.
- Keep the standalone Go mesh and its `agentmesh` HTTP client out of this SDK
quickstart. Their deployment and Redis requirements are separate.
- Keep user-facing integration guides here. Link exhaustive signatures and
implementation contracts to redis-iris documentation.
Preserve the product preview banner and qualification limitations.

- Keep an overview, one quickstart with both integrations, and one SDK guide
per integration. Each quickstart example reaches one first result. Keep
detailed configuration, authorization, replay and recovery in the SDK guides.
66 changes: 66 additions & 0 deletions content/develop/ai/context-engine/agent-mesh/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
alwaysopen: false
categories:
- docs
- develop
- ai
description: Create resumable event streams with Agent Mesh through A2A or FastAPI.
hideListLinks: true
linktitle: Agent Mesh
title: Redis Agent Mesh
weight: 40
bannerText: Redis Agent Mesh is currently available in preview. Features and behavior are subject to change.
bannerChildren: true
---

## What is Redis Agent Mesh?
Redis Agent Mesh provides resumable event streams on top of Redis. Your application keeps producing events when a client disconnects. When the client reconnects, it can receive retained updates after its last event cursor.
Comment thread
jruaux marked this conversation as resolved.
Resolved

The Agent Mesh software development kit (SDK) offers two Python integration paths: Agent2Agent (A2A) task updates through the official A2A Python SDK, and server-sent events (SSE) through FastAPI. Both are available in the `redis-iris` Python distribution. Your application supplies agent execution and authentication. A2A accepts application-owned Redis clients; the FastAPI integration uses SDK-managed pools and producer lifecycle.

<div class="grid grid-cols-1 md:grid-cols-3 gap-6 my-8">
{{< tile-card icon="images/dev/icons/icon-redis-code-64-duotone.png" title="Quickstart" description="Create your first resumable event stream with A2A or FastAPI" url="/develop/ai/context-engine/agent-mesh/quickstart" >}}
</div>

## Why use resumable event streams?

An agent response can take seconds or minutes as it calls tools, waits for results, and prepares an answer. If the user's connection drops halfway through, they need a way to catch up and receive the result without submitting the request again.

Resumable streams let you:

- **Show progress throughout the work.** Deliver progress updates, tool results, and completed output as your application produces them.
- **Reconnect to the same work.** The application can keep publishing while the client is disconnected. The client returns with its saved cursor to receive retained updates it missed and follow new ones.
- **Resume through another serving replica.** Redis gives replicas a shared event log. Replicas with the same Redis configuration and access policy can serve a reconnecting client, independently of which process produced the events.

Resumption recovers event delivery. Your application remains responsible for restarting work if the process executing it stops.

## Choose an integration

| Integration | Use it to | Python module | Install with |
| --- | --- | --- | --- |
| A2A server | Resume retained task updates after reconnecting, including through another server replica | `redis_iris.agent_mesh.a2a` | `pip install 'redis-iris[a2a]'` |
| FastAPI event streaming | Publish an event log and replay retained server-sent events (SSE) after reconnecting | `redis_iris.agent_mesh.fastapi_sse` | `pip install 'redis-iris[fastapi-sse]'` |

These integrations are independent. Install the integration you use, or install both in one Python environment with `pip install 'redis-iris[a2a,fastapi-sse]'`. Using both selects redis-py `>=8.0.1,<9`. This is the Python client version; A2A requires Redis server 8.6+; FastAPI requires 8.6.2+.

## How it works

Both integrations retain events in Redis and give clients cursors for resuming delivery. Clients reconnect with their last event cursor to receive retained updates.

For A2A, connect `RedisTaskStore` and its paired event stream to the official SDK's request handler, and expose the resumable routes. The integration also stores Task snapshots alongside their updates. Replicas using the same database, namespace, and ownership policy can serve the subscriptions.

For FastAPI, configure `FastAPIRedis(app).lifespan().streams()`, publish scoped run events through a `StreamWriter`, and serve them with `backend.sse()`. Event production is independent of client connections.

## Requirements and limits

- Both integrations require Python 3.11 or later and native producer idempotency (`XADD IDMP`). A2A requires Redis 8.6+ and FastAPI requires 8.6.2+. The A2A integration targets the official A2A Python SDK 1.2.x.
- Derive ownership from verified identity. Task IDs and cursors grant no access; authorize requests and reconnections in your application.
- Retention bounds replay. A2A can fall back to the current snapshot when event history is unavailable. If events are no longer retained, a FastAPI application must provide another way for clients to retrieve the current state.
- Your application owns execution and Redis durability. Stored tasks do not restart interrupted computation or guarantee exactly-once external effects.
- Standalone Redis has local validation evidence. Cluster, Enterprise, failover, and sustained capacity remain unqualified for this preview.

## Get started

Follow the [quickstart](/content/develop/ai/context-engine/agent-mesh/quickstart.md) to [resume A2A task updates](/content/develop/ai/context-engine/agent-mesh/quickstart.md#resume-a2a-task-updates) or [resume FastAPI events](/content/develop/ai/context-engine/agent-mesh/quickstart.md#resume-fastapi-events).

To integrate with your application, follow the [A2A SDK guide](/content/develop/ai/context-engine/agent-mesh/a2a-sdk.md) or [FastAPI SSE SDK guide](/content/develop/ai/context-engine/agent-mesh/fastapi-sse-sdk.md). These guides cover configuration, authorization, replay, and recovery.
Loading
Loading