{"record":{"id":"187395e7c0dd0e24","repo":"infiniflow/ragflow","slug":"e2b-provider-is-not-yet-fully-implemented-please","errorCode":null,"errorMessage":"E2B provider is not yet fully implemented. Please use the self-managed provider or implement the E2B API integration. See https://github.com/e2b-dev/e2b for API documentation.","messagePattern":"E2B provider is not yet fully implemented\\. Please use the self-managed provider or implement the E2B API integration\\. See https://github\\.com/e2b-dev/e2b for API documentation\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agent/sandbox/providers/e2b.py","lineNumber":126,"sourceCode":"            instance_id: ID of the sandbox instance\n            code: Source code to execute\n            language: Programming language (python, nodejs, go, bash)\n            timeout: Maximum execution time in seconds\n\n        Returns:\n            ExecutionResult containing stdout, stderr, exit_code, and metadata\n\n        Raises:\n            RuntimeError: If execution fails\n            TimeoutError: If execution exceeds timeout\n        \"\"\"\n        if not self._initialized:\n            raise RuntimeError(\"Provider not initialized. Call initialize() first.\")\n\n        # TODO: Implement actual E2B API call\n        # POST /sandbox/{sandboxID}/execute\n\n        raise RuntimeError(\n            \"E2B provider is not yet fully implemented. Please use the self-managed provider or implement the E2B API integration. See https://github.com/e2b-dev/e2b for API documentation.\"\n        )\n\n    def destroy_instance(self, instance_id: str) -> bool:\n        \"\"\"\n        Destroy an E2B instance.\n\n        Args:\n            instance_id: ID of the instance to destroy\n\n        Returns:\n            True if destruction successful, False otherwise\n        \"\"\"\n        if not self._initialized:\n            raise RuntimeError(\"Provider not initialized. Call initialize() first.\")\n\n        # TODO: Implement actual E2B API call\n        # DELETE /sandbox/{sandboxID}","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/agent/sandbox/providers/e2b.py#L108-L144","documentation":"Hard raise from the E2B provider stub: execute_code is not implemented (the file carries TODO comments for POST /sandbox and POST /sandbox/{id}/execute). create_instance returns a fake uuid and destroy returns True, but code execution can never succeed with this provider as shipped.","triggerScenarios":"Any execute_code call on E2BProvider after successful initialize() — the error is unconditional.","commonSituations":"Provider list advertises e2b as an option, so configuration selects it expecting parity with the local/Aliyun providers; integration tests exercising all configured providers hit this raise.","solutions":["Switch the sandbox provider configuration to a implemented one ('local' or self-managed docker executor).","Implement the E2B integration using the official e2b Python SDK and replace the TODO bodies.","Exclude the e2b provider from runtime selection until implemented."],"exampleFix":"# before\nSANDBOX_PROVIDER=e2b\n\n# after\nSANDBOX_PROVIDER=local","handlingStrategy":"fallback","validationCode":"if provider_name == \"e2b\":\n    logger.warning(\"e2b provider is a stub; falling back to local sandbox\")\n    provider_name = \"local\"","typeGuard":null,"tryCatchPattern":"try:\n    result = provider.execute_code(instance_id, code, \"python\")\nexcept RuntimeError as e:\n    if \"not yet fully implemented\" in str(e):\n        result = fallback_provider.execute_code(fb_instance_id, code, \"python\")\n    else:\n        raise","preventionTips":["Never configure the e2b stub for workloads that need execution.","Fail deployment or startup checks when a stub provider is selected.","If E2B is required, implement the integration or vendor a complete provider first."],"tags":["e2b","unimplemented","provider","stub"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}