AI Agent Resources
Learn how to develop with Redis as an AI agent
llms.txt index of documentation
Redis provides a comprehensive index of all documentation in Markdown format at llms.txt. This index is specifically designed for AI agents to discover available documentation.
Markdown documentation format
All documentation pages are available in Markdown format via the same URL as
the main doc page but with index.html.md added. For example, the Markdown version of
this page is available at
ai-agent-resources/index.html.md.
JSON documentation feeds
Redis documentation is available in structured JSON format optimized for RAG (Retrieval-Augmented Generation) systems.
NDJSON feed (all pages)
A single file containing all documentation pages in NDJSON format (one JSON object per line):
| Format | URL | Size |
|---|---|---|
| NDJSON | docs.ndjson | ~30 MB |
| Gzipped | docs.ndjson.gz | ~5 MB |
Both files contain ~4,100 documents.
Per-page JSON
Each documentation page has a corresponding JSON file at the same URL with /index.json appended. For example:
- Page:
https://redis.io/docs/latest/commands/set/ - JSON:
https://redis.io/docs/latest/commands/set/index.json
JSON schema
Each document contains:
| Field | Type | Description |
|---|---|---|
id |
string | URL slug identifier |
title |
string | Page title |
url |
string | Canonical URL |
summary |
string | Short description |
page_type |
string | "content" (has prose) or "index" (navigation only) |
content_hash |
string | SHA256 hash for cache invalidation (content pages only) |
sections |
array | Content split by headings with semantic roles |
examples |
array | Code blocks extracted from content |
children |
array | Child pages (index pages only) |
Each section contains:
id: Slugified headingtitle: Original heading textrole: Semantic role (overview,syntax,example,parameters,returns, etc.)text: Section content (code blocks replaced with[code example]placeholder)
Each example contains:
id: Unique identifier ({section_id}-ex{index})language: Language from code fence (python,go,plaintext, etc.)code: The code contentsection_id: Which section this example came from
Verifying content_hash
The content_hash can be verified by computing:
import hashlib
def verify_hash(page):
parts = [page.get('summary', '')]
for section in page.get('sections', []):
parts.append(section['text'])
for example in page.get('examples', []):
parts.append(example['code'])
content = '\n'.join(parts)
return hashlib.sha256(content.encode('utf-8')).hexdigest() == page.get('content_hash')
API references
API references are available for the following client libraries:
Data type comparisons
See Compare data types for advice on which of the general-purpose data types is best for common tasks.
Redis patterns for coding agents
Salvatore Sanfilippo (also known as antirez, the creator of Redis) has provided the Redis community with a resource containing very useful Redis-oriented design patterns. See this page for more information.
Error handling
See Error handling for a guide to handling errors in client libraries.