Cloud Execution Guide
Run AI agents on cloud VMs to explore repositories, suggest tasks, and implement code changes with automatic pull request creation
Last updated: February 2026
Overview
Cloud Execution lets you run AI agents on cloud VMs that interact directly with your GitHub repositories. Instead of copying code into chat windows, the AI agent clones your repo, reads the codebase, and works with the actual files—just like a developer would.
There are two modes, each designed for a different stage of your workflow:
Prerequisites
Cloud Execution uses a Bring Your Own Key (BYOK) model. You provide an API key for the cloud VM provider (Sprites) and connect your OpenRouter account for AI models. Workunit orchestrates the execution, giving you full control over costs and model selection.
Sprites.dev Account
Sprites.dev provides the cloud VMs where AI agents run. Each execution spins up an isolated container with your repository cloned and ready to work.
- Visit sprites.dev and create an account
- Navigate to your account settings and generate an API token
- Copy the token — you'll paste it into Workunit's API key settings
OpenRouter Account
OpenRouter provides access to AI models (Claude, GPT, Gemini, and more) through a unified API. You connect your OpenRouter account to Workunit through a secure OAuth flow, and the AI agent uses your account to call the model you select.
- Visit openrouter.ai and create an account
- Add credits to your account (pay-as-you-go)
GitHub App
The Workunit GitHub App connects your repositories to the platform. Implement mode needs it to push branches and create pull requests. Explore mode needs it to access private repositories.
Setting Up Connections
Connections are configured per-organization in your organization settings. All team members with access to the organization can use the configured connections for cloud execution.
Sprites API Key
- Navigate to API Keys: Go to Organization Settings and select the API Keys tab
- Paste your Sprites API token into the Sprites field
- Click "Test Connection" to verify the key works — you'll see a green checkmark on success
- Save your settings
OpenRouter Connection
OpenRouter uses a secure OAuth flow to connect your account. No API keys to copy or paste.
- Navigate to API Keys: Go to Organization Settings and select the API Keys tab
- Click "Connect OpenRouter" on the OpenRouter card
- Authorize on OpenRouter: You'll be redirected to OpenRouter where you approve the connection
- Return to Workunit: After authorizing, you're redirected back and the connection is established
Connecting GitHub
Install the Workunit GitHub App on your repositories to enable Implement mode (push branches and create pull requests) and Explore mode on private repositories.
Installing the App
- Go to Organization Settings: Navigate to Organization Settings and select the GitHub tab
- Click "Install GitHub App" — this opens GitHub's authorization page
- Select which repositories to grant access to (you can choose all or select specific repos)
- Click "Install" on GitHub to authorize the app
- You'll be redirected back to Workunit with a confirmation showing the connected repositories
Permissions & Security
- • Repository contents: Read and write access to push feature branches
- • Pull requests: Create and manage pull requests for code changes
- • Metadata: Read repository metadata (name, description, default branch)
- Installation tokens only: Workunit uses short-lived GitHub installation tokens, never long-lived credentials
- Tokens are never stored: Installation tokens are generated on-demand and expire within one hour
- Scoped access: The app only accesses repositories you explicitly authorize
- Revocable: You can uninstall the app from GitHub settings at any time
Explore Mode
Explore mode sends an AI agent to analyze your repository and suggest tasks based on your workunit's problem statement. The agent reads your codebase, understands the architecture, and proposes specific changes with file references.
Step-by-Step Walkthrough
https://github.com/your-org/your-repo). You can also specify a branch.Reviewing Results
The Explore agent returns structured task suggestions. Each suggestion includes:
- • Task title: A clear, actionable description of the change
- • Description: Detailed explanation of what needs to be done and why
- • File references: Specific files and code locations the task affects
- • Reasoning: Why the AI suggests this task based on the problem statement
- • Effort estimate: Approximate complexity and time to implement
Implement Mode
Implement mode takes your workunit tasks and executes them against your repository. The AI agent writes code, runs tests, pushes a feature branch, and creates a pull request for your review.
Step-by-Step Walkthrough
Creating a Pull Request
After reviewing the implementation results, you can create a pull request directly from Workunit:
- • Diff summary: Overview of all changed files with additions and deletions
- • Test results: Whether the agent ran tests and if they passed
- • Branch name: The feature branch the agent created
- • PR description: Auto-generated description linking back to your workunit
- • Review the diff summary and test results
- • Click "Create Pull Request" to push the branch and open the PR on GitHub
- • The PR links back to your workunit for full traceability
- • Review, request changes, or merge the PR through your normal GitHub workflow
Security & Encryption
Your credentials (API keys and OAuth tokens) are sensitive. Workunit uses multiple layers of encryption and security controls to protect them.
How We Protect Your Credentials
Technical Details
- A Data Encryption Key (DEK) is generated per organization using a cryptographically secure random number generator
- The DEK encrypts your credentials (API keys and OAuth tokens) using AES-256-GCM (authenticated encryption)
- The DEK itself is encrypted by a Key Encryption Key (KEK) managed in Scaleway KMS
- Only the encrypted DEK and encrypted credentials are stored in the database
- • Algorithm: AES-256-GCM (256-bit key, 128-bit authentication tag)
- • Nonce: 96-bit, cryptographically random, unique per encryption operation
- • Key derivation: Scaleway KMS with hardware-backed key storage
- • Key rotation: KEK rotation supported without re-encrypting all data
- • Even if the database is compromised, credentials cannot be decrypted without access to Scaleway KMS
- • Each organization's data requires a separate KMS call to decrypt, preventing bulk exposure
- • The GCM authentication tag ensures encrypted data hasn't been tampered with
Cost & Usage
Cloud Execution uses a Bring Your Own Key (BYOK) model. You pay the providers directly for what you use. Workunit does not charge extra for cloud execution.
- • Explore session: 2–5 minutes → a few cents
- • Implement session: 5–15 minutes → varies by complexity
Troubleshooting
Common issues and how to resolve them:
Fix: Regenerate your Sprites key and paste the new key in Organization Settings. If the issue is with OpenRouter, disconnect and reconnect your account through the OAuth flow.
Fix: Verify the URL. For private repos in Implement mode, ensure the GitHub App is installed on that repository.
Fix: Try again with a faster, lighter model. For very large repos, try a more specific problem statement to narrow the scope.
Fix: Make your problem statement more specific. Instead of "improve the app," try "add input validation to the user registration form in src/auth."
Fix: Review the test output in the results panel. You can still create the PR and fix the failing tests manually, or run Implement again with more specific task descriptions.
Fix: Go to Organization Settings > GitHub tab and install the app. See Connecting GitHub above.
Next Steps
Ready to use Cloud Execution? Here's where to go next:
AI Features Guide
Learn about multi-LLM collaboration and saving context
Best Practices
Tips for writing effective problem statements and managing tasks
Workunit Workflows
Master the workunit lifecycle and common workflow patterns
Organization Settings
Configure connections and GitHub App for your organization
Questions About Cloud Execution?
We're here to help you get the most out of AI-powered code exploration and implementation.