Metadata-Version: 2.4
Name: redis-iris
Version: 0.1.0a7
Summary: One package for every Iris product: an opinionated Python SDK per product, and the iris CLI to set them all up
Project-URL: Homepage, https://github.com/redis/redis-iris
Project-URL: Repository, https://github.com/redis/redis-iris
Project-URL: Documentation, https://github.com/redis/redis-iris/blob/main/docs/index.md
Project-URL: Issues, https://github.com/redis/redis-iris/issues
Project-URL: Changelog, https://github.com/redis/redis-iris/releases
Author: Redis
License-Expression: MIT
License-File: LICENSE
Keywords: agent-memory,agents,ai,cli,iris,mcp,redis,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Requires-Dist: click<9,>=8.1.8
Requires-Dist: httpx2<3,>=2.10.0
Requires-Dist: httpx<1,>=0.28.1
Requires-Dist: opentelemetry-api<2,>=1.38
Requires-Dist: opentelemetry-exporter-otlp-proto-common<2,>=1.38
Requires-Dist: opentelemetry-sdk<2,>=1.38
Requires-Dist: platformdirs<5,>=4.3.6
Requires-Dist: pyyaml<7,>=6.0.2
Requires-Dist: redis-agent-memory==0.5.0b2
Requires-Dist: redis-agent-playbook==0.1.0b1
Requires-Dist: redis-context-gateway==0.1.0a4
Requires-Dist: redis-intent-router==0.1.0a1
Provides-Extra: langgraph
Requires-Dist: langchain-core<2,>=1.0; extra == 'langgraph'
Requires-Dist: langgraph<2,>=1.0; extra == 'langgraph'
Provides-Extra: llm-tracing
Requires-Dist: opentelemetry-instrumentation-anthropic<1,>=0.62; extra == 'llm-tracing'
Requires-Dist: opentelemetry-instrumentation-bedrock<1,>=0.62; extra == 'llm-tracing'
Requires-Dist: opentelemetry-instrumentation-langchain<1,>=0.62; extra == 'llm-tracing'
Requires-Dist: opentelemetry-instrumentation-openai<1,>=0.62; extra == 'llm-tracing'
Requires-Dist: opentelemetry-instrumentation-threading<1,>=0.41b0; extra == 'llm-tracing'
Requires-Dist: wrapt<3,>=1.14; extra == 'llm-tracing'
Description-Content-Type: text/markdown

<div align="center">

# Redis Iris

**One package for every Iris product: an opinionated Python API per product, and the `iris` CLI to set them all up.**

