agent-framework-hyperlight
Hyperlight CodeAct integrations for Microsoft Agent Framework.
What it is and what it does
agent-framework-hyperlight provides CodeAct (code-act) integration for Microsoft Agent Framework, enabling agents to execute Python code inside an isolated Hyperlight sandbox. It wraps sandboxed execution as either a context provider that automatically injects the execute_code tool into agents, or as a standalone tool for mixed configurations. The sandbox isolates code execution from the host, and tools registered with the provider are available to the sandboxed code via call_tool() but not exposed as direct agent tools.
The package supports file mounts (mapping host directories into the sandbox), network access control (allowlisting specific domains and HTTP methods), and flexible tool approval modes. It depends on agent-framework-core, hyperlight-sandbox, and platform-specific backend packages. The package is intentionally separate from core so CodeAct remains optional; it can also be imported via the lazy-loading namespace agent_framework.hyperlight when the full framework is installed.
Use it for:
- Let an agent execute Python code to perform calculations, data transformations, or API calls while keeping the code isolated from the host system.
- Register domain-specific tools (e.g., compute, send_email) that agents can call directly or invoke from within sandboxed code execution.
- Mount host directories into the sandbox to give agents controlled read/write access to files without exposing the entire filesystem.
- Restrict outbound network access from sandboxed code to specific domains and HTTP methods for security compliance.
- Mix sandboxed tools (available only inside execute_code) with direct-only tools (available only to the agent) on the same agent.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates sandboxed code execution into Microsoft Agent Framework agents, allowing them to run Python code safely inside a Hyperlight sandbox with controlled tool access and network permissions.
Yes, if you are building agents with Microsoft Agent Framework and need safe, isolated code execution. The package is actively maintained, has low install friction, and carries no security vulnerabilities. The main gotcha is platform availability of the Wasm backend—verify it is published for your target platform before relying on it in production. Beta status (1.0.0b260730) means the API may still shift, but the recent release and active maintenance suggest it is reasonably stable.
Install
agent-framework-hyperlight on PyPI
pip
pip install agent-framework-hyperlightuv
uv add agent-framework-hyperlightpoetry
poetry add agent-framework-hyperlightInstalling agent-framework-hyperlight
Before you install
Low friction install with a pure-Python wheel. Active maintenance (released 15 days ago, last commit 2026-08-14) and permissive licensing. Depends on four runtime packages including hyperlight-sandbox and platform-specific backends; the Wasm backend may not be available for all platforms yet, which could cause runtime failures when creating sandboxes.
License in practice
Permissive license treatment means you can use this package in commercial and proprietary projects without copyleft obligations.
Quickstart
pip install agent-framework-hyperlight --pre
from agent_framework import Agent, tool
from agent_framework_hyperlight import HyperlightCodeActProvider
@tool
def compute(operation: str, a: float, b: float) -> float:
ops = {"add": a + b, "subtract": a - b, "multiply": a * b, "divide": a / b}
return ops[operation]
codeact = HyperlightCodeActProvider(tools=[compute], approval_mode="never_require")
agent = Agent(client=client, name="CodeActAgent", context_providers=[codeact])
Requires Python 3.10 or later. The Wasm backend for hyperlight-sandbox may not be published for your platform; if missing, execute_code will fail at runtime when attempting to create a sandbox.
Verify before relying
- Whether the Wasm backend is currently available for all major platforms (Linux, macOS, Windows).
- Performance characteristics and latency overhead of sandbox creation and code execution.
- Resource limits and constraints enforced within the sandbox environment.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — agent-framework-core, hyperlight-sandbox, hyperlight-sandbox-backend-wasm, hyperlight-sandbox-python-guest |
| Maintenance | actively maintained — 15 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 173,729/month — #10,300 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: agent_framework_hyperlight-1.0.0b260730-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
hyperlight-sandboxHyperlight-sandbox provides a Python API for…
permissive · top 15,000 on PyPI
hyperlight-sandbox-python-guestProvides a Python guest runtime for the…
permissive · top 15,000 on PyPI
hyperlight-sandbox-backend-wasmProvides a WebAssembly backend implementation…
permissive · top 15,000 on PyPI
agent-framework-github-copilotIntegrates GitHub Copilot's agentic…
permissive · top 15,000 on PyPI
agent-frameworkBuilds and orchestrates AI agents powered by…
permissive · top 5,000 on PyPI
agent-framework-coreBuild, orchestrate, and deploy AI agents and…
permissive · top 5,000 on PyPI
openai-agentsA framework for building multi-agent LLM…
permissive · top 1,000 on PyPI
agent-framework-azure-aiIntegrates Azure AI Foundry memory capabilities…
permissive · top 15,000 on PyPI
pydantic-ai-harnessPydantic AI Harness provides pre-built…
permissive · top 5,000 on PyPI
e2bE2B provides a Python SDK to create and control…
permissive · top 5,000 on PyPI