Lambda is a Docker Sandbox agent kit based on the upstream Pi contrib kit. It
installs Pi with the pi.dev installer, exposes it as lambda, and includes
OpenAI Codex OAuth and OpenCode Go sandbox wiring.
- Agent kit metadata and entrypoint are named
lambda. - Installs Pi via
curl -fsSL https://pi.dev/install.sh | shlogic. - Adds a
/usr/local/bin/lambdashim that delegates to thepiCLI. - Exposes
OPENCODE_API_KEYas a proxy-managed variable. - Sets Codex-compatible environment variables (
BROWSER,CODEX_HOME) and declares the OpenAI credential discovery sources sbx expects for Codex OAuth mode. - Requests sbx OpenAI OAuth wiring so ChatGPT/Codex subscription auth is available when the host has
sbx secret set -g openai --oauth. - Creates Pi
openai-codexplaceholder OAuth auth on startup whenSBX_CRED_OPENAI_MODE=oauth, allowing Pi to send Codex requests through the sbx proxy without storing the real OAuth token in the sandbox. - Allows OpenAI Codex/ChatGPT traffic to
chatgpt.comfor the sbx OAuth proxy path. - Allows and authenticates OpenCode Go traffic to
opencode.ai. - Allows
pi.devfor the installer/update checks andregistry.npmjs.orgfor npm package downloads used by the Pi installer. - Adds agent memory instructing Lambda to run development commands locally in the sandbox, while running backing services such as PostgreSQL and Redis in Docker with ports exposed locally.
Store provider keys on the host as sandbox secrets:
# ChatGPT Plus/Pro Codex subscription via sbx OAuth proxy
sbx secret set -g openai --oauth
sbx secret set -g opencode-goFor OpenCode Go, you can also provide the key from your host shell for one-off runs:
export OPENCODE_API_KEY=...Kit install/startup changes are applied when the sandbox is created. If you
already have a lambda-* sandbox, remove it before testing kit changes:
sbx rm -f lambda-jobcardThen create/run it again:
sbx run --kit ./docker-sandbox/lambda lambdaInside the sandbox, start the agent with:
lambdaThe shim delegates to Pi, so Pi CLI options still work:
lambda --provider openai-codex --model gpt-5.4-mini
lambda --provider opencode-go