viking backend integrates with the managed VikingDB knowledge base service. Files are first uploaded to TOS (object storage), then registered into a VikingDB collection; splitting, embedding, and retrieval all run server-side, so no local embedding is required. It is the recommended backend for production.
When to use
- You need a managed, ready-to-use knowledge base service without maintaining a vector store yourself;
- You want server-side splitting, embedding, and reranking;
- You need metadata-filtered retrieval.
Prerequisites
- A Volcengine or BytePlus account with a VikingDB knowledge base created;
- A TOS bucket for uploading files;
- On first use, the backend automatically creates the target collection if it does not exist.
Usage
backend_config:
Parameters
Constructor parameters
backend_config supports the following settings:
Credential resolution checks
AGENTKIT_CLOUD_PROVIDER and then CLOUD_PROVIDER to determine the cloud provider. When set to byteplus, credentials are read from BYTEPLUS_ACCESS_KEY, BYTEPLUS_SECRET_KEY, and BYTEPLUS_SESSION_TOKEN; otherwise from VOLCENGINE_ACCESS_KEY, VOLCENGINE_SECRET_KEY, and VOLCENGINE_SESSION_TOKEN.TOS config
tos_config is a TOSConfig with env prefix DATABASE_TOS_:
Retrieval parameters
Besidesquery and top_k, the search method also supports:
Environment variables
Embedding, splitting, and retrieval all run server-side in VikingDB, so this backend requires no embedding model configuration. Profile-related features such as
enable_profile and query_with_user_profile also depend on the Viking family of backends.