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 one record per documentation page, currently more than 2,600.

Per-page JSON

Each documentation page has a corresponding JSON file at the same URL with /index.json appended. For example:

What the feeds cover

The feeds contain one record for every documentation page. They deliberately do not contain the taxonomy pages that appear in sitemap.xml, so a straight comparison of the two shows the sitemap with more URLs.

The excluded pages are:

These are generated index pages that list other pages. They carry no documentation prose of their own, so a record for them would add navigation noise without adding content. The exclusion is a consequence of how the output formats are configured rather than a filter applied afterwards: JSON and Markdown are produced for Hugo's section and page kinds only, and taxonomy, term and home pages are none of those.

Two consequences worth knowing if you diff the feed against the sitemap:

Schema version

Every record carries a schema_version integer, and the same value appears in the json metadata block of the Markdown output. It is currently 2.

It increments only when the shape of a record changes: a field added, removed or renamed, or a new value entering the role vocabulary. It does not change when page content changes, and it does not change when the value inside a field changes without the field itself changing. Use content_hash to detect content changes; use schema_version to detect when your parser might need attention.

Version 2 added the aliases field to page records, and a new page_type value, moved, for the redirect records served at a moved page's old URL. Version 1 was the initial shape: sections, examples, content_hash, page_type, id and since.

Pages that have moved

When a page moves, its old URL keeps working — but until now it served only an HTML redirect, so appending /index.json to it returned 404 and a move was indistinguishable from a deletion. Two things now fix that.

A redirect record at the old URL

Appending /index.json to a moved page's URL returns a record with page_type set to moved:

{
  "schema_version": 2,
  "id": "develop/ai/agent-memory",
  "title": "Moved",
  "url": "https://redis.io/docs/latest/develop/ai/agent-memory/",
  "page_type": "moved",
  "moved_to": "https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/"
}

Check page_type before assuming the shape of a record. A moved record deliberately carries no sections, examples or content_hash — there is no content at that URL, only a pointer. Fetch moved_to to get the page itself.

These records are not included in docs.ndjson. The feed is one record per documentation page, and adding roughly a thousand pointer records would make any count of the corpus ambiguous. Use the map below if you need them in bulk.

A map of every redirect

https://redis.io/docs/latest/redirects.json lists every alias the site publishes and the page it resolves to:

{
  "schema_version": 2,
  "base_url": "https://redis.io/docs/latest/",
  "generated": "2026-08-07T15:00:00Z",
  "count": 1061,
  "ambiguous_count": 27,
  "shadowed_count": 10,
  "redirects": [
    {"from": "/develop/ai/langcache", "to": "https://redis.io/docs/latest/develop/ai/context-engine/langcache/", "moved_on": "2026-05-11"}
  ],
  "ambiguous": [
    {"from": "/develop/use/pipelining", "candidates": ["https://redis.io/docs/latest/develop/using-commands/", "https://redis.io/docs/latest/develop/using-commands/pipelining/"]}
  ],
  "shadowed": [
    {"from": "/glossary", "declared": ["https://redis.io/docs/latest/glossary/"]}
  ]
}

Four things worth knowing before you rely on it:

The map covers the current version of the documentation. Version-specific documentation is outside both machine-readable feeds.

JSON schema

Each document contains:

Field Type Description
schema_version integer Version of the record format. See Schema version.
id string Unique identifier, the page's path without a file extension (for example develop/clients/redis-py)
title string Page title
url string Canonical URL
summary string Short description
since string Redis version the command was introduced in. Present on command pages only.
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:

Each example contains:

Section roles

Each section carries a role, derived from its heading text. These are the values currently in use:

Role Assigned when the heading begins with
overview overview, introduction, about, description
syntax syntax, usage, command, signature
example example, demo, sample, code example
parameters option, parameter, argument, flag
returns return, response, output, result
errors error, exception, troubleshoot
performance performance, complexity, benchmark
limits limit, constraint, restriction
related see also, related, learn more, reference
setup install, setup, getting started, quickstart
configuration configur, setting
security security, auth, permission, acl
history history, changelog, version history
compatibility compatib, support, version
content none of the above

The table is in priority order and the first match wins, which matters where the patterns overlap: a heading of "Version history" is history rather than compatibility, because history is tested first.

A page's introductory text, before its first heading, is also given the overview role.

Note:
This vocabulary is descriptive, not a contract. It reflects the values produced today and may gain entries, or change how a heading maps to a role, without notice. If you filter or rank on role, treat an unrecognized value as content rather than discarding the section, and do not assume a value you rely on will keep its current name.

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.

Agent skills repository

The redis/agent-skills repository provides reusable skills and tools for AI agents working with Redis.

Error handling

See Error handling for a guide to handling errors in client libraries.