You need to enable JavaScript to run this app.
Volcano Engine Function as a Service

Volcano Engine Function as a Service

Copy page
Download PDF
Long-term Memory Agent
Deploying Long-term Memory Agent applications with a few clicks
Copy page
Download PDF
Deploying Long-term Memory Agent applications with a few clicks
This document describes how to deploy your own Long-term Memory Agent application with one click by using the function service application center.​
Background​
  • Application introduction​
  • The Long-term Memory Agent is a chatbot (Bot) with long-term memory and knowledge base support. It can extract information, preferences, and plans from chat records, convert them into memories, vectorize them, and store them in OpenSearch. You can also write your own worldview into documents and upload them as files (knowledge base). During a chat, it feeds relevant file and memory fragments into a large model as RAG to generate personalized content.​
  • Runtime​
  • Native Python 3.12、Native Node.js 20.x。​
  • Associated Cloud Services​
warning​
Associated Cloud Services will incur corresponding usage fees. For billing details, refer to the billing documentation for the associated Cloud Service.​
  • Long-term Memory Agent backend​
  • Cloud Search: Provides memory and knowledge storage, and hybrid search for text and vectors.​
  • Function Service: Provides interfaces for large models to automate computer tasks, view desktops in real time, and control keyboards and mice.​
  • Cloud Monitor (Optional): Supports viewing of basic function monitoring.​
  • Long-term Memory Agent frontend​
  • API Gateway: Access the console through API Gateway.​
Prerequisites​
  • You have enabled all cloud services associated with this application.​
  • The IAM user has been granted the VeFaaSFullAccess, APIGFullAccess, and TLSFullAccess policies. If these policies are missing, contact the primary account or an administrator for authorization. For details, refer to Create a user and grant permissions.​
  • You have created an API Gateway instance of the Serverless Gateway type. For details, refer to Create an instance.​
  • If you are using Function Service for the first time, complete the cross-service authorization. If authorization is not granted, the console will display a cross-service authorization page to guide you through the process.​
Operation steps​
  1. Log in to the Function Service console.​
  1. Select the target region in the top navigation bar.​
tip​
Currently, this application is only supported in the China North 2 (Beijing) region.​
  1. In the left navigation pane, select Applications.>Select Application Gallery.​
  1. On the Application Gallery page, find the Long-term Memory Agent template and click Create Application.​
  1. On the Create Application page, enter the required parameters.​
  • Basic information​
  • ​
    Configuration item​
    Note​
    Selected template​
    Display the selected template. This scenario is a Long-term Memory Agent.​
    Name​
    Customize the application name based on the system's naming rules. You can also use the system-generated application name.​
    Remarks​
    Enter remarks for the application. This field can be empty.​
    IAM role​
    The Application Center provides a default system role, ServerlessApplicationRole, which includes some of the permissions required to access cloud resources.​
    • If your user role does not include this role, it will be added automatically.​
    • If your user role already includes this role, the system automatically checks if the role contains all the policies required by the current application. When related policies are missing, the console displays the names of the policies to add. Click add policy to add them.​
    warning​
    • IAM users must have the IAMReadOnlyAccess policy authorized; otherwise, they will not have the permission to retrieve information for the ServerlessApplicationRole role.​
    • To add more policies to the ServerlessApplicationRole role, IAM users must have the IAMFullAccess policy authorized.​
    Associated Cloud Service​
    Displays the names, activation statuses, and purposes of all Cloud Services required by the current application.​
    warning​
    For billing details and account balance requirements when using associated Cloud Services, refer to the relevant product billing documentation: Function Service billing instruction, API Gateway billing instruction, Cloud Search billing, Torch Log Service billing.​
    ​
  • Resource configuration​
  • ​
    Configuration item​
    Note​
    Basic information​
    ​
    Region​
    Displays the region of the current application and its associated cloud resources.​
    VPC​
    Select the VPC to deploy the Long-term Memory Agent. This VPC must be the same as the OpenSearch instance's VPC.​
    Subnet​
    Select the subnet within the selected VPC where you want to deploy the Long-term Memory Agent.​
    Security groups​
    Select a security group for the Long-term Memory Agent. The Default security group is selected by default.​
    Cloud Search configuration​
    ​
    OpenSearch instance​
    ​
    Select the OpenSearch instance created in the prerequisites to store data.​
    The environment variable key (Env key) for the OpenSearch instance is OPENSEARCH_ADDRESS. After creating the application, you can use OPENSEARCH_ADDRESS to view or modify the associated OpenSearch instance. Note that the format is http[s]://***.com:9200.​
    Access password​
    The password for the admin user of the OpenSearch instance.​
    Use the optimized version​
    Use the DiskANN + RaBitQ optimized version. When you turn on DiskANN and RaBitQ, a hybrid vector and text search is also used. The pipeline name for the normalization and weighting algorithm is fixed to rrf-search-pipeline. For details, refer to the Cloud Search Documentation.​
    The environment variable keys (Env keys) for this option are: DISK_ANN and RABITQ. Cannot be modified after the application is created.​
    tip​
    The DiskANN + RaBitQ engine of Cloud Search is currently in the invitation-only beta phase. To use it, contact your Volcano Engine account manager.​
    Large model configuration​
    ​
    Model resource API key​
    ​
    The API key for accessing the Doubao large model. Select an API key from the list of existing keys under the current account, or enter a custom one. To obtain an API key, refer to API Key Management.​
    The environment variable key (Env key) for the model resource API key is API_KEY. After creating the application, you can view or modify the model resource API key through API_KEY.​
    Chat model​
    Doubao chat model access point. We recommend doubao-pro-32k-241215 for role-playing in conversations.​
    Inference model​
    The recommended access point for the Doubao chat content summarization model is doubao-1-5-thinking-pro-250415, which is suitable for inference scenarios.​
    Embedding model​
    Doubao embedding model access point. We recommend doubao-embedding-text-240715.​
    Vector dimension​
    The doubao-embedding-text-240715 model generates 2560-dimensional vectors. If you modify the vectorization model, you must enter the vector dimension of the modified model; otherwise, data writing will fail.​
    Access configuration​
    ​
    Gateway instance​
    Select the Serverless type API Gateway instance prepared in the prerequisites. This will automatically create related API Gateway trigger resources in this instance, including: a service, Upstream, and a route.​
    ​
  1. Click OK to create and deploy the application.​
  • The system automatically redirects you to the application details page, where you can view the real-time deployment status and Logs.​
Verify the result​
  1. After the application is successfully deployed, on the Application details tab, in the Basic information section, click the WebUI access URL to open your own Long-term Memory Agent application interface.​
  1. In the Long-term Memory Agent application interface, interact with the large model to experience a personalized Agent with a worldview and memory.​
​
​
​
Last updated: 2026.07.09 17:20:52