CubeSandbox icon indicating copy to clipboard operation
CubeSandbox copied to clipboard

feat(integration): add Pi Agent sandbox integration example (#698)

Open xyaohubery opened this issue 4 months ago • 2 comments

Summary

Add Pi Agent + CubeSandbox integration example following the same 'Sandbox as Tool' pattern as the Claude Code integration.

Contents

  • pi_agent_sandbox_demo.py: Bridge code using cubesandbox SDK to run AI-generated code in hardware-isolated MicroVMs
  • README.md: Architecture overview and quick start instructions

Pattern

Pi Agent runs locally (handling conversation and orchestration) and delegates code execution to CubeSandbox on demand via the Python SDK.

Fixes #698

Assisted-by: claude-code:deepseek-v4-pro

xyaohubery avatar Jul 07 '26 01:07 xyaohubery

Confirming: review was submitted.

Inline comments on mcp_server.py cover: TOCTOU race with _sandbox.kill() (L524), no-op signal handlers (L555), _sanitize_error URL scrubbing gap (L131), _sanitize_path absolute-path gap (L123), sandbox_pause unverified snapshot claim (L507), sandbox_get_info key leak (L473).

Full review body with all findings was posted above.

cubesandboxbot[bot] avatar Jul 07 '26 01:07 cubesandboxbot[bot]

Hello, thank you for your contribution! Since we have a large number of participants in this event, to speed up the PR review process, could you please attach some screenshots and logs (both are needed) showing the verification process and results for this PR? Thank you for your participation!

fslongjin avatar Jul 10 '26 07:07 fslongjin

A PR should be tested by the contributor themselves. Moreover, there is already an integration of piagent in the upstream repository, so this PR is unnecessary and redundant.

fslongjin avatar Jul 28 '26 08:07 fslongjin

Thanks @fslongjin for clarifying. I understand that contributors need to provide their own real-cluster verification and that an upstream Pi Agent integration already exists. CI and automated review alone did not meet the verification requirement. Thank you for reviewing the submission.

xyaohubery avatar Sep 17 '26 04:09 xyaohubery