feat: add Tenki Cloud compute provider#1
Conversation
Add Tenki Cloud (https://tenki.cloud) as a compute provider for managed agents, alongside E2B, Daytona, Modal, Fly.io, Docker and local. - TenkiCompute implements ComputeProviderProtocol (provision / execute / shutdown / get_status / upload_file / download_file / list_instances), running tools in disposable Tenki microVMs. Sync SDK wrapped via run_in_executor, matching the existing providers. - Registered as "tenki" in the compute barrel, the _resolve_compute factory, and the compute-provider hint sets. - Uses only stable Tenki features (exec + file I/O). Default stock image installs pip packages on demand; set metadata["tenki_image"] for a custom image. Auto-resolves workspace/project from the API key. - Enabled via TENKI_API_KEY; optional `tenki` extra (tenki-sandbox). - Unit + live (skipped-by-default) tests mirroring the E2B/Daytona suites.
|
cc @camcalaquian — opened in my fork per your note (holding upstream for your review gate). Adds Tenki as a 7th compute provider alongside E2B/Daytona/Modal/Fly.io/Docker/local (both E2B & Daytona already in-tree, per the 'prioritize competitor-integrated repos' steer). Stable features only (exec + file I/O), no volume/snapshot. Validated live vs real Tenki: provision + pandas pip-install + exec + file round-trip + clean teardown. |
camcalaquian
left a comment
There was a problem hiding this comment.
overall lgtm. once the version is updated let's work on getting this to upstream
| # Install via: pip install git+https://github.com/daytonaio/daytona-python | ||
| ] | ||
| tenki = [ | ||
| "tenki-sandbox>=0.3", |
There was a problem hiding this comment.
Done in 9354602 — bumped to tenki-sandbox>=0.3.6. Ready for the upstream step whenever you are.
|
@rishijoshi sorry there was another release of sdk yesterday, let's update to that and submit this PR to upstream. |
|
@camcalaquian thanks! Quick check before I bump — PyPI's latest Could you point me at the new version (or where it's published)? As soon as it's on PyPI I'll bump |
|
seems the updated sdk wasn't posted immediately, you should see the updated sdk now on pypi |
|
0.4.0 landed on PyPI (2026-07-17) — bumped to |
…eanup) The maintainer's review bot flagged these but couldn't push to a fork, so applying directly: - Raise on a configured-but-unknown TENKI_WORKSPACE_ID/PROJECT_ID instead of silently using the first workspace/project (wrong-workspace billing). - shlex.quote every pip/npm spec (command-injection hardening). - Honour a non-default ComputeConfig.image, not just metadata["tenki_image"]. - Respect ComputeConfig.networking (restricted -> allow_outbound=False). - Fail provisioning and tear down the sandbox when package install fails (no false RUNNING / leaked sandbox). - Terminate before dropping the handle in shutdown, so a failed terminate keeps the sandbox tracked for retry instead of silently leaking it.
What & why
PraisonAI already ships compute providers for E2B, Daytona, Modal, Fly.io, Docker and local (one file per vendor in
integrations/compute/). This adds Tenki Cloud as another option — disposable Linux microVMs — so managed-agent tools can run in Tenki sandboxes.What it does
TenkiComputeimplements the fullComputeProviderProtocol(provision/execute/shutdown/get_status/upload_file/download_file/list_instances), running tools in ephemeral Tenki microVMs. Sync SDK wrapped inrun_in_executor, exactly likeDaytonaCompute/E2BCompute."tenki"in the compute barrel (__init__.py), the_resolve_computefactory (managed_local.py), and the provider hint sets (managed_agents.py,hosted_agent.py).TENKI_API_KEY; optionaltenkiextra (tenki-sandbox). Auto-resolves workspace/project from the key.Feature scope
Uses only stable Tenki features — ephemeral
exec+ file I/O (base64 over exec). No volume/snapshot/template. The default stock image shipspython3; pip packages are installed on demand (config.packages). Setconfig.metadata["tenki_image"]to use a prebaked image instead.Testing
provider_name,is_available, protocol methods, nonexistent-instance handling, and the barrel export — mirroring the E2B/Daytona suites intest_cloud_compute.py.TENKI_API_KEYis set): provision → execute → file upload/download → shutdown, plus pip-install.