Skip to content

.NET: Python: Clarify package installation support for HyperlightCodeActProvider / MontyCodeActProvider #8607

Description

Hey!
Following up on #8599, where there was a question about whether the custom interpreters (HyperlightExecuteCodeTool / MontyExecuteCodeTool) can install additional Python packages and make external API calls, since the platform-managed interpreter doesn't support these use cases, I went through the code and documentation for both packages to understand what is currently possible. This is what I found:

Network access:
allowed_domains seems to handle this. It allows sandboxed code to make HTTP requests to specific external domains, so calling external APIs is supported.

Package installation:
This part was less clear to me.

  • Hyperlight: There is a module_path option that allows using a custom guest module (.wasm / .aot) instead of the default one. From what I understand, this could potentially allow packages to be included in a custom guest. However, I couldn't find documentation explaining how to actually build such a guest with additional Python packages. I also noticed that the .NET design documentation mentions the guest module build/distribution process as an open question, so I'm not sure if this is currently supported or still being worked on.

  • Monty: The README describes Monty as a Rust-based Python interpreter that supports only a subset of Python, along with a limited set of standard library modules. I couldn't find a way to install or use arbitrary third-party Python packages with it. Since it isn't running normal CPython, I'm assuming this may be a limitation of the interpreter itself, but I'd like to confirm this with the maintainers.

Also, I have some questions to maintainers:

  1. For Hyperlight, is there currently a supported way to build a custom guest module that includes additional Python packages? If so, is there a plan to document the process?
  2. For Monty, is there any supported way to use third-party Python packages, or is this currently not possible because of the subset interpreter?
  3. Could the documentation make it clearer that allowed_domains provides network access, but doesn't by itself provide a way to install additional Python packages?

I'm asking this because someone evaluating these custom interpreters for an agent that needs both external API access and additional Python packages could assume that both are supported together like me :)

Activity

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

    .NETUsage: [Issues, PRs], Target: .NetpythonUsage: [Issues, PRs], Target: PythontriageUsage: [Issues], Target: All issues that still need to be triaged

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions