Skip to main content

Action Blocks

An action block is a reusable, parameterized sequence of steps an agent can invoke by name.

Use action blocks for deterministic procedures. If the sequence needs open-ended reasoning, use a skill or subagent instead.

In This Section

When action blocks are the right shape

  • Procedural work with a fixed shape and varying parameters.
  • Team-standardized operations that should execute identically.
  • Compliance-bearing sequences where the order matters.
  • Common operational routines currently living in shell scripts or CI jobs.

Consuming from an agent

async run(ctx, input) {
return ctx.blocks.run("deploy-to-staging", { branch: input.branch });
}

Action block vs. skill vs. flow

ConcernAction BlockSkillFlow
BranchingStatic conditionsArbitrary logicArbitrary
LLM involvementNone by defaultMaybeOften
ScopeInside one agent runInside one agent runTop-level orchestration

If the sequence is deterministic, use an action block. If it needs reasoning, use a skill. If it is orchestration across multiple agents or nodes, use a flow.

See also