diff --git a/content/operate/iris/agent-memory/_index.md b/content/operate/iris/agent-memory/_index.md index 42f86cf21e..6ad8e09da7 100644 --- a/content/operate/iris/agent-memory/_index.md +++ b/content/operate/iris/agent-memory/_index.md @@ -25,4 +25,4 @@ Deploy, configure, secure, and operate Redis Agent Memory on your own Kubernetes Use Redis Agent Memory as a managed service on Redis Cloud. -[Create a Redis Agent Memory service]({{< relref "/operate/iris/agent-memory/create-service" >}}) or [view and manage an existing service]({{< relref "/operate/iris/agent-memory/view-service" >}}). +[Create a Redis Agent Memory service]({{< relref "/operate/iris/agent-memory/create-service" >}}), [configure its AI models]({{< relref "/operate/iris/agent-memory/model-configuration" >}}), or [view and manage an existing service]({{< relref "/operate/iris/agent-memory/view-service" >}}). diff --git a/content/operate/iris/agent-memory/create-service.md b/content/operate/iris/agent-memory/create-service.md index bf87ca95dd..11c427b3a8 100644 --- a/content/operate/iris/agent-memory/create-service.md +++ b/content/operate/iris/agent-memory/create-service.md @@ -63,6 +63,7 @@ If you lose the service key value, you will need to [generate a new service key] 1. The [General settings](#general-settings) section defines basic properties of your service. 1. The [Memory configuration](#memory-configuration) section allows you to define the time-to-live (TTL) of your agent's memories, set how often memories are extracted, and control automatic summarization of session memory. + 1. The [AI model and credentials](#ai-model-and-credentials) section allows you to use your own model provider key and select the models used by the service. 1. The [Memory types & extraction](#memory-types-and-extraction) section allows you to define custom memory types with their own extraction strategies. 1. The [Sensitive-data exclusions](#sensitive-data-exclusions) section allows you to keep sensitive content out of long-term memory. @@ -103,6 +104,18 @@ Use the **Automatic summarization** toggle to enable or disable this behavior. W For example, with **Summarize after** set to 20 and **Keep most recent** set to 10, once a session reaches 20 messages, the oldest 10 messages are summarized automatically and the 10 most recent are kept in full. +### AI model and credentials {#ai-model-and-credentials} + +The **AI model and credentials (optional)** section controls the credentials and models that Agent Memory uses for memory extraction, session summarization, and long-term-memory search. + +Select **Use Redis in-built keys** to use Redis-managed model credentials. This is the default and requires no additional configuration. To use your provider account, select **Bring my own key**, then select the provider, LLM model, embedding model, and add your API key. + +LLM model options can change. Use the console to see the current choices; values shown in the screenshot are examples. + +{{The AI model and credentials section with Bring my own key selected. The section contains the provider, API key, LLM model, and embedding model settings.}} + +The same provider key is used for both model types. The credential source, provider, and embedding model are fixed after you create the service. For configuration, key rotation, security, and troubleshooting guidance, see [Configure AI models for Agent Memory]({{< relref "/operate/iris/agent-memory/model-configuration" >}}). + ### Memory types & extraction {#memory-types-and-extraction} The **Memory types & extraction** section allows you to define custom long-term memory types with structured fields and an optional extraction strategy. Each enabled type runs independently. diff --git a/content/operate/iris/agent-memory/model-configuration.md b/content/operate/iris/agent-memory/model-configuration.md new file mode 100644 index 0000000000..5745c74661 --- /dev/null +++ b/content/operate/iris/agent-memory/model-configuration.md @@ -0,0 +1,131 @@ +--- +alwaysopen: false +categories: +- docs +- operate +- iris +description: Configure the AI models and provider API key used by an Agent Memory service on Redis Cloud. +hideListLinks: true +linktitle: Configure AI models +title: Configure AI models for Agent Memory +weight: 10 +bannerText: Redis Agent Memory on Redis Cloud is currently available as a public preview. Features and behavior are subject to change. +--- + +You can use Redis-managed credentials for the AI models used by an Agent Memory service, or bring your own model provider API key. + +## Choose who supplies the model credentials + +Agent Memory uses two AI models: + +| Model | Purpose | +| --- | --- | +| Large language model (LLM) | Extracts long-term memories from sessions and summarizes session messages. | +| Embedding model | Creates vector embeddings used to find relevant long-term memories. | + +When you create a service, choose one of these credential sources: + +| Credential source | Behavior | +| --- | --- | +| **Use Redis in-built keys** | Redis manages the model credentials. You do not select models or provide a model provider API key. | +| **Bring my own key** | You select the provider and models. Agent Memory uses your provider API key and provider account for both LLM and embedding calls. | + +Available LLM model choices can change. Use the Redis Cloud console to see the current choices. Provider and model values shown in this guide's screenshots are examples. + +## Prepare your provider account + +Before you use your own key, make sure: + +- The provider API key is active. +- The provider account has enough quota for LLM and embedding calls. +- The provider account can use the models that you select. +- You understand the provider's billing, service terms, and data-handling policies. The selected LLM processes session content used for extraction and summarization. The embedding model processes the text needed to create embeddings for long-term-memory storage and search. + +{{< note >}} +The model provider API key is different from an Agent Memory service API key. Applications use a service API key to call the Agent Memory API. Agent Memory uses the model provider API key to call the selected AI models. +{{< /note >}} + +## Use your own key when you create a service + +To configure your own model provider key: + +1. Start the [custom service creation flow]({{< relref "/operate/iris/agent-memory/create-service" >}}). + +1. In **AI model and credentials (optional)**, select **Bring my own key**. + +1. Select a **Provider**. + +1. Enter the provider **API key**. + +1. Select an **LLM model**. + +1. Select an **Embedding model**. + +1. Complete the other service settings, then select **Create**. + +{{The AI model and credentials section with Bring my own key selected. The section contains the provider, API key, LLM model, and embedding model settings.}} + +The key is used for both the LLM and embedding calls. Redis stores the key securely and does not show it again after you create the service. + +{{}} +The credential source, provider, and embedding model are fixed after you create the service. A service created with Redis-managed credentials cannot later use your provider key. A service created with your key cannot switch to Redis-managed credentials. +{{}} + +## View the current model configuration + +To view the configuration: + +1. In the Redis Cloud console, select **Agent Memory**. + +1. Select the service. + +1. On the **Configuration** tab, find **AI model and credentials**. + +{{The AI model and credentials section for an existing service. It shows the provider, embedding model, LLM model, and a User-managed API key status.}} + +The **User-managed** status confirms that the service uses your provider key. Redis does not display or return the saved value. + +## Change the LLM model or rotate the key + +You can change the LLM model and replace the provider API key. You cannot change the provider or embedding model. + +To update the service: + +1. On the service **Configuration** tab, select **Edit**. + +1. To change the LLM model, select another **LLM model**. + +1. To rotate the provider key, enter a new value in **Replace API key**. Leave this field empty to keep the current key. + +1. Select **Save**. + +{{The AI model and credentials section in edit mode. The provider and embedding model are read-only. The LLM model and Replace API key settings are editable.}} + +After the update completes, new operations use the replacement key. Operations that were already in progress can continue to use the previous key. The replacement applies to both LLM and embedding calls. + +## Redis protects the provider key + +- Redis stores the provider key securely. +- The key is write-only. Redis does not display or return it after saving. +- The key does not appear in the service's model configuration. +- Deleting the Agent Memory service also deletes the stored provider key. +- A service created with a provider key does not fall back to Redis-managed credentials. + +## Resolve provider key and quota errors + +Model-backed operations can fail when the provider rejects the key or reports that the model quota was exceeded. + +For synchronous API operations, Agent Memory returns these conditions as `424 Failed Dependency` responses: + +| Error | Meaning | What to do | +| --- | --- | --- | +| **Invalid Model Credentials** | The selected model credentials are missing or invalid. | Confirm that the provider key is active. If necessary, [replace the key](#change-the-llm-model-or-rotate-the-key), then retry the operation. | +| **Model Quota Exceeded** | The provider reported that the selected model account exceeded its model quota. | Check the provider account's quota and billing status. Resolve any problem, then retry the operation. | + +Failures in asynchronous extraction or summarization might not appear in the API call that added the session messages. If expected memories or summaries do not appear: + +1. Confirm that the provider key is still active. + +1. Confirm that the provider does not report that the model quota was exceeded. + +1. If the key is valid and quota is available, [contact support](https://redis.io/support/). diff --git a/content/operate/iris/agent-memory/view-service.md b/content/operate/iris/agent-memory/view-service.md index b9edd88c25..ad57e8edb1 100644 --- a/content/operate/iris/agent-memory/view-service.md +++ b/content/operate/iris/agent-memory/view-service.md @@ -29,6 +29,7 @@ The **Configuration** tab lets you view the details of your Agent Memory service - The **General settings** section provides the connection details and general settings for your Agent Memory service. - The **Memory configuration** section provides the service settings for your Redis Agent Memory service. +- The **AI model and credentials** section shows the model configuration for a service that uses a customer-managed provider key. - The **Memory types & extraction** section shows any custom memory types defined for your service. - The **Sensitive-data exclusions** section shows the sensitive-data exclusions configured for your service. - The **Actions** section lets you flush or delete your Redis Agent Memory service. @@ -67,6 +68,16 @@ The **Memory configuration** section shows the time-to-live (TTL) for memory sto | **Summarize after (messages)** | The number of messages a session can hold before older messages are summarized. Shown only when automatic summarization is enabled. _(Editable)_ | | **Keep most recent (messages)** | The number of most recent messages that are always kept in full and never summarized. Shown only when automatic summarization is enabled. _(Editable)_ | +### AI model and credentials {#ai-model-and-credentials} + +The **AI model and credentials** section appears when the service uses your model provider key. + +Provider and model values shown in the screenshot are examples. + +{{The AI model and credentials section for an existing service. It shows the provider, embedding model, LLM model, and a User-managed API key status.}} + +The provider and embedding model are read-only. You can change the LLM model or replace the provider key. For update steps, key rotation behavior, security, and troubleshooting guidance, see [Configure AI models for Agent Memory]({{< relref "/operate/iris/agent-memory/model-configuration" >}}). + ### Memory types & extraction {#memory-types-and-extraction} The **Memory types & extraction** section shows any [custom memory types]({{< relref "/operate/iris/agent-memory/create-service#custom-memory-types" >}}) defined for the service, each listed with its name, fields, and extraction strategy. @@ -129,7 +140,7 @@ Flushing the service is permanent and cannot be undone, and will result in empty #### Delete service -Deleting your Agent Memory service permanently deletes all associated memory data, the service configuration, and the Agent Memory search index. It also immediately terminates all API keys associated with the service. Data stored in other indexes within the same database will remain unaffected. +Deleting your Agent Memory service permanently deletes all associated memory data, the service configuration, the Agent Memory search index, and any stored model provider key. It also immediately terminates all API keys associated with the service. Data stored in other indexes within the same database will remain unaffected. To delete your Agent Memory service: diff --git a/content/operate/rc/context-engine/agent-memory/_index.md b/content/operate/rc/context-engine/agent-memory/_index.md index 01f83bdd76..91bd4bd3bb 100644 --- a/content/operate/rc/context-engine/agent-memory/_index.md +++ b/content/operate/rc/context-engine/agent-memory/_index.md @@ -16,6 +16,6 @@ aliases: Redis Agent Memory is available as a managed service on Redis Cloud. -Use the Redis Iris operational documentation to [create an Agent Memory service]({{< relref "/operate/iris/agent-memory/create-service" >}}) or [view and manage an existing service]({{< relref "/operate/iris/agent-memory/view-service" >}}). +Use the Redis Iris operational documentation to [create an Agent Memory service]({{< relref "/operate/iris/agent-memory/create-service" >}}), [configure its AI models]({{< relref "/operate/iris/agent-memory/model-configuration" >}}), or [view and manage an existing service]({{< relref "/operate/iris/agent-memory/view-service" >}}). For deployment options, see the [Agent Memory operational overview]({{< relref "/operate/iris/agent-memory" >}}). diff --git a/static/images/rc/agent-memory-ai-model-create.png b/static/images/rc/agent-memory-ai-model-create.png new file mode 100644 index 0000000000..f3a73e1097 Binary files /dev/null and b/static/images/rc/agent-memory-ai-model-create.png differ diff --git a/static/images/rc/agent-memory-ai-model-details.png b/static/images/rc/agent-memory-ai-model-details.png new file mode 100644 index 0000000000..1aa7a5d985 Binary files /dev/null and b/static/images/rc/agent-memory-ai-model-details.png differ diff --git a/static/images/rc/agent-memory-ai-model-edit.png b/static/images/rc/agent-memory-ai-model-edit.png new file mode 100644 index 0000000000..24ca575da5 Binary files /dev/null and b/static/images/rc/agent-memory-ai-model-edit.png differ