Forgecroft supports two execution modes for running plans and applies.
Managed Execution
Default mode. Forgecroft runs your IaC tool in its own secure, isolated environment.
How it works
- You trigger a plan (manually or via webhook)
- Forgecroft queues the run
- A job spawner picks up the run and creates a Kubernetes Job
- The Job runs in a gVisor sandbox with no service account token
- Results are reported back and the Job is cleaned up
When to use
- Getting started — quickest path to first plan
- Standard cloud providers (AWS, GCP, Cloudflare)
- No special network requirements
- You don’t need to control the execution environment
Agent Execution
Runs are claimed by a Forgecroft Agent running in your own environment.
How it works
- You trigger a plan on an agent-mode workspace
- The run is queued with
execution_target: "agent" - Your agent polls
GET /agent/runs/nextand claims the next queued run - The agent receives all configuration (credentials, state backend, VCS token) in the response
- The agent executes the run and reports results back via runner callbacks
When to use
- Runs must execute inside your VPC or private network
- You need access to internal resources (databases, private registries)
- Compliance requires execution in your own environment
- You need custom egress or proxy configuration
Switching Modes
Switch a workspace between modes:
PATCH /workspaces/{id}
{ "execution_target": "agent" }
This field is admin-only. Existing runs are not affected — only new runs use the new mode.
Comparison
| Aspect | Managed | Agent |
|---|---|---|
| Execution environment | Forgecroft’s secure infrastructure | Your environment |
| Network access | Internet only | Your full network |
| Setup | Zero configuration | Install and configure agent |
| Credentials | Forgecroft injects them | Agent receives them in API response |
| State access | Forgecroft manages it | Agent accesses it directly |
| Best for | Standard setups | Custom network requirements |
Related
- Agent Getting Started — Set up the Forgecroft Agent
- Creating Workspaces — Configure
execution_target