Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-playbook-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check Playbooks documentation
on:
pull_request:
paths:
- 'content/develop/ai/context-engine/agent-playbook/**'
- 'content/develop/ai/context-engine/agent-playbooks/**'
- 'build/agent_playbook_docs/**'
- 'local_examples/iris/playbooks/**'
- 'build/components/example.py'
Expand Down
2 changes: 1 addition & 1 deletion build/agent_playbook_docs/check_sdk_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

ROOT = Path(__file__).resolve().parents[2]
LOCK = Path(__file__).with_name("source-lock.json")
SPEC = ROOT / "content/develop/ai/context-engine/agent-playbook/api-reference/openapi.json"
SPEC = ROOT / "content/develop/ai/context-engine/agent-playbooks/api-reference/openapi.json"


def wire_contract(document):
Expand Down
2 changes: 1 addition & 1 deletion build/agent_playbook_docs/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from components.example import Example
from local_examples import get_example_id_from_file, get_language_from_extension

DOCS = ROOT / "content/develop/ai/context-engine/agent-playbook"
DOCS = ROOT / "content/develop/ai/context-engine/agent-playbooks"
SOURCES = ROOT / "local_examples/iris/playbooks"
GUIDES = ("quickstart", "faqs", "skills", "proposals", "retrieval", "mcp", "limits")
AGENT_GUIDES = ("openai_agent", "langgraph_agent")
Expand Down
2 changes: 1 addition & 1 deletion build/agent_playbook_docs/prepare_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ def prepare(source, title, groups):
"Redis Agent Playbooks data-plane API",
GROUPS,
)
target = ROOT / "content/develop/ai/context-engine/agent-playbook/api-reference/openapi.json"
target = ROOT / "content/develop/ai/context-engine/agent-playbooks/api-reference/openapi.json"
target.write_text(json.dumps(result, indent=2) + "\n")
print(target.relative_to(ROOT))
2 changes: 1 addition & 1 deletion build/agent_playbook_docs/test_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


ROOT = Path(__file__).resolve().parents[2]
DOCS = ROOT / "content/develop/ai/context-engine/agent-playbook"
DOCS = ROOT / "content/develop/ai/context-engine/agent-playbooks"


def test_public_openapi_is_valid():
Expand Down
2 changes: 0 additions & 2 deletions content/develop/ai/context-engine/agent-playbooks/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: Create playbooks of reusable skills and answers that agents can dis
linkTitle: Agent Playbooks
hideListLinks: true
weight: 25
bannerText: Documentation review draft.
bannerChildren: true
---

## What is Redis Agent Playbooks?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Both framework examples use the same task:

The request names no skill. The agent selects one from its name and description in the retrieved previews.

![An application discovers published playbook context for a task before the model turn. During the turn, the agent can load skill instructions and files through MCP, then return its response.](/images/ai/context-engine/agent-playbooks-session.svg)
![An application discovers published playbook context for a task before the model turn. During the turn, the agent can load skill instructions and files through MCP, then return its response.](/images/ai/context-engine/agent-playbook-session.svg)
{width="700"}

Initial SDK discovery replaces routine MCP discovery at the start of the turn. MCP discovery remains available for follow-up questions and publication changes. Progressive disclosure concerns skill instructions and files; the available tool definitions remain the same.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ A version is a complete, immutable snapshot of an entry's authored content. Upda

The latest version and the published version can differ. Version 2 of a refund procedure can remain under review while agents retrieve version 1. Publishing version 2 switches retrieval to the update and retains version 1 for rollback.

![Creating an entry starts an unpublished version 1. Publishing version 1 makes it retrievable. Appending version 2 keeps version 1 published until you publish version 2. You can publish version 1 again to roll back, or withdraw the entry so agents retrieve nothing.](/images/ai/context-engine/agent-playbooks-versions.svg)
![Creating an entry starts an unpublished version 1. Publishing version 1 makes it retrievable. Appending version 2 keeps version 1 published until you publish version 2. You can publish version 1 again to roll back, or withdraw the entry so agents retrieve nothing.](/images/ai/context-engine/agent-playbook-versions.svg)
{width="700"}

