net8.0net9.0net10.0
Provides Hyperlight-backed CodeAct (sandboxed code execution) integration for Microsoft Agent Framework.
Published
Aug 4, 2026
2mo ago
Total Downloads
14.1K
14,127
Install
dotnet add package Microsoft.Agents.AI.Hyperlight --version 1.17.0-preview.260804.1
| Product | Versions |
|---|---|
| .NET |
README
Microsoft.Agents.AI.Hyperlight
First-class CodeAct support for the Microsoft Agent Framework, backed by the Hyperlight VM-isolated sandbox.
The package exposes two entry points:
HyperlightCodeActProvider— anAIContextProviderthat injects anexecute_codetool and CodeAct guidance into every agent invocation. Only oneHyperlightCodeActProvidermay be attached to a given agent; it enforces this through a fixedStateKeysvalue soChatClientAgent's state-key uniqueness validation rejects duplicate registrations.HyperlightExecuteCodeFunction— a standaloneAIFunctionfor static/manual wiring when the sandbox configuration is fixed for the agent's lifetime.
Both surfaces support:
- Provider-owned tools exposed inside the sandbox via
call_tool(...)(multiple allowed). - Opt-in filesystem mounts and outbound network allow-list.
CodeActApprovalModecontrol:NeverRequire(default; approval propagates from tools wrapped inApprovalRequiredAIFunction) andAlwaysRequire.- Snapshot/restore per run so the guest starts from a known clean state every invocation.
Requirements
- The
Hyperlight.HyperlightSandbox.ApiNuGet package, published from thesrc/sdk/dotnetSDK in hyperlight-dev/hyperlight-sandbox (the .NET API was added in PR #46, now merged). Until the package is published to nuget.org the project restore will fail; this project is intentionallyIsPackable=falsein the meantime. - A Hyperlight Python guest module when using
SandboxBackend.Wasm.
Status
Preview. API may change until the underlying Hyperlight SDK reaches a stable release.
Changes from Previous Version
No structural changes between v1.16.0-preview.260730.1 and v1.17.0-preview.260804.1.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.