Forgecroft Docs
Guides / Workspaces

Execution Modes

Choose between managed execution (Forgecroft runs it) and agent execution (runs in your environment).

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

  1. You trigger a plan (manually or via webhook)
  2. Forgecroft queues the run
  3. A job spawner picks up the run and creates a Kubernetes Job
  4. The Job runs in a gVisor sandbox with no service account token
  5. Results are reported back and the Job is cleaned up

When to use

Agent Execution

Runs are claimed by a Forgecroft Agent running in your own environment.

How it works

  1. You trigger a plan on an agent-mode workspace
  2. The run is queued with execution_target: "agent"
  3. Your agent polls GET /agent/runs/next and claims the next queued run
  4. The agent receives all configuration (credentials, state backend, VCS token) in the response
  5. The agent executes the run and reports results back via runner callbacks

When to use

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

AspectManagedAgent
Execution environmentForgecroft’s secure infrastructureYour environment
Network accessInternet onlyYour full network
SetupZero configurationInstall and configure agent
CredentialsForgecroft injects themAgent receives them in API response
State accessForgecroft manages itAgent accesses it directly
Best forStandard setupsCustom network requirements