viking backend uses Volcengine VikingDB memory as long-term storage. It is a managed service requiring no self-hosted vector store or local embedding — recommended for production. This backend also supports user profiles (get_user_profile), the only backend that does.
The earlier viking_mem backend is deprecated and is automatically mapped to viking; both have the same behavior.
When to use
- Production with persistence and managed operations;
- When you want Volcengine’s memory capabilities, including user profiles;
- You have a Volcengine account with the corresponding AK/SK or IAM credentials.
Usage
memory_type.
When you select the VikingDB Memory backend in Studio’s custom creation flow, you can browse and pick an existing VikingDB memory collection from the current account. Selecting an existing collection uses its name as the collection index, and Studio automatically fills the project, region, and memory-type environment variables. If you do not select one, the collection name is auto-generated from the agent name, and the collection is created at runtime if it does not exist. See the Studio agent workbench.
backend_config:
Get a user profile
Parameters
Constructor parameters
backend_config supports the following settings:
Credential resolution order
The backend prefersvolcengine_access_key and volcengine_secret_key from explicit arguments or environment variables. When both are missing, it reads credentials from the VeFaaS IAM file, suitable for Volcengine cloud deployments.
Defaults for region and memory_type
region: inbyteplusmode it is alwayscn-hongkong, ignoring the env var and any explicitly passed value; in other modes, when not set explicitly it readsDATABASE_VIKING_REGIONand thenREGION, defaulting tocn-beijingif neither is set.memory_type: when not set explicitly, reads envDATABASE_VIKINGMEM_MEMORY_TYPE(a comma-separated string is parsed into a list); when still empty, defaults to["sys_event_v1", "sys_profile_v1"].
Environment variables
index (the collection name) must follow VikingDB rules: start with an English letter, contain only letters, digits, and underscores, length 1–128; otherwise initialization fails.