TencentCloud/TencentDB-Agent-Memory · error

${TAG} TCVDB backend requires tcvdb.database — please set a

Error message

${TAG} TCVDB backend requires tcvdb.database — please set a unique database name in your openclaw.json plugin config

What it means

For isolation, each TCVDB backend instance must target a unique database name. createStoreBundle requires tcvdb.database after checking url/apiKey and throws this error if it is missing, telling the user exactly where to set it.

Source

Thrown at MemoryCore/src/core/store/factory.ts:61

 * @param options.logger     Logger instance.
 */
export function createStoreBundle(
  config: MemoryTdaiConfig,
  options: { dataDir: string; logger?: StoreLogger },
): StoreBundle {
  const { logger } = options;

  // ── BM25 local encoder ──
  const bm25Encoder = createBM25Encoder(config.bm25, logger);

  switch (config.storeBackend) {
    case "tcvdb": {
      const tcvdbCfg = config.tcvdb;
      if (!tcvdbCfg.url || !tcvdbCfg.apiKey) {
        throw new Error(`${TAG} TCVDB backend requires tcvdb.url and tcvdb.apiKey`);
      }
      if (!tcvdbCfg.database) {
        throw new Error(`${TAG} TCVDB backend requires tcvdb.database — please set a unique database name in your openclaw.json plugin config`);
      }
      const database = tcvdbCfg.database;

      const store = new TcvdbMemoryStore({
        url: tcvdbCfg.url,
        username: tcvdbCfg.username,
        apiKey: tcvdbCfg.apiKey,
        database,
        embeddingEnabled: tcvdbCfg.embeddingEnabled,
        embeddingModel: tcvdbCfg.embeddingModel,
        timeout: tcvdbCfg.timeout,
        caPemPath: tcvdbCfg.caPemPath,
        logger,
        bm25Encoder: bm25Encoder ?? undefined,
      });

      logger?.debug?.(
        `${TAG} Store created: backend=tcvdb, database=${database}, ` +

View on GitHub (pinned to 3efcd317b8)

Solutions

  1. Add a unique tcvdb.database value in openclaw.json plugin config
  2. Use distinct database names per environment/team to avoid cross-isolation of memories
  3. Re-run after confirming the config file actually reloaded

Example fix

// before
{ "tcvdb": { "url": "https://tcvdb.example.com", "apiKey": "<key>" } }
// after
{ "tcvdb": { "url": "https://tcvdb.example.com", "apiKey": "<key>", "database": "memory-prod-team-a" } }
Defensive patterns

Strategy: validation

Validate before calling

if (config.storeBackend === 'tcvdb' && !config.tcvdb?.database) {
  throw new Error('tcvdb.database is required — set a unique database name in openclaw.json');
}

Type guard

function hasTcvdbDatabase(c): c is typeof c & { tcvdb: { database: string } } {
  return typeof c?.tcvdb?.database === 'string' && c.tcvdb.database.trim().length > 0;
}

Try / catch

try {
  bundle = createStoreBundle(config, logger);
} catch (e) {
  if (String(e.message).includes('tcvdb.database')) {
    throw new ConfigError('Add tcvdb.database to openclaw.json plugin config');
  }
  throw e;
}

Prevention

When it happens

Trigger: createStoreBundle/bundle with storeBackend 'tcvdb', url and apiKey set, but config.tcvdb.database undefined or empty.

Common situations: Adding TCVDB credentials but forgetting the database field, upgrading to a version that started requiring database for isolation, sharing one database name across environments by accident (the error exists to prevent that).

Related errors


AI-assisted analysis of TencentCloud/TencentDB-Agent-Memory@3efcd317b8 (2026-09-01). Data as JSON: /api/errors/062a8d3ee469b4b1. Report an issue: GitHub.