---
title: "Redis Integration"
description: "Connect AI agents to Redis. Agents cache values with TTL, maintain atomic counters and locks, work with hashes, lists, sets and sorted sets, publish messages, and read server stats."
url: https://flowrunner.ai/integrations/redis
date_modified: 2026-08-01T02:40:32-07:00
---

# Redis

[Database](https://flowrunner.ai/integrations/category/databases-warehouses)

Connect AI agents to Redis. Agents cache values with TTL, maintain atomic counters and locks, work with hashes, lists, sets and sorted sets, publish messages, and read server stats.

[Verified](https://flowrunner.ai/integrations/verified "What does verified mean?") · 26 actions · Basic auth · available

[Redis website](https://redis.io/) · [Platform Documentation](https://redis.io/docs/) · Capability data verified 2026-07-14

1.  A webhook-triggered flow must process each event exactly once
2.  Agent runs Set Value with Only If Not Exists as an idempotency lock
3.  If the lock already existed, the agent skips the duplicate event
4.  Agent runs Increment to advance a rate-limit counter for the caller
5.  Agent reads cached context with Get Value before the expensive step
6.  On a failure, the agent reports it to the team via Slack
7.  Any Delete Keys or Execute Command that would clear production keys pauses for approval

## What This Integration Enables

Agents use Redis as the coordination fabric of a flow. They cache computed values and API responses with a TTL, guard steps with `SET NX` idempotency locks, maintain atomic counters for rate limits and inventory, queue work items with lists, track unique members with sets, build leaderboards with sorted sets, and broadcast fire-and-forget notifications with Publish Message. Get Server Info parses `INFO` into sections so an agent can alert on memory or connection thresholds. The connect-per-call model opens and closes a short-lived client per operation.

### Without FlowRunner

**Duplicate processing**: A retried webhook runs the same expensive work twice

**No shared coordination**: Parallel flow runs step on each other with no lock or counter

**Blocking key scans**: A \`KEYS\` scan on a large database stalls the whole server

### With FlowRunner

**Exactly-once by lock**: Set Value with Only If Not Exists guards each event as an idempotency lock

**Atomic coordination**: Increment and sorted sets give flows counters, limits, and leaderboards

**Safe production scans**: Find Keys uses incremental SCAN, never the blocking KEYS command

## Use Case Scenarios

### Exactly-once webhook processing

A flow is triggered by a webhook that can fire more than once for the same event. The agent runs Set Value with Only If Not Exists, keyed on the event id and given a TTL. If the write succeeds, this is the first time the event has been seen and the flow proceeds; if it fails, the event is a duplicate and the flow stops. The expensive downstream work runs exactly once.

### Cross-flow work queue

One flow pushes work items onto a list with Push To List; another flow pops them with Pop From List and processes each. Redis becomes a simple, durable hand-off between flows, and failures are reported to the team channel with Slack.

### Cache cleanup with a human gate

An agent needs to clear a set of cached keys during a release. Before it runs Delete Keys or a raw Execute Command against production, it does not act on its own. It routes the key pattern and a count for approval, and clears the keys only after a person confirms.

## Human-in-Loop Highlight

Redis makes destructive commands cheap to run, which is exactly why a production key flush deserves a human check. FlowRunner's answer is human-in-the-loop, an execution pattern where the agent pauses on its own, assembles the context and the choices, routes to a human on their preferred channel, and resumes the moment they respond. When Delete Keys would remove more keys than the configured threshold, or when Execute Command would run a wide-reaching command against a database flagged as production, the agent pauses and asks through Slack: "Ready to Delete Keys matching `session:*` (3,904 keys on db 0). Approve, narrow the pattern, or cancel?" The command runs only after a person confirms, with the approver and timestamp captured in the run log. A connector can run any command; an orchestration layer knows which commands should stop and ask.

Agent processes routinely

Detects exception requiring judgment

Clear match Continues automatically

Ambiguous Routes to human via Slack

Human decides

Agent resumes with decision

## Agent Capabilities

26 actions

### Strings

4

-   **Set Value** Runs \`SET\` with an optional TTL and only-if-not-exists, and reports whether the value was written. Use it for caching and as an idempotency lock.
-   **Get Value** Runs \`GET\` and returns the value or \`null\` with an \`exists\` flag.
-   **Increment** Runs atomic \`INCRBY\` (or \`INCRBYFLOAT\`) and returns the new value, for counters and rate limits.
-   **Decrement** Runs atomic \`DECRBY\` (or a negated float increment) and returns the new value.

### Keys

6

-   **Delete Keys** Runs \`DEL\` on one or more keys of any type and returns the deleted count.
-   **Key Exists** Runs \`EXISTS\` for one or more keys and returns existing and checked counts with an \`allExist\` flag.
-   **Set Expiration** Runs \`EXPIRE\` with a positive TTL in seconds.
-   **Remove Expiration** Runs \`PERSIST\` to make a key non-expiring again.
-   **Get TTL** Runs \`TTL\` with raw Redis semantics plus convenience flags.
-   **Find Keys** Glob-pattern key search using incremental \`SCAN\`, never the blocking \`KEYS\` command, so it is safe on production databases. Results are capped at a configurable limit.

### Hashes

4

-   **Set Hash Fields** Runs \`HSET\` from a JSON object of field and value pairs.
-   **Get Hash Field** Runs \`HGET\` for a single field.
-   **Get Hash** Runs \`HGETALL\` and returns a JSON object.
-   **Delete Hash Fields** Runs \`HDEL\` on one or more fields.

### Lists

4

-   **Push To List** Runs \`LPUSH\` or \`RPUSH\` for one or more values, with the side selectable.
-   **Pop From List** Runs \`LPOP\` or \`RPOP\` with an optional count and always returns a \`values\` array.
-   **Get List Range** Runs \`LRANGE\` by index.
-   **List Length** Runs \`LLEN\`.

### Sets

3

-   **Add To Set** Runs \`SADD\` and returns how many members were newly added.
-   **Get Set Members** Runs \`SMEMBERS\`.
-   **Remove From Set** Runs \`SREM\` and returns the removed count.

### Sorted Sets

2

-   **Add To Sorted Set** Runs \`ZADD\` with \`{score, value}\` members; existing members get their score updated.
-   **Get Sorted Range** Runs \`ZRANGE\` by rank with optional scores and reverse order.

### Pub/Sub

1

-   **Publish Message** Runs \`PUBLISH\` to a channel and returns the subscriber receiver count. Publishing only; subscribing requires a long-lived connection and is not supported.

### Server

1

-   **Get Server Info** Runs \`INFO\` parsed into sections (server, clients, memory, persistence, stats, replication, cpu, keyspace), for health checks and alerting.

### Advanced

1

-   **Execute Command** Raw escape hatch that runs any Redis command by name with string arguments, including module commands. Blocking and subscribing commands must not be used.

## Frequently Asked Questions

### What can FlowRunner do with Redis?

FlowRunner agents can run Set Value, Get Value, and Increment in Redis, plus 23 more actions.

### Does connecting Redis to FlowRunner require OAuth?

No. Redis connects to FlowRunner with basic authentication (a username and password), no OAuth flow required.

### Can Redis trigger a FlowRunner workflow automatically?

Redis doesn't currently expose triggers in FlowRunner. It connects as an action step inside workflows started by another trigger.

**Work at Redis?** This integration exposes Redis to AI agents on every FlowRunner plan, including through MCP, at no cost to you. [See what FlowRunner offers integration partners](https://flowrunner.ai/integrations/partners), including how to keep this page current.

---
Markdown version of https://flowrunner.ai/integrations/redis. Site index: https://flowrunner.ai/llms.txt
