mem0ai/mem0 · error · Error

Neptune Analytics HTTPS endpoints require graphIdentifier; p

Error message

Neptune Analytics HTTPS endpoints require graphIdentifier; pass graphIdentifier separately or use neptune-graph://<graph-id>.

What it means

If config.endpoint is an http(s) URL, the Neptune Analytics provider refuses it: the SDK's vector-search API is addressed by graph identifier, not by the HTTPS endpoint URL (that pattern belongs to Neptune Database / the data API). The error tells you to pass graphIdentifier explicitly or use the neptune-graph://<graph-id> scheme. This prevents silently targeting the wrong service.

Source

Thrown at mem0-ts/src/oss/src/vector_stores/neptune_analytics.ts:415

      );
    }
  }

  private resolveGraphIdentifier(config: NeptuneAnalyticsConfig): string {
    if (config.graphIdentifier) {
      return config.graphIdentifier;
    }

    const rawIdentifier = config.endpoint;

    if (!rawIdentifier) {
      throw new Error(
        "Neptune Analytics vector store requires graphIdentifier or endpoint.",
      );
    }

    if (/^https?:\/\//i.test(rawIdentifier)) {
      throw new Error(
        "Neptune Analytics HTTPS endpoints require graphIdentifier; pass graphIdentifier separately or use neptune-graph://<graph-id>.",
      );
    }

    if (rawIdentifier.startsWith("neptune-graph://")) {
      return rawIdentifier.slice("neptune-graph://".length);
    }

    return rawIdentifier;
  }

  private buildClientConfig(config: NeptuneAnalyticsConfig): {
    [key: string]: any;
    endpoint?: string;
  } {
    const {
      client: _client,
      collectionName: _collectionName,

View on GitHub (pinned to 001c235229)

Solutions

  1. Extract the graph id from the URL (g-xxxxxxxx) and pass graphIdentifier: 'g-xxxxxxxx'.
  2. Or set endpoint: 'neptune-graph://g-xxxxxxxx'.
  3. Keep a raw graph-id (no scheme) in config/env rather than the full HTTPS URL.

Example fix

// before
config: { endpoint: 'https://g-1234abcd.us-east-1.neptune-graph.amazonaws.com' } // throws

// after
config: { graphIdentifier: 'g-1234abcd', region: 'us-east-1' }
Defensive patterns

Strategy: validation

Validate before calling

if (/^https?:\/\//i.test(config.endpoint ?? '')) {
  config = { ...config, graphIdentifier: config.endpoint.match(/(g-[a-z0-9]+)/i)?.[1] };
  if (!config.graphIdentifier) throw new Error('Could not extract graph id from endpoint URL');
}

Type guard

const isRawGraphId = (s: string): boolean =>
  /^(neptune-graph:\/\/)?g-[a-z0-9]+$/i.test(s);

Try / catch

try { store = new NeptuneAnalytics(config); }
catch (e) {
  if (e instanceof Error && e.message.includes('HTTPS endpoints require graphIdentifier')) {
    const id = config.endpoint.match(/(g-[a-z0-9]+)/i)?.[1];
    if (id) store = new NeptuneAnalytics({ ...config, graphIdentifier: id, endpoint: undefined });
    else throw e;
  } else throw e;
}

Prevention

When it happens

Trigger: config: { endpoint: 'https://g-1234abcd.us-east-1.neptune-graph.amazonaws.com' }; copying the console's endpoint URL from the Neptune Analytics graph details page into endpoint; reusing Neptune Database host:port-style config from an older setup.

Common situations: AWS console copy-paste; migrating from neptune-db (Gremlin/SPARQL endpoint at :8182) to Neptune Analytics; config templating that always emits full URLs.

Related errors


AI-assisted analysis of mem0ai/mem0@001c235229 (2026-08-15). Data as JSON: /api/errors/05fb61d493a46eaf. Report an issue: GitHub.