mem0ai/mem0 · error · ValueError
Please provide 'endpoint' with the format as 'neptune-graph:
Error message
Please provide 'endpoint' with the format as 'neptune-graph://<graphid>'.
What it means
The Neptune Analytics backend constructor requires the endpoint string to start with "neptune-graph://" because it strips that prefix to obtain the graph ID passed to NeptuneAnalyticsGraph. Any other scheme (https://, neptune-db://, bare graph ID) fails this check before any AWS client is created.
Source
Thrown at mem0/vector_stores/neptune_analytics.py:75
def __init__(
self,
endpoint: str,
collection_name: str,
):
"""
Initialize the Neptune Analytics vector store.
Args:
endpoint (str): Neptune Analytics endpoint in format 'neptune-graph://<graphid>'.
collection_name (str): Name of the collection to store vectors.
Raises:
ValueError: If endpoint format is invalid.
ImportError: If langchain_aws is not installed.
"""
if not endpoint.startswith("neptune-graph://"):
raise ValueError("Please provide 'endpoint' with the format as 'neptune-graph://<graphid>'.")
if not _VALID_IDENTIFIER.match(collection_name):
raise ValueError(
f"Invalid collection_name: {collection_name!r}. Must start with a letter or underscore and "
"contain only letters, digits, and underscores."
)
graph_id = endpoint.replace("neptune-graph://", "")
self.graph = NeptuneAnalyticsGraph(graph_id)
self.collection_name = self._COLLECTION_PREFIX + collection_name
def create_col(self, name, vector_size, distance):
"""
Create a collection (no-op for Neptune Analytics).
Neptune Analytics supports dynamic indices that are created implicitly
when vectors are inserted, so this method performs no operation.View on GitHub (pinned to 001c235229)
Solutions
- Use the Analytics graph endpoint exactly: neptune-graph://<graph-id> where graph-id looks like g-xxxxx
- If you actually have a Neptune Database cluster, switch to the neptune backend/config that targets it, not neptune_analytics
- Confirm the graph ID exists with: aws neptune-graph get-graph --graph-identifier <id>
Example fix
# before
vector_store={"provider":"neptune_analytics","config":{"endpoint":"https://g-1234.neptune.amazonaws.com"}}
# after
vector_store={"provider":"neptune_analytics","config":{"endpoint":"neptune-graph://g-1234"}} Defensive patterns
Strategy: validation
Validate before calling
def valid_neptune_endpoint(ep: str) -> bool:
return isinstance(ep, str) and ep.startswith("neptune-graph://") and len(ep.split("//", 1)[1]) > 0
if not valid_neptune_endpoint(config["endpoint"]):
config["endpoint"] = "neptune-graph://" + config["endpoint"].rsplit("/", 1)[-1] Type guard
def is_neptune_graph_endpoint(ep) -> bool:
return isinstance(ep, str) and ep.startswith("neptune-graph://") and re.match(r"^g-[a-z0-9]+$", ep.split("//",1)[1]) is not None Try / catch
try:
store = NeptuneAnalytics(...) # constructor validates
except ValueError as e:
if "neptune-graph://" in str(e):
raise ConfigError("switch to the neptune-graph:// endpoint from the Analytics graph page")
raise Prevention
- Copy the endpoint from the Neptune Analytics 'Graphs' console page, not the cluster page
- Add a config lint step that validates provider-specific endpoint formats
- Remember Neptune Database and Neptune Analytics need different providers
When it happens
Trigger: Passing the Neptune data (Gremlin/SPARQL) endpoint like neptune-db://cluster-xyz or an https endpoint; passing the bare graph identifier g-1234 without the scheme; a trailing-slash or uppercase NEPTUNE-GRAPH:// variant (startswith is case-sensitive).
Common situations: Copying the endpoint from the AWS console's cluster (not graph) page; confusing Neptune Database with Neptune Analytics; config generated by tooling that normalizes URLs to https.
Related errors
- Neptune Analytics HTTPS endpoints require graphIdentifier; p
- Invalid collection_name: {collection_name!r}. Must start wit
- Neptune Analytics vector store requires graphIdentifier or e
- ${key} filter value must be an array.
- $not filter value must be an array.
AI-assisted analysis of mem0ai/mem0@001c235229 (2026-08-15).
Data as JSON: /api/errors/284474c02396f5d7.
Report an issue: GitHub.