{"record":{"id":"c0bce1468fedf0ba","repo":"run-llama/llama_index","slug":"from-documents-not-implemented-for-basemanagedinde","errorCode":null,"errorMessage":"from_documents not implemented for BaseManagedIndex.","messagePattern":"from_documents not implemented for BaseManagedIndex\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/indices/managed/base.py","lineNumber":96,"sourceCode":"        raise NotImplementedError(\"_delete_node not implemented for BaseManagedIndex.\")\n\n    @property\n    def ref_doc_info(self) -> Dict[str, RefDocInfo]:\n        \"\"\"Retrieve a dict mapping of ingested documents and their nodes+metadata.\"\"\"\n        raise NotImplementedError(\"ref_doc_info not implemented for BaseManagedIndex.\")\n\n    @classmethod\n    def from_documents(\n        cls: Type[IndexType],\n        documents: Sequence[Document],\n        storage_context: Optional[StorageContext] = None,\n        show_progress: bool = False,\n        callback_manager: Optional[CallbackManager] = None,\n        transformations: Optional[List[TransformComponent]] = None,\n        **kwargs: Any,\n    ) -> IndexType:\n        \"\"\"Build an index from a sequence of documents.\"\"\"\n        raise NotImplementedError(\n            \"from_documents not implemented for BaseManagedIndex.\"\n        )\n","sourceCodeStart":78,"sourceCodeEnd":99,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/indices/managed/base.py#L78-L99","documentation":"BaseManagedIndex overrides the from_documents classmethod with an explicit NotImplementedError: constructing from a local document sequence is intentionally unsupported because ingestion must go through the managed service's own flow (each integration provides its own constructor/from_documents variant at the subclass level, or a client-based ingest API).","triggerScenarios":"Calling SomeManagedIndex.from_documents(docs) where the subclass inherits the base implementation without overriding it; generic factory code that builds every index via BaseIndex.from_documents; new managed-index integrations that forgot to override the classmethod.","commonSituations":"See trigger scenarios.","solutions":["Use the concrete managed subclass's documented construction path — most provide their own from_documents or require initializing a service client first; consult that integration's docs.","If you control the subclass, override from_documents to push documents to the external service and return the index instance.","For local document ingestion, use VectorStoreIndex or SummaryIndex."],"exampleFix":"# before\nindex = MyManagedIndex.from_documents(docs)  # base stub raises\n\n# after\nclient = ManagedServiceClient(api_key=...)\nindex = MyManagedIndex(client=client)  # then ingest via the service API/client","handlingStrategy":"type-guard","validationCode":"from llama_index.core.indices.managed import BaseManagedIndex\n\nassert not (isinstance(IndexCls, type) and issubclass(IndexCls, BaseManagedIndex) and IndexCls.from_documents is BaseManagedIndex.from_documents), \\\n    \"this managed index does not override from_documents; use its service API\"","typeGuard":"from llama_index.core.indices.managed import BaseManagedIndex\n\ndef managed_from_documents_supported(cls: type) -> bool:\n    return not (issubclass(cls, BaseManagedIndex) and cls.from_documents is BaseManagedIndex.from_documents)","tryCatchPattern":"try:\n    index = MyManagedIndex.from_documents(docs)\nexcept NotImplementedError:\n    client = make_service_client()\n    index = MyManagedIndex(client=client)\n    client.ingest_documents(docs)","preventionTips":["Read the concrete integration's docs before using base-class constructors on managed indices.","If you author an integration, override from_documents to delegate to the service.","Keep a factory that maps index type to its supported construction path."],"tags":["llama-index","managed-index","not-implemented","from-documents"],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}