The 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
At init, if the collection does not exist, VeADK creates it from memory_type.
You can also pass config explicitly via backend_config:
Get a user profile
Parameters
Constructor parameters
backend_config supports the following settings:
Credential resolution order
The backend prefers volcengine_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: in byteplus mode it is always cn-hongkong, ignoring the env var and any explicitly passed value; in other modes, when not set explicitly it reads env DATABASE_VIKING_REGION and defaults to cn-beijing if still empty.
memory_type: when not set explicitly, reads env DATABASE_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.
viking is the only backend that supports get_user_profile(user_id), returning the user’s profile information; other backends return an empty string for that method.