Skip to content

Overview

AI Intern is an account-owned coding workspace built around a Cloudflare Worker, durable agents, and a Sandbox container running OpenCode. The deployed resources are declared in wrangler.jsonc; the runtime flow is implemented in src/agents/orchestrator.ts and src/runtime.ts.

Account-Owned Autonomous Engineering

Delegate bounded GitHub coding tasks to isolated Cloudflare micro-containers with human approval gates and secret-masking egress proxies.

STEP 01
Task Submission

Describe task with repo URL and target branch via dashboard or Slack.

STEP 02
Plan Synthesis

Orchestrator generates bounded diff and shell commands using Workers AI.

STEP 03
Human Sign-off

Inspect planned commands; approve or reject on Slack or Dashboard.

STEP 04
Sandbox Execution

gVisor microVM clones repo, edits files, and runs test suites.

STEP 05
Diff & PR Review

Review live syntax-highlighted diff; publish optional GitHub PR.

The delegation tool sets needsApproval: true. Its input contains repoUrl, task, baseBranch (default main), and publishPullRequest (default false). These are source contracts, not a guarantee that every generated change is correct. Source: src/agents/orchestrator.ts, delegateInputSchema and getTools.

The sandbox runtime returns a summary, changed paths, a unified diff, captured file contents, an exit code, and a bounded stderr tail. New files are added with Git intent-to-add before the diff is collected. Source: src/runtime.ts, runCodingTask and collectChanges.

The retained run registry is smaller: it contains status, task metadata, timestamps, and optional summary or error. Files and diffs belong to the transcript, not the registry response. See Dashboard. Source: src/runs.ts, DelegatedRun; src/transcript.ts.

Treat one installation as single-tenant and account-owned. Cloudflare Access or equivalent authentication is required before exposing it to a team or the public internet. An obscure Worker URL is not access control. This is the deployment requirement in spec/GOAL.md, not authentication implemented by src/index.ts. Read Security first.

Sandbox is the working runtime adapter. The computer adapter deliberately refuses execution. OpenCode is configured with a dummy container key; the real provider credential is swapped in at Sandbox egress. There is no public provider callback. Private Git clone still uses HTTPS without a clone-time token; path-scoped GITHUB_TOKEN is attached only for the approved repo. Sources: src/runtime.ts, src/egress.ts, src/agents/opencode-agent.ts.

spec/GOAL.md additionally calls for Sandbox HTTPS interception for provider and Git transport traffic, plus retained-registry gating of child routes. Those are not guarantees of the current implementation. The distinctions are explained in Architecture and GitHub.

Start with Getting started, then set the Configuration. Use Local development before Deployment.