> For the complete documentation index, see [llms.txt](https://docs.codewords.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codewords.ai/automations/redis-your-workflows-memory.md).

# Redis: Your workflow’s memory

Learn how to use Redis as your workflow’s memory in CodeWords — store, recall, and manage data between runs to build smarter, faster, and more stateful automations.

### What is Redis?

Redis gives your workflow memory. It lets automations remember information between runs so they can make smarter decisions next time.

Without Redis, your workflow:

* Runs once, finishes, and forgets everything
* Starts fresh each time, as if it has never seen the data before

With Redis, your workflow:

* Saves key details (preferences, recent results, or progress)
* Picks up where it left off on the next run
* Feels more personal and consistent over time

Think of it as short-term memory your workflow can write to while it works.

### Real-world examples

* **Website monitoring** — Detect if a page’s content changed since the last check
* **Customer notifications** — Remember who was already notified, and avoid sending twice
* **Report generation** — Save previous snapshots and only report what’s new
* **Chatbot memory** — Keep short-term conversation context so replies stay relevant

When a workflow runs with Redis:

1. It saves what it learns (for example, “User prefers daily reports”).
2. The next run looks that memory up.
3. If the memory is outdated, Redis can remove it after it expires.

You get stateful automations without standing up a full database yourself.

### Best practices

* Use Redis when your workflow needs to remember settings, progress, or recent results
* Keep data small and focused — Redis is for quick notes, not large files
* Let data expire when it should — short-lived memory keeps automations fast and clean
* Use it for context, not long-term history — great for short-term recall, not permanent storage

### When not to use Redis

* You need to store data permanently (use a database instead)
* Your automation doesn’t need to remember anything
* The information is too large or too sensitive to store temporarily

### How Cody decides when to use Redis

You don’t need to wire Redis up yourself. Cody handles that.

When you describe your automation, Cody checks whether memory would help:

* If the workflow needs to track changes or store preferences, Cody adds Redis
* If it doesn’t need memory, Cody skips Redis to keep things simpler and faster

### FAQs

<details>

<summary>Do I need to set up Redis myself?</summary>

No. Redis is built into CodeWords. Cody manages setup and connections automatically — you never install or maintain anything.

</details>

<details>

<summary>When does CodeWords use Redis?</summary>

When your automation needs short-term memory — for example, to remember preferences, cache results, or track changes between runs.

</details>

<details>

<summary>Can Cody decide when Redis is needed?</summary>

Yes. Cody detects when memory will make your automation smarter or more efficient, and adds Redis when it helps.

</details>

<details>

<summary>Is my Redis data secure?</summary>

Yes. Redis data is encrypted, isolated per user, and deleted after its expiration period. Only your workflows can access it.

</details>

<details>

<summary>Is Redis required for every workflow?</summary>

No. Many simple or one-time automations don’t need Redis. It’s only used when memory adds real value.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.codewords.ai/automations/redis-your-workflows-memory.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
