diff --git a/content/develop/ai/context-engine/intent-router/_index.md b/content/develop/ai/context-engine/intent-router/_index.md index b60c32db18..8211c88dda 100644 --- a/content/develop/ai/context-engine/intent-router/_index.md +++ b/content/develop/ai/context-engine/intent-router/_index.md @@ -59,6 +59,11 @@ A **Router** holds your intents and is its own access boundary. Each **intent** 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. See the [developer guide](/content/develop/ai/context-engine/intent-router/developer-guide.md) to choose a client, and [define intents and match your first queries](/content/develop/ai/context-engine/intent-router/quickstart.md). +Redis Intent Router is available on Redis Cloud and for self-managed deployment on Kubernetes. + +- **Redis Cloud:** [Create an Intent Router](/content/operate/iris/intent-router/create-router.md) and an agent key in the Redis Cloud console. +- **Self-managed:** See [Self-managed Intent Router](/content/operate/iris/intent-router/self-managed/_index.md), then [create a Router and an agent key](/content/operate/iris/intent-router/self-managed/api-examples.md). You need a license key to deploy: [contact Redis](https://redis.io/contact/) to request access. + ## Choose how to use it | Use case | How an intent helps | diff --git a/content/develop/ai/context-engine/intent-router/quickstart.md b/content/develop/ai/context-engine/intent-router/quickstart.md index c789cc03ce..5f4a9ae6fb 100644 --- a/content/develop/ai/context-engine/intent-router/quickstart.md +++ b/content/develop/ai/context-engine/intent-router/quickstart.md @@ -15,7 +15,7 @@ Intent Router classifies each incoming user message by intent, so your applicati ## Before you begin -You need a Router in the `READY` state and an agent key with `write` access to it. `write` includes `read`. To create a Router yourself, see [Manage Routers](/content/develop/ai/context-engine/intent-router/manage-routers.md). Platform teams mint agent keys as shown in [Create a Router and an agent key](/content/operate/iris/intent-router/self-managed/api-examples.md). +You need a Router in the `READY` state and an agent key with `write` access to it. `write` includes `read`. On Redis Cloud, [create an Intent Router](/content/operate/iris/intent-router/create-router.md) and an agent key in the console. On a self-managed deployment, see [Manage Routers](/content/develop/ai/context-engine/intent-router/manage-routers.md) to create a Router yourself. Platform teams mint agent keys as shown in [Create a Router and an agent key](/content/operate/iris/intent-router/self-managed/api-examples.md). This walkthrough needs no agent framework or model-provider key. diff --git a/content/operate/iris/_index.md b/content/operate/iris/_index.md index 3908a78613..8f9c57fc1b 100644 --- a/content/operate/iris/_index.md +++ b/content/operate/iris/_index.md @@ -26,7 +26,7 @@ Use this section to deploy, configure, and operate Redis Iris services. Develope ## Deployment options -Redis Iris services are available as managed services on Redis Cloud. Agent Memory and Context Gateway are also available for self-managed deployment. +Redis Iris services are available as managed services on Redis Cloud. Agent Memory, Context Gateway, and Intent Router are also available for self-managed deployment. ### Redis Cloud @@ -35,6 +35,7 @@ Create and manage Redis Iris services through the Redis Cloud console without de - [Create a Redis Agent Memory service]({{< relref "/operate/iris/agent-memory/create-service" >}}) - [Create a Redis Agent Playbooks playbook]({{< relref "/operate/iris/agent-playbook/create-playbook" >}}) - [Create a Redis Context Gateway]({{< relref "/operate/iris/context-gateway/create-gateway" >}}) +- [Create a Redis Intent Router]({{< relref "/operate/iris/intent-router/create-router" >}}) - [Create Lens]({{< relref "/operate/iris/lens/create-lens" >}}) ### Self-managed diff --git a/content/operate/iris/intent-router/_index.md b/content/operate/iris/intent-router/_index.md index 09555105fd..c18ed89e71 100644 --- a/content/operate/iris/intent-router/_index.md +++ b/content/operate/iris/intent-router/_index.md @@ -11,7 +11,7 @@ weight: 24 hideListLinks: true --- -Redis Intent Router classifies text into the intents you define and returns the target to dispatch to. +Redis Intent Router gives applications a service that classifies text into intents and returns the target to dispatch to. ## Deployment options @@ -19,7 +19,7 @@ Redis Intent Router classifies text into the intents you define and returns the Use Redis Intent Router as a managed service on Redis Cloud. - +[Create an Intent Router](/content/operate/iris/intent-router/create-router.md) and connect an application, or [view and manage an existing Router](/content/operate/iris/intent-router/manage-router.md). After setup, use the [developer quickstart](/content/develop/ai/context-engine/intent-router/quickstart.md) to define your first intents and match queries. diff --git a/content/operate/iris/intent-router/create-router.md b/content/operate/iris/intent-router/create-router.md new file mode 100644 index 0000000000..c099d129ab --- /dev/null +++ b/content/operate/iris/intent-router/create-router.md @@ -0,0 +1,125 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- iris +description: Create an Intent Router in Redis Cloud, add its first intents, and connect an application. +hideListLinks: true +linktitle: Create router +title: Create an Intent Router +weight: 5 +--- + +An Intent Router classifies each incoming request by intent, so your application can send it to the right tool, model, agent, or guardrail. You define intents with example phrases, and your application sends each request to the Router to find the closest match. This guide walks you through creating a Router in the Redis Cloud console, adding its first intents, and connecting an application. + +## Before you begin + +You need an active Redis Cloud database that Intent Router can use to store the Router's intents, examples, and search index. If your account has no eligible database, the console disables **New Intent Router** and asks you to create one that meets the prerequisites. + + + +If the database has a CIDR allow list, it must allow Intent Router to reach it. See [Create an Intent Router](#create-an-intent-router). + +If you don't have permission to make a change, the console hides or disables the control for it. Ask your account administrator for access. + +## Create an Intent Router + +1. From the [Redis Cloud console](https://cloud.redis.io/), select **Intent Router** under **Iris** in the menu. + + If you don't have a Router yet, you see an introduction to Intent Router. Otherwise, you see the list of your Routers. + + + +1. Select **New Intent Router**. + +1. In the **New Intent Router** dialog, enter the following: + + | Setting | Description | + |:--------|:------------| + | **Name** | A name for the Router, up to 128 characters. Required. | + | **Database** | The database that holds the Router's intents, examples, and search index. You can't change it after you create the Router. Required. | + | **Template** | **Custom** (the default), **Model selection**, **Guardrails**, or **Agent routing**. Every template except **Custom** adds starter intents when the Router is ready. See [Starter intents](#starter-intents). | + | **Embedding model** | The model that embeds your examples and each request. It decides how well matching understands wording. The console selects the first model in the list. You can't change it after you create the Router. Required. | + | **Description** | What the Router is for, up to 1,024 characters. Optional. | + + If the database you choose has a CIDR allow list that blocks Intent Router, the console shows the IP addresses to add. Add each one to the database's CIDR allow list, under **Security** in the database's settings, then select the database again. + + + +1. Select **Create Intent Router**. + +The console creates the Router and opens the [**Connect to Intent Router**](#connect-an-application) step. The new Router starts in the **Provisioning** state while Intent Router builds its search index. It's ready to serve requests when its state is **Ready**. + +If the console can't tell whether the Router was created, for example after a timeout, it asks you to check your Intent Routers before you try again. Select **Check Intent Routers** rather than creating the Router again. + +### Starter intents + +A template other than **Custom** adds starter intents the first time you open the Router's **Intents** tab after the Router is ready. You can edit or delete them like any other intent. + +| Template | Starter intents | +|:---------|:----------------| +| **Model selection** | `small_model`, `frontier_model`, `code_model` | +| **Guardrails** | `prompt_injection`, `off_topic` | +| **Agent routing** | `orders_agent`, `billing_agent` | + +If the starter intents aren't added, for example because you reloaded the page before the Router was ready, select **Add the *N* starter intents** on the empty **Intents** tab. + +The template is otherwise a label: every Router matches the same way. + +## Connect an application + +Applications send requests to the Router's match endpoint with an agent key that has a grant on the Router. + +1. Open the **Connect to Intent Router** step. It opens after you create a Router, or you can select **Connect** on the Router's page. + +1. Under **Connection details**, copy the **Endpoint** and the **Router ID**. + +1. Select **Create an API key**. + +1. In the **Create API key** step, enter the following, then select **Create API key**: + + | Setting | Description | + |:--------|:------------| + | **Key name** | A name for the key, up to 64 characters of letters, numbers, periods, underscores, and hyphens. The console suggests the Router's name followed by `-key`. | + | **What can this key do?** | The key's grant on this Router: `read`, `write`, or `full`. Give an application that only matches requests a `read` key. Give a tool that authors intents a `write` key. See [Issue agent keys](/content/develop/ai/context-engine/intent-router/manage-routers.md#issue-agent-keys). | + | **Expiration** | **Never**, **30 days**, **90 days** (the default), **365 days**, or **Custom date**. | + + To set more options, select **Customize in the full page**, which opens **Access & Identity**. + + > [!WARNING] + > The console shows the key only once, when you create it. Copy it and save it to a secure location before you select **Done**. If you lose the key, rotate it to get a new one. + +1. Under **Try it**, copy the cURL request to send your first match request, then select **Done**. + + After you create a Router, **Done** opens the Router's **Intents** tab. + +To connect from code, select **Connect** on the Router's page. Under **Quick connect**, select **TypeScript** or **cURL**, and copy its sample. Replace `` with your agent key. + + + +## Add intents + +Each intent is a name and the example phrases that should match it. The Router matches a request to the intent whose examples are closest in meaning. + +1. On the Router's **Intents** tab, select **New intent**. + +1. In the **New intent** dialog, enter the following: + + | Setting | Description | + |:--------|:------------| + | **Intent name** | A name such as `track_order`, up to 128 characters. It starts with a letter or digit and uses letters, digits, `.`, `_`, and `-`. Required. | + | **When it should win** | A description of the requests this intent is for, up to 1,024 characters. Optional. | + | **Example commands, one per line** | The phrases that should match this intent, such as `where is my order`. Up to 256 examples, each up to 2,048 characters. The console drops blank and duplicate lines. | + + More examples make matching more accurate. An intent with no examples never matches. + +1. Select **Create intent**. + +To check how the Router classifies a request, enter it under **Try a query** on the **Intents** tab and select **Match**. The console lists the matching intents with their scores, best first. + +## Next steps + +- [View and manage an Intent Router](/content/operate/iris/intent-router/manage-router.md). +- Follow the [Intent Router quickstart](/content/develop/ai/context-engine/intent-router/quickstart.md) to define intents and match requests from code. +- [Match queries](/content/develop/ai/context-engine/intent-router/match.md) to tune thresholds and result limits. diff --git a/content/operate/iris/intent-router/manage-router.md b/content/operate/iris/intent-router/manage-router.md new file mode 100644 index 0000000000..6138a61bba --- /dev/null +++ b/content/operate/iris/intent-router/manage-router.md @@ -0,0 +1,109 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- iris +description: View and manage an Intent Router and its intents in Redis Cloud. +hideListLinks: true +linktitle: Manage router +title: View and manage an Intent Router +weight: 15 +--- + +After you [create an Intent Router](/content/operate/iris/intent-router/create-router.md), select **Intent Router** under **Iris** in the Redis Cloud console menu to see the list of your Routers. + +The list shows each Router's **Status**, **Name**, **Router ID**, **Embedding model**, **Minimum score**, **Related Database**, and **Configuration updated date**. Select a Router to open it. + + + +| Status | Meaning | +|:-------|:--------| +| **Provisioning** | Intent Router is building the Router's search index. The Router can't serve requests yet. | +| **Ready** | The Router serves requests. | +| **Suspended** | The Router keeps its intents but doesn't serve requests. | +| **Failed** | The Router couldn't be provisioned. Its **Configuration** tab shows why. | +| **Deleting** | Intent Router is removing the Router. | + +A failed Router can't be resumed. Delete it and create it again after you fix the cause. + +The Router's page has the **Configuration** and **Intents** tabs, and opens on the **Configuration** tab. Select **Connect** on the Router's page to [connect an application](/content/operate/iris/intent-router/create-router.md#connect-an-application). + +## Configuration tab + +The **General settings** section shows the Router's **Router ID**, its **Embedding model**, its **Redis Cloud database**, its **Status**, its **Template**, its **Created date**, and its **Configuration updated date**. To change a setting, select **Edit**, make your changes, and select **Save changes**. + +| Setting | Description | +|:--------|:------------| +| **Router name** | The Router's name, up to 128 characters. | +| **Description** | An optional description. | +| **Minimum score** | How similar a request must be to an intent's examples to match, from 0.01 to 1. | + +You can't change a Router's embedding model or database after you create it. + +If someone else changed the Router while you were editing, the console asks you to reload it and apply your changes again. + +### Suspend or resume a Router + +Suspend a Router to stop it serving requests without deleting its intents. Requests to a suspended Router fail until you resume it. + +1. On the Router's **Configuration** tab, find the **Availability** section. +1. Turn the switch off to suspend the Router, or on to resume it. + +You can suspend or resume a Router only when it's **Ready** or **Suspended**. + +### Delete a Router + +Deleting a Router permanently removes it with its intents and examples, and applications that use it lose access right away. + +1. On the Router's **Configuration** tab, select **Delete** in the **Danger zone** section. +1. Select the **Yes, I want to delete this resource** checkbox. +1. Select **Delete**. + +This action can't be undone. + + + +## Intents tab + +The **Intents** tab lists the Router's intents, with each one's name, **When it should win** description, **Target**, and number of **Examples**. You can view intents only while the Router is **Ready**. + +From this tab, you can: + +- [Add an intent](/content/operate/iris/intent-router/create-router.md#add-intents) with **New intent**. +- Expand an intent to see its example commands, add examples, or remove them. +- Use an intent's actions menu to edit or delete it. +- Test how the Router classifies a request under **Try a query**. + +The console doesn't set an intent's target or its own minimum score. To set them, use the [data-plane API or a client](/content/develop/ai/context-engine/intent-router/manage-intents.md). + +### Manage examples + +Expand an intent to see its **Example commands**. + +- To add an example, enter it under **New example command** and press Enter. To add several at once, paste one per line. +- To remove an example, select **Remove**. The console removes it right away, without asking you to confirm. + +An intent holds up to 256 examples, each up to 2,048 characters. You can't edit an example. Remove it and add the new wording instead. + +### Edit an intent + +1. Select **Edit** in the intent's actions menu. +1. Change **When it should win**. +1. Select **Save changes**. + +You can't rename an intent. To use a new name, create an intent with that name and delete the old one. + +### Delete an intent + +Deleting an intent removes it with its examples. + +1. Select **Delete** in the intent's actions menu. +1. Select the **Yes, I want to delete this resource** checkbox. +1. Select **Delete**. + +This action can't be undone. + +### Try a query + +Under **Try a query**, enter a request such as `Where is my order?` and select **Match**. The console lists the intents that match, best first, with each one's score. If no intent scores at least the Router's minimum score, the console shows **No intent matched**.