Management operations let you inspect drafts and historical versions with the required permissions. See the [version model]({{< relref "/develop/ai/context-engine/agent-playbooks/api-reference#schema/Version" >}}) for fields and types.
Expand Down
2 changes: 1 addition & 1 deletion content/develop/ai/context-engine/agent-playbooks/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ List the tools on an initialized connection to get their input schemas.
| `load_skill` | The selected skill's `entry_id` and `version`. | Full instructions and resource descriptors. |
| `fetch_resource` | A returned resource `uri`. | File content, media type, and digest. |

![Discovery returns FAQ answers and skill previews. Loading a selected skill adds its instructions to the context. Fetching a resource adds only the file needed for the task.](/images/ai/context-engine/agent-playbooks-disclosure.svg)
![Discovery returns FAQ answers and skill previews. Loading a selected skill adds its instructions to the context. Fetching a resource adds only the file needed for the task.](/images/ai/context-engine/agent-playbook-disclosure.svg)
{width="700"}

Use the tools in this order:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Proposals currently add new FAQs. They do not create skills or revise existing e

Start with the walkthrough, or [automate suggestions](/content/develop/ai/context-engine/agent-playbooks/proposals.md#automate-proposal-generation) from Redis Agent Memory or your own application. Suggestions do not affect agent responses until you publish the accepted FAQ.

![A proposal enters the inbox with candidate content and evidence. Acceptance creates an unpublished FAQ, which publication serves to agents. Dismissal or inbox expiration moves the proposal to trash, where it can be restored before its retention deadline.](/images/ai/context-engine/agent-playbooks-proposals.svg)
![A proposal enters the inbox with candidate content and evidence. Acceptance creates an unpublished FAQ, which publication serves to agents. Dismissal or inbox expiration moves the proposal to trash, where it can be restored before its retention deadline.](/images/ai/context-engine/agent-playbook-proposals.svg)
{width="700"}

## Before you begin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Create a playbook API key with `write` and `publish` permissions. Both include `

This walkthrough needs no agent framework or model-provider key.

Follow one tab throughout the page. The Python SDK and command-line interface (CLI) are prereleases. Both require Python 3.11 or later. The cURL and CLI examples use Bash and jq. To connect the CLI to your deployment with a profile, see [SDK and CLI setup](/content/develop/ai/context-engine/sdk-and-cli.md).
Follow one tab throughout the page. The Python SDK and command-line interface (CLI) require Python 3.11 or later. The cURL and CLI examples use Bash and jq. To connect the CLI to your deployment with a profile, see [SDK and CLI setup](/content/develop/ai/context-engine/sdk-and-cli.md).

**Python and CLI**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ categories:
- docs
- develop
- ai
description: Step through one agent request across Data Integration, LangCache, Agent Memory, and Context Gateway, then take a service away to see what the agent loses.
description: Step through one agent request across Data Integration, Context Gateway, Agent Memory, and Agent Playbooks, then take a service away to see what the agent loses.
hideListLinks: true
linktitle: Interactive demo
title: Redis Iris interactive demo
Expand All @@ -24,11 +24,11 @@ The tour runs in your browser and doesn't connect to any service. Each step link
| Service | What it does in this request | Without it |
|:--|:--|:--|
| [Data Integration](/content/develop/ai/context-engine/data-integration/_index.md) | Syncs a change from PostgreSQL to Redis seconds after it happens | The agent reads last night's data and makes a promise it can't keep |
| Context Gateway | Looks up delivery times, alternatives, and past orders through governed tools | The agent can't check whether the food will arrive in time |
| [Context Gateway](/content/develop/ai/context-engine/context-gateway/_index.md) | Looks up delivery times, alternatives, and past orders through governed tools | The agent can't check whether the food will arrive in time |
| [Agent Memory](/content/develop/ai/context-engine/agent-memory/_index.md) | Recalls last week's order and the customer's peanut allergy | The agent can find the order, but not the allergy |
| [Agent Playbooks](/content/develop/ai/context-engine/agent-playbooks/_index.md) | Answers the general delivery fee question with the frequently asked question (FAQ) the support team published | The model doesn't know the app's fees, so it gives a vague answer, or makes one up |

[Lens](/content/develop/ai/context-engine/lens/_index.md) is in preview. It doesn't change the reply. It records each step of the request, including which memories entered the prompt, so you can see how the agent got there.
[Lens](/content/develop/ai/context-engine/lens/_index.md) is in beta. It doesn't change the reply. It records each step of the request, including which memories entered the prompt, so you can see how the agent got there.

## Next steps

Expand Down
6 changes: 2 additions & 4 deletions content/develop/ai/context-engine/intent-router/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: Classify a user's message into a named intent and get back the targ
linkTitle: Intent Router
hideListLinks: true
weight: 27
bannerText: Documentation review draft.
bannerChildren: true
---

## What is Redis Intent Router?
Expand Down Expand Up @@ -54,14 +52,14 @@ The Router doesn't run the target. It returns the target, and your application d
Install the Redis Iris Python package, which includes the `iris` CLI:

```bash
pip install 'redis-iris>=1.0.0b1'
pip install 'redis-iris>=1.0.0'
```

Set `IRIS_INTENT_ROUTER_URL`, `IRIS_INTENT_ROUTER_ID`, and `IRIS_INTENT_ROUTER_API_KEY` as shown in the [quickstart](/content/develop/ai/context-engine/intent-router/quickstart.md#save-connection-values), connect, and define intents:

{{< clients-example set="iris_intent_router_quickstart" step="intents-create" description="" lang_filter="Python (Iris),TypeScript (Iris),cURL (Iris),CLI (Iris)" footer="hide" />}}

The [redis-iris package](https://pypi.org/project/redis-iris/) covers matching, intent authoring, and Router administration in Python and the CLI. For TypeScript, the generated client [@redis-iris/intent-router](https://www.npmjs.com/package/@redis-iris/intent-router) covers the data plane and the control plane. Install it with `npm install @redis-iris/intent-router@beta`. See the [developer guide](/content/develop/ai/context-engine/intent-router/developer-guide.md) to choose a client.
The [redis-iris package](https://pypi.org/project/redis-iris/) covers matching, intent authoring, and Router administration in Python and the CLI. For TypeScript, the generated client [@redis-iris/intent-router](https://www.npmjs.com/package/@redis-iris/intent-router) covers the data plane and the control plane. Install it with `npm install @redis-iris/intent-router`. See the [developer guide](/content/develop/ai/context-engine/intent-router/developer-guide.md) to choose a client.

## Get started

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Platform teams create the Router and the agent keys. See [Manage Routers](/conte
| Client | Use it when | Package and guide |
|:-------|:------------|:------------------|
| Python | Your application or agent uses Python. | Install [`redis-iris`](https://pypi.org/project/redis-iris/) and follow the [quickstart](/content/develop/ai/context-engine/intent-router/quickstart.md). `IntentRouter` matches and authors intents with methods such as `match`, `define`, and `add_examples`. Its `client` property exposes the generated data-plane client for anything those methods don't wrap, and its `service` property administers Routers. The generated clients' methods return the response as `.headers` and `.result`. |
| TypeScript | Your application or agent uses JavaScript or TypeScript. | Install [`@redis-iris/intent-router`](https://www.npmjs.com/package/@redis-iris/intent-router) with `npm install @redis-iris/intent-router@beta`. `IntentRouter` calls the data plane, and `IntentRouterService` calls the control plane. Methods take positional arguments with request options last, and return `{ headers, result }`. |
| TypeScript | Your application or agent uses JavaScript or TypeScript. | Install [`@redis-iris/intent-router`](https://www.npmjs.com/package/@redis-iris/intent-router) with `npm install @redis-iris/intent-router`. `IntentRouter` calls the data plane, and `IntentRouterService` calls the control plane. Methods take positional arguments with request options last, and return `{ headers, result }`. |
| CLI | You work from a shell, a script, or continuous integration. | The `iris intent-router` commands ship in the same [`redis-iris`](https://pypi.org/project/redis-iris/) package. |
| HTTP | You need language-independent access or don't want a package dependency. | No package required. Send requests as shown in the [API reference](/content/develop/ai/context-engine/intent-router/api-reference.md). |

Expand Down
4 changes: 2 additions & 2 deletions content/develop/ai/context-engine/intent-router/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ Follow one tab throughout the page. The Python package and the command-line inte
```bash
python -m venv .venv
source .venv/bin/activate
python -m pip install 'redis-iris>=1.0.0b1'
python -m pip install 'redis-iris>=1.0.0'
```

**TypeScript**

```bash
npm install @redis-iris/intent-router@beta
npm install @redis-iris/intent-router
```

**cURL**
Expand Down
2 changes: 1 addition & 1 deletion content/develop/ai/context-engine/lens/read-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ weight: 35
Use the Lens read application programming interface (API) to list sessions and read turns from code, for example to export failed turns or build your own reports. The Python examples use the Lens read client:

```bash
python -m pip install 'redis-agent-lens>=0.1.0a4'
python -m pip install 'redis-agent-lens>=1.0.0'
```

The cURL examples use Bash and jq. Every operation is a `GET` request.
Expand Down
1 change: 1 addition & 0 deletions content/develop/ai/context-engine/sdk-and-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ The CLI takes each setting from the first of these that sets it: a command optio
| `service_url` | The service's control plane, which the CLI calls |
| `url` | The data plane your agent calls. The CLI writes it into `.env` |
| `identity_url` | The Identity Service that mints this service's keys |
| `database_id` | Agent Memory only: the database `service create` puts a store in when neither `--database` nor `service.yaml` names one. Default `1` |
| `[profiles.<name>.identity]` `url`, `tenant` | An Identity Service shared by every service, and its tenant |

`iris.toml` never holds secrets. A token or API key in it stops the CLI with exit code 2. Tokens and keys come only from environment variables or the files the CLI writes.
Expand Down
2 changes: 0 additions & 2 deletions content/operate/iris/intent-router/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ categories:
- iris
weight: 24
hideListLinks: true
bannerText: Documentation review draft.
bannerChildren: true
---

Deploy Redis Intent Router on Kubernetes to give applications a service that classifies text into intents and returns the target to dispatch to.
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/iris-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
data-art="{{ "images/ai/context-engine/iris-diagram/" | relURL }}"
data-link-retriever="{{ relref .Page "/develop/ai/context-engine/context-gateway" }}"
data-link-memory="{{ relref .Page "/develop/ai/context-engine/agent-memory/interactive-demo" }}"
data-link-cache="{{ relref .Page "/develop/ai/context-engine/agent-playbook" }}"
data-link-cache="{{ relref .Page "/develop/ai/context-engine/agent-playbooks" }}"
data-link-lens="{{ relref .Page "/develop/ai/context-engine/lens" }}">
<noscript><p>This interactive demo needs JavaScript.</p></noscript>
</div>
Expand Down
6 changes: 3 additions & 3 deletions local_examples/iris/playbooks/faqs/faqs.cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jq . faq-draft.json
# STEP_END

# STEP_START playbook-faq-publish
iris --json agent-playbooks faqs get "$FAQ_ID" --version "$VERSION" | jq .content
iris --json agent-playbooks faqs show "$FAQ_ID" --version "$VERSION" | jq .content
# STEP_END

# STEP_START playbook-faq-publication
Expand All @@ -40,15 +40,15 @@ cat > search.json <<'JSON'
"limit": 5
}
JSON
iris --json agent-playbooks faqs search --input search.json | jq .matches
iris --json agent-playbooks faqs search --input search.json | jq .items
# STEP_END

# STEP_START playbook-faq-update
jq '.answer += " Support can check the current stage but cannot guarantee a bank posting date."' \
faq.json > faq-update.json
iris --json agent-playbooks faqs push faq-update.json > faq-updated.json
UPDATED_VERSION=$(jq -er '.results[0].version' faq-updated.json)
iris --json agent-playbooks faqs get "$FAQ_ID" --version "$UPDATED_VERSION" | jq .content
iris --json agent-playbooks faqs show "$FAQ_ID" --version "$UPDATED_VERSION" | jq .content
# STEP_END

# STEP_START playbook-faq-republish
Expand Down
20 changes: 10 additions & 10 deletions local_examples/iris/playbooks/proposals/proposals.cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ iris --json agent-playbooks proposals list --view inbox --sort-by updatedAt --so

# STEP_START playbook-proposal-search
iris --json agent-playbooks proposals search 'Contact support about a missing refund' \
--minimum-score 0.7 --action-type add --entry-type faq --limit 5 | jq .matches
--min-score 0.7 --action-type add --entry-type faq --limit 5 | jq .items
# STEP_END

# STEP_START playbook-proposal-create
Expand All @@ -34,7 +34,7 @@ cat > proposal-source.json <<'JSON'
JSON
iris --json agent-playbooks proposals create proposal-faq.json --source proposal-source.json > proposal-created.json
PROPOSAL_ID=$(jq -er '.proposalId' proposal-created.json)
jq '{proposalId, proposalRevision}' proposal-created.json
jq '{proposalId, revision}' proposal-created.json
# STEP_END

# STEP_START playbook-proposal-evidence
Expand All @@ -54,12 +54,12 @@ iris --json agent-playbooks proposals evidence "$PROPOSAL_ID" "$EVIDENCE_ID" --i
# STEP_END

# STEP_START playbook-proposal-read
iris --json agent-playbooks proposals get "$PROPOSAL_ID" > reviewed.json
iris --json agent-playbooks proposals show "$PROPOSAL_ID" > reviewed.json
jq . reviewed.json
# STEP_END

# STEP_START playbook-proposal-replace
REVISION=$(jq -er '.proposalRevision' reviewed.json)
REVISION=$(jq -er '.revision' reviewed.json)
jq '
.action.add.candidate.content |
{
Expand All @@ -77,28 +77,28 @@ if [[ -n "$ENTRY_KEY" ]]; then
fi
iris --json agent-playbooks proposals replace "$PROPOSAL_ID" proposal-update.json \
--expected-revision "$REVISION" > revised.json
jq '{proposalRevision, action}' revised.json
jq '{revision, action}' revised.json
# STEP_END

# STEP_START playbook-proposal-trash
REVISION=$(jq -er '.proposalRevision' revised.json)
REVISION=$(jq -er '.revision' revised.json)
iris agent-playbooks proposals dismiss "$PROPOSAL_ID" --expected-revision "$REVISION"
iris agent-playbooks proposals restore "$PROPOSAL_ID"
# To purge a trashed proposal instead of restoring it:
# iris agent-playbooks proposals purge "$PROPOSAL_ID" --yes
# STEP_END

# STEP_START playbook-proposal-final-review
iris --json agent-playbooks proposals get "$PROPOSAL_ID" > final-review.json
jq '{action, evidence, proposalRevision}' final-review.json
iris --json agent-playbooks proposals show "$PROPOSAL_ID" > final-review.json
jq '{action, evidence, revision}' final-review.json
# STEP_END

# STEP_START playbook-proposal-accept
REVISION=$(jq -er '.proposalRevision' final-review.json)
REVISION=$(jq -er '.revision' final-review.json)
iris --json agent-playbooks proposals accept "$PROPOSAL_ID" --expected-revision "$REVISION" > accepted.json
ACCEPTED_FAQ_ID=$(jq -er '.result.versionCreated.entryId' accepted.json)
ACCEPTED_VERSION=$(jq -er '.result.versionCreated.version' accepted.json)
iris --json agent-playbooks faqs get "$ACCEPTED_FAQ_ID" --version "$ACCEPTED_VERSION" | jq '{entryId, version, content}'
iris --json agent-playbooks faqs show "$ACCEPTED_FAQ_ID" --version "$ACCEPTED_VERSION" | jq '{entryId, version, content}'
# STEP_END

# STEP_START playbook-proposal-publish
Expand Down
Loading
Loading