Skip to main content

What is a Connector?

Your agent shouldn’t call GitHub directly. You want a middleman that (a) limits what the agent can do and (b) records what actually happened. That’s the Connector. A Connector is a pre-built class that wraps an external system. You create one, hand it to Enact, and Enact passes it to your workflow. You never call GitHub (or Postgres, or the filesystem) directly anymore — you call the connector. Think of it like handing a contractor a limited toolbox before you leave for work. The toolbox only contains the tools you specifically put in it. If the contractor hallucinates and decides to demolish a load-bearing wall — too bad, there’s no sledgehammer in the box.

Basic Usage

If the agent tries anything outside the allowlist:

Policies vs. allowed_actions

You might be thinking: “Don’t we already have Policies?” Yes — but they work differently.
  • Policies are your business rules: “You can push code, but not to the master branch.”
  • allowed_actions is your hardcoded floor: “This connector can only ever call these two methods. Full stop.”
Policies handle the scenarios you anticipated. allowed_actions caps the blast radius for everything else — even actions you never thought to write a policy for.

Available Connectors

Import Paths

WorkflowContext

The WorkflowContext is the “bag” that travels through the system — passed to every policy check and every workflow action.
Inside your workflow, you access connectors by key:

What Rollback Can and Can’t Undo