{
  "schema_version": 2,
  "id": "develop/ai/context-engine/agent-mesh",
  "title": "Redis Agent Mesh",
  "url": "https://redis.io/docs/latest/develop/ai/context-engine/agent-mesh/",
  "summary": "Create resumable event streams with Agent Mesh through A2A or FastAPI.",
  "tags": [
    "docs",
    "develop",
    "ai"
  ],
  "last_updated": "2026-11-03T09:50:14-05:00",
  "children": [
    {
      "id": "develop/ai/context-engine/agent-mesh/quickstart",
      "summary": "Create your first resumable event stream with A2A or FastAPI.",
      "title": "Get started with Agent Mesh",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/agent-mesh/quickstart/"
    },
    {
      "id": "develop/ai/context-engine/agent-mesh/a2a-sdk",
      "summary": "Add resumable task updates to an A2A Python application.",
      "title": "Integrate Agent Mesh with A2A",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/agent-mesh/a2a-sdk/"
    },
    {
      "id": "develop/ai/context-engine/agent-mesh/fastapi-sse-sdk",
      "summary": "Add resumable application event streams to a FastAPI application.",
      "title": "Integrate Agent Mesh with FastAPI",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/agent-mesh/fastapi-sse-sdk/"
    }
  ],
  "page_type": "content",
  "content_hash": "2d78e4a5deab47aea2e2ac4ac93e24ebf3b3945a0fa1aa9f58e8502e1292d48f",
  "sections": [
    {
      "id": "what-is-redis-agent-mesh",
      "title": "What is Redis Agent Mesh?",
      "role": "overview",
      "text": "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.\n\nThe 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.\n\n<div class=\"grid grid-cols-1 md:grid-cols-3 gap-6 my-8\">\n  \n</div>"
    },
    {
      "id": "why-use-resumable-event-streams",
      "title": "Why use resumable event streams?",
      "role": "content",
      "text": "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.\n\nResumable streams let you:\n\n- **Show progress throughout the work.** Deliver progress updates, tool results, and completed output as your application produces them.\n- **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.\n- **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.\n\nResumption recovers event delivery. Your application remains responsible for restarting work if the process executing it stops. With A2A, another process can [take over a Task](https://redis.io/docs/latest/develop/ai/context-engine/agent-mesh/a2a-sdk#hand-off-a-task-to-another-process) and finish it on the same event log."
    },
    {
      "id": "choose-an-integration",
      "title": "Choose an integration",
      "role": "content",
      "text": "| Integration | Use it to | Python module | Install with |\n| --- | --- | --- | --- |\n| A2A server | Resume retained task updates after reconnecting, including through another server replica | `redis_iris.agent_mesh.a2a` | `pip install 'redis-iris[a2a]'` |\n| 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]'` |\n\nThese 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. Both require Redis server 8.6.2+; A2A also requires JavaScript Object Notation (JSON) support."
    },
    {
      "id": "how-it-works",
      "title": "How it works",
      "role": "content",
      "text": "Both integrations retain events in Redis and give clients cursors for resuming delivery. Clients reconnect with their last event cursor to receive retained updates.\n\nFor 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.\n\nFor 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."
    },
    {
      "id": "requirements-and-limits",
      "title": "Requirements and limits",
      "role": "content",
      "text": "- Both integrations require Python 3.11 or later and native producer idempotency (`XADD IDMP`). Both require Redis 8.6.2+; A2A also requires JSON support. The A2A integration targets the official A2A Python SDK 1.2.x.\n- Derive ownership from verified identity. Task IDs and cursors grant no access; authorize requests and reconnections in your application.\n- 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.\n- Your application owns execution and Redis durability. Stored tasks do not restart interrupted computation or guarantee exactly-once external effects.\n- Standalone Redis and normal A2A operation on a three-primary Redis Open Source Cluster have local validation evidence. Cloud, Enterprise, failover recovery, and sustained capacity remain unqualified for this beta."
    },
    {
      "id": "get-started",
      "title": "Get started",
      "role": "content",
      "text": "Follow the [quickstart](https://redis.io/docs/latest/develop/ai/context-engine/agent-mesh/quickstart) to [resume A2A task updates](https://redis.io/docs/latest/develop/ai/context-engine/agent-mesh/quickstart#resume-a2a-task-updates) or [resume FastAPI events](https://redis.io/docs/latest/develop/ai/context-engine/agent-mesh/quickstart#resume-fastapi-events).\n\nTo integrate with your application, follow the [A2A SDK guide](https://redis.io/docs/latest/develop/ai/context-engine/agent-mesh/a2a-sdk) or [FastAPI SSE SDK guide](https://redis.io/docs/latest/develop/ai/context-engine/agent-mesh/fastapi-sse-sdk). These guides cover configuration, authorization, replay, and recovery.\n\nUse the [agent SDK recipes](https://redis.io/docs/latest/develop/ai/context-engine/agent-mesh/fastapi-sse-sdk#agent-sdk-recipes) to stream an existing OpenAI Agents SDK, PydanticAI, Google ADK, or LangGraph agent through FastAPI."
    }
  ],
  "examples": []
}
