Description
CodeAct currently has two backends, both in-process and local: agent-framework-hyperlight (WASM micro-VM) and agent-framework-monty (Rust Python interpreter). Both are excellent for fast, low-overhead code execution with host tool callbacks — but by design neither offers a real operating system: no apt/pip installs, no subprocesses or CLIs, no persistent filesystem, and the code ultimately executes on the host machine.
Agents that need a real computer — install packages, run shell commands, build projects, keep files across steps — currently have no CodeAct story.
Proposal: add agent-framework-tenki, wrapping Tenki Sandbox (managed Linux micro-VMs with a Python SDK) behind the same *CodeActProvider / *ExecuteCodeTool shape as the existing backends, so users can swap backends with minimal churn. Each sandbox is a remote, isolated, finite environment: code never touches the host, and server-side lifetime caps (max_duration, pause-snapshot retention) bound cost even if the client process crashes.
Why another backend next to Hyperlight/Monty:
|
Hyperlight |
Monty |
Tenki |
| Execution |
WASM micro-VM, in-process |
Rust interpreter, in-process |
remote managed Linux micro-VM |
| Code runs on host machine |
yes (sandboxed) |
yes (sandboxed) |
no — fully remote |
pip / apt installs |
no |
no |
yes, persist across calls |
| Subprocesses / CLIs |
no |
no |
yes |
| Real filesystem (persists across calls) |
file mounts only |
file mounts only |
yes |
| Host tool callbacks |
yes |
yes |
no (SDK has no bridge) |
| Platform limits |
linux/x86_64, win/AMD64, py<3.14 |
cross-platform |
any (remote service; needs network) |
Additionally: seeding sandboxes from prepared snapshots. Snapshots and volumes are created and managed with the Tenki CLI/SDK, never by this package — e.g. provision a sandbox, install your toolchain, snapshot it. Agent sandboxes can then be seeded from that prepared state:
execute_code = TenkiExecuteCodeTool(
extra_create_kwargs={"snapshot_id": "<your-snapshot-id>"},
)
The same passthrough works for persistent Tenki volumes, and with TenkiCodeActProvider — each run's fresh sandbox starts from the same prepared snapshot.
Note: Tenki is a managed service — using this backend requires a Tenki account and API key (TENKI_API_KEY), and sandbox usage is billed.
Code Sample
from agent_framework import Agent
from agent_framework_tenki import TenkiCodeActProvider
async with TenkiCodeActProvider() as codeact:
agent = Agent(client=client, context_providers=[codeact])
result = await agent.run(
"Install polars, then compute the mean of column 'x' in /tmp/data.csv."
)
Each agent run gets a fresh sandbox, terminated when the run completes.
Language/SDK
Python
Description
CodeAct currently has two backends, both in-process and local:
agent-framework-hyperlight(WASM micro-VM) andagent-framework-monty(Rust Python interpreter). Both are excellent for fast, low-overhead code execution with host tool callbacks — but by design neither offers a real operating system: noapt/pipinstalls, no subprocesses or CLIs, no persistent filesystem, and the code ultimately executes on the host machine.Agents that need a real computer — install packages, run shell commands, build projects, keep files across steps — currently have no CodeAct story.
Proposal: add
agent-framework-tenki, wrapping Tenki Sandbox (managed Linux micro-VMs with a Python SDK) behind the same*CodeActProvider/*ExecuteCodeToolshape as the existing backends, so users can swap backends with minimal churn. Each sandbox is a remote, isolated, finite environment: code never touches the host, and server-side lifetime caps (max_duration, pause-snapshot retention) bound cost even if the client process crashes.Why another backend next to Hyperlight/Monty:
pip/aptinstallsAdditionally: seeding sandboxes from prepared snapshots. Snapshots and volumes are created and managed with the Tenki CLI/SDK, never by this package — e.g. provision a sandbox, install your toolchain, snapshot it. Agent sandboxes can then be seeded from that prepared state:
The same passthrough works for persistent Tenki volumes, and with
TenkiCodeActProvider— each run's fresh sandbox starts from the same prepared snapshot.Code Sample
Each agent run gets a fresh sandbox, terminated when the run completes.
Language/SDK
Python