infiniflow/ragflow · error · RuntimeError

E2B provider is not yet fully implemented. Please use the se

Error message

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.

What it means

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.

Source

Thrown at agent/sandbox/providers/e2b.py:126

            instance_id: ID of the sandbox instance
            code: Source code to execute
            language: Programming language (python, nodejs, go, bash)
            timeout: Maximum execution time in seconds

        Returns:
            ExecutionResult containing stdout, stderr, exit_code, and metadata

        Raises:
            RuntimeError: If execution fails
            TimeoutError: If execution exceeds timeout
        """
        if not self._initialized:
            raise RuntimeError("Provider not initialized. Call initialize() first.")

        # TODO: Implement actual E2B API call
        # POST /sandbox/{sandboxID}/execute

        raise RuntimeError(
            "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."
        )

    def destroy_instance(self, instance_id: str) -> bool:
        """
        Destroy an E2B instance.

        Args:
            instance_id: ID of the instance to destroy

        Returns:
            True if destruction successful, False otherwise
        """
        if not self._initialized:
            raise RuntimeError("Provider not initialized. Call initialize() first.")

        # TODO: Implement actual E2B API call
        # DELETE /sandbox/{sandboxID}

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Switch the sandbox provider configuration to a implemented one ('local' or self-managed docker executor).
  2. Implement the E2B integration using the official e2b Python SDK and replace the TODO bodies.
  3. Exclude the e2b provider from runtime selection until implemented.

Example fix

# before
SANDBOX_PROVIDER=e2b

# after
SANDBOX_PROVIDER=local
Defensive patterns

Strategy: fallback

Validate before calling

if provider_name == "e2b":
    logger.warning("e2b provider is a stub; falling back to local sandbox")
    provider_name = "local"

Try / catch

try:
    result = provider.execute_code(instance_id, code, "python")
except RuntimeError as e:
    if "not yet fully implemented" in str(e):
        result = fallback_provider.execute_code(fb_instance_id, code, "python")
    else:
        raise

Prevention

When it happens

Trigger: Any execute_code call on E2BProvider after successful initialize() — the error is unconditional.

Common situations: 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.

Related errors


AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15). Data as JSON: /api/errors/187395e7c0dd0e24. Report an issue: GitHub.