Skip to main content

TaskSpec

TaskSpec is AgentGate’s declarative configuration format, inspired by Kubernetes resource definitions. It provides a structured way to specify everything needed to execute a coding task: the goal, how to reach it, where to run, and how to deliver results.

What Is TaskSpec

TaskSpec replaces the legacy HarnessConfig with a more intuitive, Kubernetes-style resource definition. Instead of scattered configuration across multiple objects, TaskSpec consolidates everything into a single, versioned document. A TaskSpec contains four main sections:

TaskSpec Structure

Every TaskSpec follows this structure:

Metadata

The metadata section identifies and organizes your TaskSpec:
Use labels for filtering and organization. Common labels include priority, type, team, and environment.

Goal Specification

The goal section defines what you want AgentGate to accomplish:

Goal Fields

Desired State Options

Convergence Specification

The convergence section controls how AgentGate iterates toward the goal:
See the Convergence guide for detailed strategy options and the Gates guide for gate configuration.

Execution Specification

The execution section defines where and how to run the agent:
See the Execution guide for workspace types and sandbox configuration.

Delivery Specification

The delivery section controls how results are shipped:
See the Delivery guide for Git modes and notification options.

Complete Examples

Minimal TaskSpec

The simplest valid TaskSpec:
A comprehensive example with all options:

Using TaskSpec

Via API

Submit a TaskSpec when creating a work order:

Via Profiles

Save reusable TaskSpecs as profiles:

Default Values

When fields are omitted, these defaults are applied:

Validation

TaskSpecs are validated using Zod schemas. Common validation errors:

Convergence

Learn about convergence strategies and iteration control

Gates

Configure verification gates for quality control

Agents

Choose and configure AI agent drivers

Execution

Configure workspace and sandbox environments