[![CI](https://github.com/redis/redis-iris/actions/workflows/ci.yml/badge.svg)](https://github.com/redis/redis-iris/actions/workflows/ci.yml)
[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/downloads/)
[![Status: Alpha](https://img.shields.io/badge/status-alpha-orange)](https://github.com/redis/redis-iris/releases)
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://github.com/redis/redis-iris/blob/main/LICENSE)

[Install](#install) · [Documentation](https://github.com/redis/redis-iris/blob/main/docs/index.md) · [Releases](https://github.com/redis/redis-iris/releases) · [Contributing](https://github.com/redis/redis-iris/blob/main/CONTRIBUTING.md)

</div>

## Install

Requires **Python 3.11+**. [uv](https://docs.astral.sh/uv/getting-started/installation/) is the
recommended installer.

```bash
uv add redis-iris            # library, in your project
uv tool install redis-iris   # iris CLI, isolated
iris --help
```

<details>
<summary>pipx or pip</summary>

```bash
pipx install redis-iris
python -m pip install redis-iris   # inside an active virtual environment
```

</details>

**uv projects on an alpha release.** uv takes a pre-release only when your own project names it,
and an alpha `redis-iris` pins product SDK pre-releases exactly, so `uv add` fails with
`hint: pre-releases weren't enabled`. Restate this release's pre-release pins in your
`pyproject.toml` (they are the `==` pre-release entries in its dependencies and change with each
release):

```toml
[tool.uv]
constraint-dependencies = [
    "redis-agent-memory==0.5.0b2",
    "redis-agent-playbook==0.1.0b1",
    "redis-context-gateway==0.1.0a4",
    "redis-intent-router==0.1.0a1",
]
```

From a source checkout, `uv tool install --force .` installs or replaces the `iris` tool, and
`python -m redis_iris` runs the CLI wherever the package is installed.

Alpha releases may change commands and output contracts. Pin a version in automation and check the
[release notes](https://github.com/redis/redis-iris/releases) before upgrading.

## The stack

Iris is a suite of products. Use one, or all of them.

| Product | What your agent gets | Instead of |
|---|---|---|
| **[Agent Memory](https://github.com/redis/redis-iris/blob/main/docs/core/agent-memory.md)** | Ordered session history, summarized automatically. Durable memories extracted in the background, typed to your domain and steered away from sensitive data. Recall across sessions, scoped to one customer plus shared team knowledge. Erase a customer in one call. | an in-process store, a hand-built extraction chain, regex scrubbing |
| **[Agent Playbooks](https://github.com/redis/redis-iris/blob/main/docs/core/agent-playbooks.md)** | Answers only from published, versioned FAQs and Skills, scored. Rollback and withdrawal. Proposes an FAQ for human review when nothing covers the question. | a vector store of unreviewed policy docs |
| **[Context Gateway](https://github.com/redis/redis-iris/blob/main/docs/core/context-gateway.md)** | One MCP endpoint and one agent key for every MCP server and Context Surface. Per-tool result cache, and large results as handles the agent pages through. | a config entry and a secret per MCP server in every agent |
| **[Intent Router](https://github.com/redis/redis-iris/blob/main/docs/core/intent-router.md)** | The user's prompt matched to one of the intents you defined, with its score and the dispatch target you attached. | a prompt classifier you tune by hand, or an LLM call per routing decision |
| **[Lens](https://github.com/redis/redis-iris/blob/main/docs/core/lens.md)** | One trace per turn: which memories and documents entered the prompt, tokens, cost. | guessing why the agent said that |

## User guides

| Your agent... | Guide | Product |
|---|---|---|
| forgets customers between sessions | [Remember customers](https://github.com/redis/redis-iris/blob/main/docs/user_guides/remember-customers.md) | Agent Memory |
| quotes policy nobody approved | [Answer from approved policy](https://github.com/redis/redis-iris/blob/main/docs/user_guides/answer-from-approved-policy.md) | Agent Playbooks |
| needs to be configured | [Configuration](https://github.com/redis/redis-iris/blob/main/docs/user_guides/configuration.md) | all |
| needs an Agent Memory service created | [Set up Agent Memory](https://github.com/redis/redis-iris/blob/main/docs/user_guides/set-up-agent-memory.md) | Agent Memory |
| needs a Playbook and an agent key created | [Set up Agent Playbooks](https://github.com/redis/redis-iris/blob/main/docs/user_guides/set-up-agent-playbooks.md) | Agent Playbooks |
| has policy content to author and publish | [Agent Playbooks CLI](https://github.com/redis/redis-iris/blob/main/docs/user_guides/agent-playbooks-cli.md) | Agent Playbooks |
| needs a Context Gateway to reach its tools | [Context Gateway CLI](https://github.com/redis/redis-iris/blob/main/docs/user_guides/context-gateway-cli.md) | Context Gateway |
| needs to route a prompt to an intent | [Intent Router CLI](https://github.com/redis/redis-iris/blob/main/docs/user_guides/intent-router-cli.md) | Intent Router |
| needs to list, revoke or rotate agent keys | [Identity CLI](https://github.com/redis/redis-iris/blob/main/docs/user_guides/identity-cli.md) | Every product |

## Integrate with an existing agent

Built your stack with a popular orchestration tool? A skill lets your coding agent do the wiring.

| I want my agent to... | Skill |
|---|---|
| figure out what it needs | [add-redis-iris](https://github.com/redis/redis-iris/blob/main/docs/skills/index.md#add-redis-iris) |
| remember customers | [add-agent-memory](https://github.com/redis/redis-iris/blob/main/docs/skills/index.md#add-agent-memory) |
| quote approved policy only | [add-agent-playbooks](https://github.com/redis/redis-iris/blob/main/docs/skills/index.md#add-agent-playbooks) |

## The CLI

`iris <product> <command>` creates services, mints keys, and manages content. Shared options go
before the product name.

```bash
iris agent-memory service create --from service.yaml --write-env .env
iris agent-memory service key <store-id> --actions read --name inspector --write .env.inspector
iris agent-memory memories search "how does this customer want answers" --owner cust-1042 --prompt
iris agent-playbooks extraction bind <store-id> --idle-seconds 60 --enable   # FAQ proposals from sessions
iris agent-playbooks faqs validate ./faqs            # offline
iris agent-playbooks faqs sync ./faqs --publish changed
iris --json --no-input agent-playbooks faqs plan ./faqs   # unattended, one JSON value on stdout
iris --profile production agent-playbooks health
iris --json context-gateway service list            # Context Gateway control plane
iris intent-router service create support --provider openai --model text-embedding-3-small \
  --dimensions 1536 --write-env .env
iris identity keys list --product intent            # agent keys, for every product
```

Settings resolve from command options, environment variables, the selected TOML profile, shared
TOML settings, then defaults. API keys belong in environment variables. Exit codes are `0` for
success, `1` for operational failures, and `2` for invalid input or configuration. Help, version,
completion, and local validation work without credentials or a network connection.

Guides: [Set up Agent Memory](https://github.com/redis/redis-iris/blob/main/docs/user_guides/set-up-agent-memory.md),
[Set up Agent Playbooks](https://github.com/redis/redis-iris/blob/main/docs/user_guides/set-up-agent-playbooks.md),
[Agent Playbooks CLI](https://github.com/redis/redis-iris/blob/main/docs/user_guides/agent-playbooks-cli.md),
[Context Gateway CLI](https://github.com/redis/redis-iris/blob/main/docs/user_guides/context-gateway-cli.md),
[Intent Router CLI](https://github.com/redis/redis-iris/blob/main/docs/user_guides/intent-router-cli.md),
[Identity CLI](https://github.com/redis/redis-iris/blob/main/docs/user_guides/identity-cli.md),
[Configuration](https://github.com/redis/redis-iris/blob/main/docs/user_guides/configuration.md),
[example TOML](https://github.com/redis/redis-iris/blob/main/config.example.toml).

## Upgrading to Agent Playbooks

The product is now Agent Playbooks; a Playbook is one instance. This follows the core SDK. Old
environment variables and the old TOML table are still read as fallbacks, so existing `.env`
files and TOML keep working; the CLI writes only the new names. `iris agent-playbook` stops with
a pointer to the new group, and the Python names have no aliases.

| Before | Now |
|---|---|
| `iris agent-playbook` | `iris agent-playbooks` |
| `IRIS_AGENT_PLAYBOOK_ID` | `IRIS_AGENT_PLAYBOOKS_PLAYBOOK_ID` |
| `IRIS_AGENT_PLAYBOOK_*` (`URL`, `API_KEY`, `CONTENT_API_KEY`, `SERVICE_URL`, ...) | `IRIS_AGENT_PLAYBOOKS_*` |
| TOML `[agent_playbook]`, `[profiles.<name>.agent_playbook]` | `[agent_playbooks]`, `[profiles.<name>.agent_playbooks]` |
| `redis_iris.agent_playbook`, `AgentPlaybook`, `AgentPlaybookSettings` | `redis_iris.agent_playbooks`, `AgentPlaybooks`, `AgentPlaybooksSettings` |
| `IrisSettings.agent_playbook`, `Iris.agent_playbook()` | `IrisSettings.agent_playbooks`, `Iris.agent_playbooks()` |

A new variable wins over its old name; set it empty to ignore the old one. The old TOML table
is read only when the new one is absent.

## Documentation

Read the docs in [`docs/`](https://github.com/redis/redis-iris/blob/main/docs/index.md), or render the site locally with `task docs:serve`.

| Resource | Start here to... |
|---|---|
| [Core reference](https://github.com/redis/redis-iris/blob/main/docs/core/index.md) | Every `redis_iris` class and setting |
| [User guides](https://github.com/redis/redis-iris/blob/main/docs/user_guides/index.md) | One problem, one fix, per product |
| [Skills](https://github.com/redis/redis-iris/blob/main/docs/skills/index.md) | Wire a product into an existing agent with a coding agent |
| llms.txt | `task docs:build` writes `site/llms.txt`; hand that one file to a coding agent |
| [Release notes](https://github.com/redis/redis-iris/releases) | Check changes before upgrading |

## Contributing

Bug reports, documentation improvements, and new integrations are welcome.
[Open an issue](https://github.com/redis/redis-iris/issues) or read the
[contributor guide](https://github.com/redis/redis-iris/blob/main/CONTRIBUTING.md).

```bash
task install
task check   # formatting, lint, types, offline tests, package build
```

Maintainers: releases are described in the [contributor guide](https://github.com/redis/redis-iris/blob/main/CONTRIBUTING.md#pull-request-labels).

## License

[MIT](https://github.com/redis/redis-iris/blob/main/LICENSE).
