# Redis for AI Agents: The Easiest Way for Agents to Share Memory

DevFeed: [Redis for AI Agents: The Easiest Way for Agents to Share Memory](<https://devfeed.tech/articles/redis-for-ai-agents-the-easiest-way-for-agents-to-share-memory-130786.md>)

Original publisher: [Read original article](<https://upstash.com/blog/upstash-for-agents>)

Author: Josh

Published: 2026-11-12T00:00:00Z

Content type: article

Language: en

Sources: [Upstash](<https://devfeed.tech/sources/upstash.md>)

Topics: [Redis](<https://devfeed.tech/topics/redis.md>), [Multi Agent Systems](<https://devfeed.tech/topics/multi-agent-systems.md>), [agent to agent communication](<https://devfeed.tech/topics/agent-to-agent-communication.md>)

Tags: [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [api](<https://devfeed.tech/tags/api.md>), [cache](<https://devfeed.tech/tags/cache.md>), [crash](<https://devfeed.tech/tags/crash.md>), [database](<https://devfeed.tech/tags/database.md>), [file](<https://devfeed.tech/tags/file.md>), [free](<https://devfeed.tech/tags/free.md>), [job](<https://devfeed.tech/tags/job.md>), [lock](<https://devfeed.tech/tags/lock.md>), [mcp](<https://devfeed.tech/tags/mcp.md>), [memory](<https://devfeed.tech/tags/memory.md>), [queue](<https://devfeed.tech/tags/queue.md>), [redis](<https://devfeed.tech/tags/redis.md>), [share](<https://devfeed.tech/tags/share.md>)

## AI overview

The article shows how agents can share state through a free Upstash Redis database created with one HTTP request and an idempotency key; agents with its database ID can retrieve credentials and access the same data. Examples use a hash to resume work after a crash or context reset, a list as a queue that gives workers distinct jobs, expiring keys to lock files, and one-hour cache entries to avoid repeated API calls. The article notes that anyone with an unclaimed database ID can view, edit, or claim the database, so it recommends keeping the ID out of Git and storing no personal data or secrets there. Unclaimed databases expire after three days; claiming one moves it into an Upstash account with no expiry and the full free-tier quota. Usage metrics may lag by several minutes.

## Source excerpt

How AI agents use a free Upstash Redis database as shared memory: continue a task after a crash, split a job queue between sub-agents, lock a file, and cache slow API calls. With code and the output of each run.