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
- Extract the graph id from the URL (g-xxxxxxxx) and pass graphIdentifier: 'g-xxxxxxxx'.
- Or set endpoint: 'neptune-graph://g-xxxxxxxx'.
- 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
- Keep only the graph id (g-xxxx) in config/env, never the full HTTPS URL.
- Add a config lint test asserting endpoint doesn't start with http(s):// for neptune-analytics.
- Remember: Neptune Analytics is addressed by graph id; Neptune Database is the URL+port one.
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
- Neptune Analytics vector store requires graphIdentifier or e
- ${key} filter value must be an array.
- $not filter value must be an array.
- Extra fields not allowed: {', '.join(extra_fields)}. Please
- langchain_aws is not installed. Please install it using pip
AI-assisted analysis of mem0ai/mem0@001c235229 (2026-08-15).
Data as JSON: /api/errors/05fb61d493a46eaf.
Report an issue: GitHub.