{"record":{"id":"284474c02396f5d7","repo":"mem0ai/mem0","slug":"please-provide-endpoint-with-the-format-as-nept","errorCode":null,"errorMessage":"Please provide 'endpoint' with the format as 'neptune-graph://<graphid>'.","messagePattern":"Please provide 'endpoint' with the format as 'neptune-graph://<graphid>'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"mem0/vector_stores/neptune_analytics.py","lineNumber":75,"sourceCode":"    def __init__(\n        self,\n        endpoint: str,\n        collection_name: str,\n    ):\n        \"\"\"\n        Initialize the Neptune Analytics vector store.\n\n        Args:\n            endpoint (str): Neptune Analytics endpoint in format 'neptune-graph://<graphid>'.\n            collection_name (str): Name of the collection to store vectors.\n            \n        Raises:\n            ValueError: If endpoint format is invalid.\n            ImportError: If langchain_aws is not installed.\n        \"\"\"\n\n        if not endpoint.startswith(\"neptune-graph://\"):\n            raise ValueError(\"Please provide 'endpoint' with the format as 'neptune-graph://<graphid>'.\")\n\n        if not _VALID_IDENTIFIER.match(collection_name):\n            raise ValueError(\n                f\"Invalid collection_name: {collection_name!r}. Must start with a letter or underscore and \"\n                \"contain only letters, digits, and underscores.\"\n            )\n\n        graph_id = endpoint.replace(\"neptune-graph://\", \"\")\n        self.graph = NeptuneAnalyticsGraph(graph_id)\n        self.collection_name = self._COLLECTION_PREFIX + collection_name\n\n    \n    def create_col(self, name, vector_size, distance):\n        \"\"\"\n        Create a collection (no-op for Neptune Analytics).\n        \n        Neptune Analytics supports dynamic indices that are created implicitly\n        when vectors are inserted, so this method performs no operation.","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0/vector_stores/neptune_analytics.py#L57-L93","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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>"],"exampleFix":"# before\nvector_store={\"provider\":\"neptune_analytics\",\"config\":{\"endpoint\":\"https://g-1234.neptune.amazonaws.com\"}}\n\n# after\nvector_store={\"provider\":\"neptune_analytics\",\"config\":{\"endpoint\":\"neptune-graph://g-1234\"}}","handlingStrategy":"validation","validationCode":"def valid_neptune_endpoint(ep: str) -> bool:\n    return isinstance(ep, str) and ep.startswith(\"neptune-graph://\") and len(ep.split(\"//\", 1)[1]) > 0\n\nif not valid_neptune_endpoint(config[\"endpoint\"]):\n    config[\"endpoint\"] = \"neptune-graph://\" + config[\"endpoint\"].rsplit(\"/\", 1)[-1]","typeGuard":"def is_neptune_graph_endpoint(ep) -> bool:\n    return isinstance(ep, str) and ep.startswith(\"neptune-graph://\") and re.match(r\"^g-[a-z0-9]+$\", ep.split(\"//\",1)[1]) is not None","tryCatchPattern":"try:\n    store = NeptuneAnalytics(...)  # constructor validates\nexcept ValueError as e:\n    if \"neptune-graph://\" in str(e):\n        raise ConfigError(\"switch to the neptune-graph:// endpoint from the Analytics graph page\")\n    raise","preventionTips":["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"],"tags":["neptune","aws","configuration","endpoint"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}