Skip to content

Add high-level execute(code) helper for Python execution #1816

Closed as not planned

Description

@dhirajsb

Motivation

OpenShell already exposes lower-level execution paths, but common Python code execution should be available through a small, ergonomic helper. A high-level execute(code) API would make the Python SDK easier to use for agent and notebook-style workflows without changing the underlying protocol.

Proposed change

Add a Python SDK method similar to:

result = sandbox.execute("print('hello from OpenShell')")

The helper should wrap the existing exec_python / exec path where appropriate, preserve the lower-level APIs, and return the same execution result information callers can inspect today.

Acceptance criteria

  • Add a documented high-level execute(code: str, ...) helper to the Python SDK.
  • Preserve existing lower-level execution APIs without breaking changes.
  • Include unit tests for success, failure, timeout/error propagation, and result shape.
  • Add a README or docs example showing simple Python execution.

Notes

This should be SDK-only and should not require gateway/proto changes.

Activity

  1. dhirajsb commented on Aug 4, 2026

    @dhirajsb
    ContributorAuthor

    @NVIDIA/openshell-codeowners, could you please help with triage on this SDK request?

    Would a small high-level Python execute(code) helper be useful as part of the intended SDK surface? If so, may I update my existing focused implementation and submit it as a PR?

    If RFC-0008 (#1764), the public API stabilization work in #2565, the Jupyter example work in #2252/#2253, or another active SDK change already provides or supersedes this API, please point me to it and I will align or close this request.

  2. removed
    state:triage-neededOpened without agent diagnostics and needs triage
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions