> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentium.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Recoverable execution graphs

> Versioned host catalogs, JSON DAG plans, root limits, recovery, and bounded planning.

Versioned host catalogs, JSON DAG plans, root limits, recovery, and bounded planning. Read the [recoverable execution graphs guide](/harness/execution-graphs) for examples, defaults, and behavior.

These declarations cover every public export in this category. Import from `@agentium/harness`. Types such as `ChatMessage`, `RunContext`, and `ExecutionServices` come from [`@agentium/core`](/api-reference/core). A `?` marks an optional field.

## ExecutionGraphResult

```typescript theme={null}
export interface ExecutionGraphResult {
    task: DurableTaskRecord;
    graph: DurableGraphState;
    output?: DurableJSON;
}
```

## ExecutionGraphRuntimeOptions

```typescript theme={null}
export interface ExecutionGraphRuntimeOptions {
    program: ExecutionGraphProgram;
    catalog: readonly GraphBinding[];
    harness: Omit<HarnessRuntimeConfig, "driver" | "tools">;
    limits?: ExecutionGraphLimits;
    store?: DurableTaskStore;
    requireDurable?: boolean;
    leaseMs?: number;
    pollMs?: number;
    onAdmission?: (event: RootExecutionEvent) => void;
}
```

## ExecutionGraphTaskOptions

```typescript theme={null}
export interface ExecutionGraphTaskOptions {
    id: string;
    identity: DurableIdentity;
    input: DurableJSON;
    deadline?: number;
    policyRevision?: number;
    grantRefs?: string[];
    maxAttempts?: number;
}
```

## ExecutionGraphRuntime

```typescript theme={null}
/** Recovery protocol over the existing local harness and Workflow scheduler.
 * Host binding versions attest schemas, callbacks, providers and effect policy. */
export declare class ExecutionGraphRuntime {
    readonly capabilities: {
        durable: boolean;
        recovery: "recorded-agent-decisions";
        globalAdmission: true;
        streamedPlans: true;
    };
    readonly store: DurableTaskStore;
    constructor(options: ExecutionGraphRuntimeOptions);
    create(input: ExecutionGraphTaskOptions): Promise<DurableTaskRecord>;
    inspect(key: DurableTaskKey): Promise<ExecutionGraphResult>;
    cancel(key: DurableTaskKey, reason?: string): Promise<DurableTaskRecord>;
    run(key: DurableTaskKey, workerId: string): Promise<ExecutionGraphResult>;
}
```

## ExecutionPlanValidationError

```typescript theme={null}
export declare class ExecutionPlanValidationError extends Error {
    readonly code = "execution_plan_invalid";
    constructor(message: string, options?: ErrorOptions);
}
```

## graphCatalogDescriptor

```typescript theme={null}
/** Serializable catalog identity excludes executable code and credentials; hosts version opaque behavior. */
export declare function graphCatalogDescriptor(catalog: readonly GraphBinding[], limits: PlanValidationLimits): DurableJSON[];
```

## graphCatalogDigest

```typescript theme={null}
export declare function graphCatalogDigest(catalog: readonly GraphBinding[], limits: PlanValidationLimits): string;
```

## validateExecutionPlan

```typescript theme={null}
/** Validate and copy a complete proposal without invoking models, effects, policy or guards. */
export declare function validateExecutionPlan(value: unknown, catalog: readonly GraphBinding[], limits: PlanValidationLimits, initialDepth?: number): ValidatedExecutionPlan;
```

## ExecutionGraphLimits

```typescript theme={null}
export interface ExecutionGraphLimits extends RootExecutionLimits {
    plan?: Partial<Omit<PlanValidationLimits, "durable">>;
}
```

## ExecutionGraphPlannerOptions

```typescript theme={null}
export interface ExecutionGraphPlannerOptions {
    provider: ModelProvider;
    hostInstructions: string;
    maxCorrections: number;
    maxOutputTokens: number;
    stream: PlanStreamLimits;
}
```

## ExecutionGraphProgram

```typescript theme={null}
/** A complete static proposal or an authorized planner; nested programs inherit the root catalog. */
export interface ExecutionGraphProgram {
    id: string;
    version: string;
    plan?: ExecutionPlan;
    planner?: ExecutionGraphPlannerOptions & {
        mode?: "complete" | "stream";
    };
}
```

## ExecutionPlan

```typescript theme={null}
export interface ExecutionPlan {
    schemaVersion: 1;
    revision: number;
    nodes: readonly ExecutionPlanNode[];
    maxConcurrency?: number;
    merge?: "error" | "declaration_order";
}
```

## ExecutionPlanNode

```typescript theme={null}
export interface ExecutionPlanNode {
    id: string;
    binding: string;
    version: string;
    args: Record<string, DurableJSON>;
    dependsOn?: readonly string[];
    inputsFrom?: readonly string[];
}
```

## GraphAgentBinding

```typescript theme={null}
export interface GraphAgentBinding extends GraphBindingBase {
    kind: "agent";
    agent: Agent;
    /** Explicit approved tool binding IDs, including any static Agent-local tools. */
    tools: readonly string[];
}
```

## GraphBinding

```typescript theme={null}
export type GraphBinding = GraphToolBinding | GraphAgentBinding | GraphNestedBinding | GraphRepeatBinding;
```

## GraphNestedBinding

```typescript theme={null}
export interface GraphNestedBinding extends GraphBindingBase {
    kind: "graph";
    program: ExecutionGraphProgram;
}
```

## GraphRepeatBinding

```typescript theme={null}
export interface GraphRepeatBinding extends GraphBindingBase {
    kind: "repeat";
    program: ExecutionGraphProgram;
    maxIterations: number;
    /** Pinned by binding version; evaluated decisions are persisted before child work. */
    while(output: DurableJSON, completedIterations: number): boolean;
}
```

## GraphToolBinding

```typescript theme={null}
export interface GraphToolBinding extends GraphBindingBase {
    kind: "tool";
    tool: ToolDef;
    /** Pure is a trusted host declaration of no external mutation. */
    recovery?: "pure" | {
        connector: DurableActionConnector;
        destination: string;
        resolveResult(resultRef: string): Promise<DurableJSON>;
    };
}
```

## GraphValueSchema

```typescript theme={null}
/** Host-owned schema boundary; validators/code/credentials never come from proposals. */
export interface GraphValueSchema {
    parse(value: unknown): unknown;
}
```

## PlanCommitFrame

```typescript theme={null}
export interface PlanCommitFrame {
    baseRevision: number;
    plan: ExecutionPlan;
}
```

## PlanReferenceRequirement

```typescript theme={null}
export interface PlanReferenceRequirement {
    consumer: string;
    producer: string;
    outputPath: readonly string[];
    argumentPath: readonly string[];
}
```

## PlanStreamLimits

```typescript theme={null}
export interface PlanStreamLimits {
    maxFrameBytes: number;
    maxTotalBytes: number;
    maxFrames: number;
    /** Per planning call, default 30 seconds; original root deadline still applies. */
    maxLatencyMs?: number;
}
```

## PlanValidationLimits

```typescript theme={null}
export interface PlanValidationLimits {
    maxBytes: number;
    maxNodes: number;
    maxDepth: number;
    maxConcurrency: number;
    durable: boolean;
}
```

## ValidatedExecutionPlan

```typescript theme={null}
export interface ValidatedExecutionPlan {
    plan: ExecutionPlan;
    order: readonly string[];
    referenceRequirements: readonly PlanReferenceRequirement[];
    digest: string;
    catalogDigest: string;
    bindingKinds: Record<string, GraphBinding["kind"]>;
}
```

## Supporting types

These shapes appear in the signatures above but are not named exports of the package entrypoint.

### GraphBindingBase

```typescript theme={null}
interface GraphBindingBase {
    id: string;
    version: string;
    input: GraphValueSchema;
    output: GraphValueSchema;
    /** Dot-separated supported reference paths; empty string denotes the whole value. */
    referenceInputs?: readonly string[];
    referenceOutputs?: readonly string[];
    /** Required for templates containing future values: pure literal/template validation. */
    validateTemplate?: (template: Record<string, DurableJSON>) => void;
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.