Build your own software factory

Fractal is a batteries-included framework to build your own software factory

  • Automate your SDLC

    • Missions with steps and gates
    • PRs and issues start missions
    • Only decisions reach you
  • Flexible & pluggable

    • Runs on your own machines
    • Claude Code, Codex, OpenCode
    • Web, iOS, CLI, client API
  • Structured runtime

    • Declarative definitions
    • Durable across restarts
    • Replicated across machines

01Factory as code

Let your agents build your software factory as code. Composable, simple and observable.

A mission declares a goal, constraints and the steps to reach it. Dependencies set the order, and gates, not the agent’s report, decide when a step is done.

// A comments feature is ready to build.
// API and platform developers build it together.
// Tests pass, then you decide whether to release.

import { you, developer } from '#agents/ship-comments'
import { Fractal } from 'fractal'

const platforms = [
  { id: 'web', name: 'the web' },
  { id: 'ios', name: 'iOS' },
  { id: 'android', name: 'Android' },
] as const

class Declined extends Error {}

const ci = (check: string) =>
  Fractal.gate({
    name: check,
    ciPassed: {
      check,
      repo: 'acme/app',
      branch: 'comments',
    },
  })

/** Build comments across all platforms. */
export default Fractal.mission(
  {
    id: 'ship-comments',
    state: 'ready',
    timeout: '5d',
    reportTo: developer('qa'),
    goal: 'Comments work on web, iOS and Android.',
    constraints: [
      'One spec everywhere, no platform extras.',
    ],
  },
  async () => {
    await Fractal.Worker.provide(
      developer('api'),
      () =>
        Fractal.step(
          {
            id: 'api',
            timeout: '1d',
            goal: 'The API serves the shared schema.',
          },
          () => ci('api'),
        ),
    )
    // Wait for the API before building each client
    await Promise.all(
      platforms.map(({ id, name }) =>
        Fractal.Worker.provide(developer(id), () =>
          Fractal.step(
            {
              id,
              timeout: '2d',
              goal: `Comments work on ${name}.`,
            },
            () => ci(`${id}-e2e`),
          ),
        ),
      ),
    )
    // Use the same tests to catch platform differences
    await Fractal.Worker.provide(developer('qa'), () =>
      Fractal.step(
        {
          id: 'parity',
          timeout: '2h',
          goal: 'Each platform passes the same suite.',
        },
        () =>
          Fractal.gate({
            name: 'parity',
            exec: ['pnpm', 'test:parity'],
          }),
      ),
    )
    // Wait for your approval before releasing
    await Fractal.step({ id: 'approve' }, async () => {
      const answer = await Fractal.ask({
        name: 'You approve the release',
        reviewer: you,
        question: 'Ship comments on every platform?',
      })
      if (answer._tag === 'Rejected')
        throw new Declined()
    })
  },
)
import { Fractal } from 'fractal'

const roles = {
  // Builds the shared comments API
  api: 'api-dev',
  // Builds comments for the web
  web: 'web-dev',
  // Builds comments for iOS
  ios: 'ios-dev',
  // Builds comments for Android
  android: 'android-dev',
  // Checks that comments work on every platform
  qa: 'qa-tester',
} as const

/** Creates the developer or tester for each part. */
export const developer = (part: keyof typeof roles) =>
  Fractal.agent({
    id: roles[part],
    lifecycle: 'standing',
    host: 'local',
    workspace: '/work/app',
    harness: {
      kind: 'codex',
      model: 'gpt-5.6-sol',
      effort: 'high',
    },
  })

/** You decide whether to release. */
export const you = Fractal.person({ id: 'you' })
import shipComments from '#missions/ship-comments'
import { Fractal } from 'fractal'

/** Run locally with the required tools. */
export const runtime = Fractal.runtime({
  engine: Fractal.Engine.local(),
  // Start each agent with its chosen harness
  harness: Fractal.Harness.local(),
  workspace: Fractal.Workspace.local(),
  host: Fractal.Host.local(),
})

/** Start the mission or resume saved work. */
export const main = () =>
  Fractal.run(shipComments, { runtime })
// A comments feature is ready to build.
// API and platform developers build it together.
// Tests pass, then you decide whether to release.

import { you, developer } from '#agents/ship-comments'
import { Command } from '@effect/platform'
import { Data, Effect } from 'effect'
import { Fractal } from 'fractal/effect'

const platforms = [
  { id: 'web', name: 'the web' },
  { id: 'ios', name: 'iOS' },
  { id: 'android', name: 'Android' },
] as const

class Declined extends Data.TaggedError('Declined') {}

const ci = (check: string) =>
  Fractal.gate({
    name: check,
    ciPassed: {
      check,
      repo: 'acme/app',
      branch: 'comments',
    },
  })

/** Build comments across all platforms. */
export default Fractal.mission(
  {
    id: 'ship-comments',
    state: 'ready',
    timeout: '5 days',
    reportTo: developer('qa'),
    goal: 'Comments work on web, iOS and Android.',
    constraints: [
      'One spec everywhere, no platform extras.',
    ],
  },
  () =>
    Effect.gen(function* () {
      yield* Fractal.step(
        {
          id: 'api',
          timeout: '1 day',
          goal: 'The API serves the shared schema.',
        },
        ci('api'),
      ).pipe(
        Effect.provide(
          Fractal.Worker.layer(developer('api')),
        ),
      )
      // Wait for the API before building each client
      yield* Effect.forEach(
        platforms,
        ({ id, name }) =>
          Fractal.step(
            {
              id,
              timeout: '2 days',
              goal: `Comments work on ${name}.`,
            },
            ci(`${id}-e2e`),
          ).pipe(
            Effect.provide(
              Fractal.Worker.layer(developer(id)),
            ),
          ),
        { concurrency: 'unbounded' },
      )
      // Use the same tests to catch platform
      // differences
      yield* Fractal.step(
        {
          id: 'parity',
          timeout: '2 hours',
          goal: 'Each platform passes the same suite.',
        },
        Fractal.gate({
          name: 'parity',
          exec: Command.make('pnpm', 'test:parity'),
        }),
      ).pipe(
        Effect.provide(
          Fractal.Worker.layer(developer('qa')),
        ),
      )
      // Wait for your approval before releasing
      yield* Fractal.step(
        { id: 'approve' },
        Fractal.ask({
          name: 'You approve the release',
          reviewer: you,
          question: 'Ship comments on every platform?',
        }).pipe(
          Effect.filterOrFail(
            (answer) => answer._tag === 'Approved',
            () => new Declined(),
          ),
        ),
      )
    }),
)
import { Fractal } from 'fractal/effect'

const roles = {
  // Builds the shared comments API
  api: 'api-dev',
  // Builds comments for the web
  web: 'web-dev',
  // Builds comments for iOS
  ios: 'ios-dev',
  // Builds comments for Android
  android: 'android-dev',
  // Checks that comments work on every platform
  qa: 'qa-tester',
} as const

/** Creates the developer or tester for each part. */
export const developer = (part: keyof typeof roles) =>
  Fractal.agent({
    id: roles[part],
    lifecycle: 'standing',
    host: 'local',
    workspace: '/work/app',
    harness: {
      kind: 'codex',
      model: 'gpt-5.6-sol',
      effort: 'high',
    },
  })

/** You decide whether to release. */
export const you = Fractal.person({ id: 'you' })
import shipComments from '#missions/ship-comments'
import { Effect, Layer } from 'effect'
import { Fractal } from 'fractal/effect'

const adapters = Layer.mergeAll(
  // Start each agent with its chosen harness
  Fractal.Harness.local,
  Fractal.Workspace.local,
  Fractal.Host.local,
)

/** Run locally with the required tools. */
export const runtime = Fractal.Engine.local.pipe(
  // Keep these tools available to mission steps
  Layer.provideMerge(adapters),
)

/** Start the mission or resume saved work. */
export const main = Fractal.run(shipComments).pipe(
  Effect.provide(runtime),
)
// A comments feature is ready to build.
// API and platform developers build it together.
// Tests pass, then you decide whether to release.
version 2
mission "ship-comments" state="ready" \
    timeout="5d" report-to="agent/qa-tester" {
  goal "Comments work on web, iOS and Android."
  constraint "One spec everywhere, no platform extras."
  // A shared API keeps platform behavior consistent
  step "api" timeout="1d" {
    assigned-to "agent/api-dev"
    goal "The API serves the shared schema."
    gate "api" {
      ci-passed "api" repo="acme/app" branch="comments"
    }
  }
  // Each platform needs the same working API
  step "web" timeout="2d" {
    assigned-to "agent/web-dev"
    depends-on {
      step "api" completed
    }
    goal "Comments work on the web."
    gate "web-e2e" {
      ci-passed "web-e2e" repo="acme/app" \
          branch="comments"
    }
  }
  step "ios" timeout="2d" {
    assigned-to "agent/ios-dev"
    depends-on {
      step "api" completed
    }
    goal "Comments work on iOS."
    gate "ios-e2e" {
      ci-passed "ios-e2e" repo="acme/app" \
          branch="comments"
    }
  }
  step "android" timeout="2d" {
    assigned-to "agent/android-dev"
    depends-on {
      step "api" completed
    }
    goal "Comments work on Android."
    gate "android-e2e" {
      ci-passed "android-e2e" repo="acme/app" \
          branch="comments"
    }
  }
  // Shared tests catch differences across platforms
  step "parity" timeout="2h" {
    assigned-to "agent/qa-tester"
    depends-on {
      step "web" completed
      step "ios" completed
      step "android" completed
    }
    goal "Each platform passes the same suite."
    gate "parity" {
      exec "pnpm test:parity"
      host "local"
      workspace "/work/app"
    }
  }
  // Passing tests do not grant release approval
  step "approve" {
    depends-on {
      step "parity" completed
    }
    gate "You approve the release" type="human" {
      reviewer "person/you"
      question "Ship comments on every platform?"
    }
  }
}
version 2
// Builds the shared comments API
agent "api-dev" {
  lifecycle "standing"
  host "local"
  workspace "/work/app"
  harness "codex" {
    model "gpt-5.6-sol"
    effort "high"
  }
}
// Builds comments for the web
agent "web-dev" {
  lifecycle "standing"
  host "local"
  workspace "/work/app"
  harness "codex" {
    model "gpt-5.6-sol"
    effort "high"
  }
}
// Builds comments for iOS
agent "ios-dev" {
  lifecycle "standing"
  host "local"
  workspace "/work/app"
  harness "codex" {
    model "gpt-5.6-sol"
    effort "high"
  }
}
// Builds comments for Android
agent "android-dev" {
  lifecycle "standing"
  host "local"
  workspace "/work/app"
  harness "codex" {
    model "gpt-5.6-sol"
    effort "high"
  }
}
// Tests comments across every platform
agent "qa-tester" {
  lifecycle "standing"
  host "local"
  workspace "/work/app"
  harness "codex" {
    model "gpt-5.6-sol"
    effort "high"
  }
}
person "you"

Runmission-run/ship-comments/one

apishared schema{ }tests ✓webweb-deve2e ✓iosios-deve2e ✓androidandroid-deve2e ✓paritysame scenarios==exec ✓approveYouapproved ✓api{ }tests ✓webe2e ✓iose2e ✓androide2e ✓parity==exec ✓approveapproved ✓

4/4approve5h 5m / 5h 5m

// Open issues are waiting in the backlog.
// A fixer and reviewer handle one issue at a time.
// You get a report after up to eight rounds.

import {
  you,
  backlogFixer,
  codeReviewer,
} from '#agents/fix-backlog'
import { github } from '#services/github'
import { metrics } from '@opentelemetry/api'
import { Fractal } from 'fractal'

class Pending extends Error {}

const repo = 'acme/app'
const closed = metrics
  .getMeter('acme')
  .createCounter('issues_closed')

// Save the issue list so resumed runs reuse it
const inspect = () =>
  Fractal.step({ id: 'inspect' }, () =>
    Array.fromAsync(
      github.issues({
        repo,
        label: 'backlog',
        state: 'open',
      }),
    ),
  )

const round = async (n: number): Promise<void> => {
  const [issue] = await inspect()
  if (issue === undefined) return
  // Keep each repair separate so it can be reviewed
  const branch = `backlog/${issue.number}`
  await Fractal.Worker.provide(backlogFixer, () =>
    Fractal.step(
      {
        id: 'fix',
        timeout: '1h',
        goal: `Fix #${issue.number} in one PR.`,
      },
      () =>
        Fractal.gate({
          name: 'CI passed',
          ciPassed: { check: 'ci', repo, branch },
        }),
    ),
  )
  // Review the repair before closing the issue
  await Fractal.Worker.provide(codeReviewer, () =>
    Fractal.step(
      {
        id: 'review',
        timeout: '30m',
        goal: `Merge once #${issue.number} is fixed.`,
      },
      () =>
        Fractal.gate({
          name: 'the issue closed',
          check: async () =>
            (
              await github.issue({
                repo,
                number: issue.number,
              })
            ).state === 'closed',
        }),
    ),
  )
  closed.add(1, { repo })
  // Check again because new issues may have arrived
  const left = await inspect()
  if (left.length === 0) return
  // Stop after eight rounds if issues remain
  if (n === 8) throw new Pending()
  return round(n + 1)
}

/** Repair backlog issues one at a time. */
export default Fractal.mission(
  {
    id: 'fix-backlog',
    state: 'ready',
    timeout: '1d',
    reportTo: you,
    goal: 'No acme/app issue is labelled backlog.',
    constraints: ['One issue per pull request.'],
  },
  () => round(1),
)
import { Fractal } from 'fractal'

/** Fixes one backlog issue per round. */
export const backlogFixer = Fractal.agent({
  id: 'backlog-fixer',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/app',
  harness: {
    kind: 'codex',
    model: 'gpt-5.6-sol',
    effort: 'medium',
  },
})

/** Reviews each fix before merging it. */
export const codeReviewer = Fractal.agent({
  id: 'code-reviewer',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/app-review',
  harness: {
    kind: 'claude',
    model: 'claude-opus-5',
    effort: 'high',
  },
})

/** You receive the final report. */
export const you = Fractal.person({ id: 'you' })
import fixBacklog from '#missions/fix-backlog'
import { Fractal } from 'fractal'

/** Run locally with the required tools. */
export const runtime = Fractal.runtime({
  engine: Fractal.Engine.local(),
  // Start each agent with its chosen harness
  harness: Fractal.Harness.local(),
  workspace: Fractal.Workspace.local(),
  host: Fractal.Host.local(),
})

/** Start the mission or resume saved work. */
export const main = () =>
  Fractal.run(fixBacklog, { runtime })
// Open issues are waiting in the backlog.
// A fixer and reviewer handle one issue at a time.
// You get a report after up to eight rounds.

import {
  you,
  backlogFixer,
  codeReviewer,
} from '#agents/fix-backlog'
import { GitHub } from '#services/github'
import { Data, Effect, Metric, Stream } from 'effect'
import { Fractal } from 'fractal/effect'

class Pending extends Data.TaggedError('Pending') {}

const repo = 'acme/app'
const closed = Metric.counter('issues_closed').pipe(
  Metric.tagged('repo', repo),
)

// Save the issue list so resumed runs reuse it
const inspect = Fractal.step(
  { id: 'inspect' },
  GitHub.issues({
    repo,
    label: 'backlog',
    state: 'open',
  }).pipe(Stream.runCollect),
)

const round = Effect.gen(function* () {
  const [issue] = yield* inspect
  if (issue === undefined) return
  // Keep each repair separate so it can be reviewed
  const branch = `backlog/${issue.number}`
  yield* Fractal.step(
    {
      id: 'fix',
      timeout: '1 hour',
      goal: `Fix #${issue.number} in one PR.`,
    },
    Fractal.gate({
      name: 'CI passed',
      ciPassed: { check: 'ci', repo, branch },
    }),
  ).pipe(
    Effect.provide(Fractal.Worker.layer(backlogFixer)),
  )
  // Review the repair before closing the issue
  yield* Fractal.step(
    {
      id: 'review',
      timeout: '30 minutes',
      goal: `Merge once #${issue.number} is fixed.`,
    },
    Fractal.gate({
      name: 'the issue closed',
      check: GitHub.issue({
        repo,
        number: issue.number,
      }).pipe(
        Effect.map((it) => it.state === 'closed'),
      ),
    }),
  ).pipe(
    Effect.provide(Fractal.Worker.layer(codeReviewer)),
  )
  yield* Metric.increment(closed)
  // Check again because new issues may have arrived
  const left = yield* inspect
  if (left.length > 0) return yield* new Pending()
})

/** Repair backlog issues one at a time. */
export default Fractal.mission(
  {
    id: 'fix-backlog',
    state: 'ready',
    timeout: '1 day',
    reportTo: you,
    goal: 'No acme/app issue is labelled backlog.',
    constraints: ['One issue per pull request.'],
  },
  // Stop after eight rounds if issues remain
  () =>
    round.pipe(
      Effect.retry({
        times: 7,
        while: (error) => error._tag === 'Pending',
      }),
    ),
)
import { Fractal } from 'fractal/effect'

/** Fixes one backlog issue per round. */
export const backlogFixer = Fractal.agent({
  id: 'backlog-fixer',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/app',
  harness: {
    kind: 'codex',
    model: 'gpt-5.6-sol',
    effort: 'medium',
  },
})

/** Reviews each fix before merging it. */
export const codeReviewer = Fractal.agent({
  id: 'code-reviewer',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/app-review',
  harness: {
    kind: 'claude',
    model: 'claude-opus-5',
    effort: 'high',
  },
})

/** You receive the final report. */
export const you = Fractal.person({ id: 'you' })
import fixBacklog from '#missions/fix-backlog'
import { GitHub } from '#services/github'
import { FetchHttpClient } from '@effect/platform'
import { Effect, Layer } from 'effect'
import { Fractal } from 'fractal/effect'

const adapters = Layer.mergeAll(
  // Start each agent with its chosen harness
  Fractal.Harness.local,
  Fractal.Workspace.local,
  Fractal.Host.local,
  GitHub.Default.pipe(
    Layer.provide(FetchHttpClient.layer),
  ),
)

/** Run locally with the required tools. */
export const runtime = Fractal.Engine.local.pipe(
  // Keep these tools available to mission steps
  Layer.provideMerge(adapters),
)

/** Start the mission or resume saved work. */
export const main = Fractal.run(fixBacklog).pipe(
  Effect.provide(runtime),
)

Runmission-run/fix-backlog/one

round 1fix → reviewbacklog-fixercode-reviewerbacklog empty · not yet
round 2fix → reviewbacklog-fixercode-reviewerbacklog empty · not yet
round 3fix → reviewbacklog-fixercode-reviewerbacklog empty · not yet
round 4fix → reviewbacklog-fixercode-reviewerbacklog empty · not yet
round 5fix → reviewbacklog-fixercode-reviewerbacklog empty · passed ✓
round 6fix → reviewbacklog-fixercode-reviewerbacklog empty · not needed
round 7fix → reviewbacklog-fixercode-reviewerbacklog empty · not needed
round 8fix → reviewbacklog-fixercode-reviewerbacklog empty · not needed

5/5round 55h 24m / 5h 24m

// Failed runs and waits for you reveal problems.
// An analyst and editor test one factory change.
// You approve it before it is applied.

import {
  you,
  runAnalyst,
  factoryEditor,
} from '#agents/improve-factory'
import { Fractal } from 'fractal'

class Declined extends Error {}

/** Test and apply one factory improvement. */
export default Fractal.mission(
  {
    id: 'improve-factory',
    state: 'ready',
    timeout: '2d',
    reportTo: factoryEditor,
    goal: "The week's worst friction is gone.",
    constraints: [
      'Only edit declarations. Keep every gate.',
    ],
  },
  async () => {
    // Use failures and wait times to choose one change
    await Promise.all([
      Fractal.Worker.provide(runAnalyst, () =>
        Fractal.step(
          {
            id: 'failures',
            timeout: '30m',
            goal: 'List failed runs, stuck gates.',
          },
          () =>
            Fractal.gate({
              name: 'failures published',
              document: 'doc/factory/failures',
            }),
        ),
      ),
      Fractal.Worker.provide(factoryEditor, () =>
        Fractal.step(
          {
            id: 'asks',
            timeout: '30m',
            goal: 'List asks and their wait times.',
          },
          () =>
            Fractal.gate({
              name: 'asks published',
              document: 'doc/factory/asks',
            }),
        ),
      ),
    ])
    // Replay failed runs to test the proposed change
    await Fractal.Worker.provide(factoryEditor, () =>
      Fractal.step(
        {
          id: 'propose',
          timeout: '2h',
          goal: 'One PR changes one declaration.',
        },
        () =>
          Fractal.gate({
            name: 'the replays pass',
            exec: [
              './scripts/replay.sh',
              'doc/factory/failures',
            ],
            timeout: '30m',
          }),
      ),
    )
    // Wait for your approval before applying changes
    await Fractal.step({ id: 'approve' }, async () => {
      const answer = await Fractal.ask({
        name: 'You approve the change',
        reviewer: you,
        question: 'Apply the improved declarations?',
      })
      if (answer._tag === 'Rejected')
        throw new Declined()
    })
    await Fractal.Worker.provide(factoryEditor, () =>
      Fractal.step(
        {
          id: 'apply',
          timeout: '30m',
          goal: 'Merge it, then run fractal apply.',
        },
        () =>
          Fractal.gate({
            name: 'CI passed on main',
            ciPassed: {
              check: 'ci',
              repo: 'acme/factory',
              branch: 'main',
            },
          }),
      ),
    )
  },
)
import { Fractal } from 'fractal'

/** Finds failed runs and blocked gates. */
export const runAnalyst = Fractal.agent({
  id: 'run-analyst',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/factory',
  harness: {
    kind: 'claude',
    model: 'claude-opus-5',
    effort: 'medium',
  },
})

/** Proposes and applies factory changes. */
export const factoryEditor = Fractal.agent({
  id: 'factory-editor',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/factory',
  harness: {
    kind: 'codex',
    model: 'gpt-5.6-sol',
    effort: 'high',
  },
})

/** You approve changes before they are applied. */
export const you = Fractal.person({ id: 'you' })
import improveFactory from '#missions/improve-factory'
import { Fractal } from 'fractal'

/** Run locally with the required tools. */
export const runtime = Fractal.runtime({
  engine: Fractal.Engine.local(),
  // Start each agent with its chosen harness
  harness: Fractal.Harness.local(),
  workspace: Fractal.Workspace.local(),
  host: Fractal.Host.local(),
})

/** Start the mission or resume saved work. */
export const main = () =>
  Fractal.run(improveFactory, { runtime })
// Failed runs and waits for you reveal problems.
// An analyst and editor test one factory change.
// You approve it before it is applied.

import {
  you,
  runAnalyst,
  factoryEditor,
} from '#agents/improve-factory'
import { Command } from '@effect/platform'
import { Data, Effect } from 'effect'
import { Fractal } from 'fractal/effect'

class Declined extends Data.TaggedError('Declined') {}

/** Test and apply one factory improvement. */
export default Fractal.mission(
  {
    id: 'improve-factory',
    state: 'ready',
    timeout: '2 days',
    reportTo: factoryEditor,
    goal: "The week's worst friction is gone.",
    constraints: [
      'Only edit declarations. Keep every gate.',
    ],
  },
  () =>
    Effect.gen(function* () {
      // Use failures and waits to choose one change
      yield* Effect.all(
        [
          Fractal.step(
            {
              id: 'failures',
              timeout: '30 minutes',
              goal: 'List failed runs, stuck gates.',
            },
            Fractal.gate({
              name: 'failures published',
              document: 'doc/factory/failures',
            }),
          ).pipe(
            Effect.provide(
              Fractal.Worker.layer(runAnalyst),
            ),
          ),
          Fractal.step(
            {
              id: 'asks',
              timeout: '30 minutes',
              goal: 'List asks and their wait times.',
            },
            Fractal.gate({
              name: 'asks published',
              document: 'doc/factory/asks',
            }),
          ).pipe(
            Effect.provide(
              Fractal.Worker.layer(factoryEditor),
            ),
          ),
        ],
        { concurrency: 'unbounded' },
      )
      // Replay failed runs to test the proposed change
      yield* Fractal.step(
        {
          id: 'propose',
          timeout: '2 hours',
          goal: 'One PR changes one declaration.',
        },
        Fractal.gate({
          name: 'the replays pass',
          exec: Command.make(
            './scripts/replay.sh',
            'doc/factory/failures',
          ),
          timeout: '30 minutes',
        }),
      ).pipe(
        Effect.provide(
          Fractal.Worker.layer(factoryEditor),
        ),
      )
      // Wait for your approval before applying changes
      yield* Fractal.step(
        { id: 'approve' },
        Fractal.ask({
          name: 'You approve the change',
          reviewer: you,
          question: 'Apply the improved declarations?',
        }).pipe(
          Effect.filterOrFail(
            (answer) => answer._tag === 'Approved',
            () => new Declined(),
          ),
        ),
      )
      yield* Fractal.step(
        {
          id: 'apply',
          timeout: '30 minutes',
          goal: 'Merge it, then run fractal apply.',
        },
        Fractal.gate({
          name: 'CI passed on main',
          ciPassed: {
            check: 'ci',
            repo: 'acme/factory',
            branch: 'main',
          },
        }),
      ).pipe(
        Effect.provide(
          Fractal.Worker.layer(factoryEditor),
        ),
      )
    }),
)
import { Fractal } from 'fractal/effect'

/** Finds failed runs and blocked gates. */
export const runAnalyst = Fractal.agent({
  id: 'run-analyst',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/factory',
  harness: {
    kind: 'claude',
    model: 'claude-opus-5',
    effort: 'medium',
  },
})

/** Proposes and applies factory changes. */
export const factoryEditor = Fractal.agent({
  id: 'factory-editor',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/factory',
  harness: {
    kind: 'codex',
    model: 'gpt-5.6-sol',
    effort: 'high',
  },
})

/** You approve changes before they are applied. */
export const you = Fractal.person({ id: 'you' })
import improveFactory from '#missions/improve-factory'
import { Effect, Layer } from 'effect'
import { Fractal } from 'fractal/effect'

const adapters = Layer.mergeAll(
  // Start each agent with its chosen harness
  Fractal.Harness.local,
  Fractal.Workspace.local,
  Fractal.Host.local,
)

/** Run locally with the required tools. */
export const runtime = Fractal.Engine.local.pipe(
  // Keep these tools available to mission steps
  Layer.provideMerge(adapters),
)

/** Start the mission or resume saved work. */
export const main = Fractal.run(improveFactory).pipe(
  Effect.provide(runtime),
)
// Failed runs and waits for you reveal problems.
// An analyst and editor test one factory change.
// You approve it before it is applied.
version 2
mission "improve-factory" state="ready" \
    timeout="2d" report-to="agent/factory-editor" {
  goal "The week's worst friction is gone."
  constraint "Only edit declarations. Keep every gate."
  // Failed runs show what needs to change
  step "failures" timeout="30m" {
    assigned-to "agent/run-analyst"
    goal "List failed runs, stuck gates."
    gate "failures published" {
      document "doc/factory/failures"
    }
  }
  // Long waits show where the factory needs help
  step "asks" timeout="30m" {
    assigned-to "agent/factory-editor"
    goal "List asks and their wait times."
    gate "asks published" {
      document "doc/factory/asks"
    }
  }
  // Replays show whether the change fixes past failures
  step "propose" timeout="2h" {
    assigned-to "agent/factory-editor"
    depends-on {
      step "failures" completed
      step "asks" completed
    }
    goal "One PR changes one declaration."
    gate "the replays pass" {
      exec "./scripts/replay.sh doc/factory/failures"
      host "local"
      workspace "/work/factory"
      time-limit "30m"
    }
  }
  // Changing the factory needs your approval
  step "approve" {
    depends-on {
      step "propose" completed
    }
    gate "You approve the change" type="human" {
      reviewer "person/you"
      question "Apply the improved declarations?"
    }
  }
  // Only the approved change can be applied
  step "apply" timeout="30m" {
    assigned-to "agent/factory-editor"
    depends-on {
      step "approve" completed
    }
    goal "Merge it, then run fractal apply."
    gate "CI passed on main" {
      ci-passed "ci" repo="acme/factory" branch="main"
    }
  }
}
version 2
// Finds problems in failed factory runs
agent "run-analyst" {
  lifecycle "standing"
  host "local"
  workspace "/work/factory"
  harness "claude" {
    model "claude-opus-5"
    effort "medium"
  }
}
// Tests and applies an approved factory change
agent "factory-editor" {
  lifecycle "standing"
  host "local"
  workspace "/work/factory"
  // Factory edits need careful reasoning
  harness "codex" {
    model "gpt-5.6-sol"
    effort "high"
  }
}
person "you"

Runmission-run/improve-factory/week-43

failuresfailed runsdoc ✓askswaits on peopledoc ✓proposeone declarationreplays ✓approveYouapproved ✓applyfractal apply$CI ✓failuresdoc ✓asksdoc ✓proposereplays ✓approveapproved ✓apply$CI ✓

4/4apply5h 29m / 5h 29m

// The main branch has failing checks.
// A CI fixer repairs and checks it again.
// You get a report when it passes or stops.

import { you, ciFixer } from '#agents/fix-ci'
import { github } from '#services/github'
import { metrics } from '@opentelemetry/api'
import { Fractal } from 'fractal'

class StillRed extends Error {}

const tokens = metrics
  .getMeter('acme')
  .createCounter('agent_tokens')

// Save the check result so resumed runs reuse it
const inspect = () =>
  Fractal.step({ id: 'inspect' }, async () => {
    const run = await github.checkRun({
      repo: 'acme/app',
      ref: 'main',
      name: 'ci',
    })
    return run.conclusion === 'success'
  })

const round = async (n: number): Promise<void> => {
  if ((await inspect()) === true) return
  // Limit repairs to six rounds while main is failing
  if (n > 6) throw new StillRed()
  const turn = await Fractal.Worker.provide(
    ciFixer,
    () =>
      Fractal.step({
        id: 'fix',
        timeout: '1h',
        goal: 'Fix the next CI failure on main.',
      }),
  )
  // Show token use without stopping the repair
  tokens.add(turn.tokens, { mission: 'fix-ci' })
  return round(n + 1)
}

/** Repair failing checks on main. */
export default Fractal.mission(
  {
    id: 'fix-ci',
    state: 'ready',
    timeout: '4h',
    reportTo: you,
    goal: 'CI on main is green again.',
    constraints: [
      'Do not skip, delete or retry away tests.',
    ],
  },
  () => round(1),
)
import { Fractal } from 'fractal'

/** Repairs failing checks on main. */
export const ciFixer = Fractal.agent({
  id: 'ci-fixer',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/app',
  harness: {
    kind: 'codex',
    model: 'gpt-5.6-sol',
    effort: 'high',
  },
})

/** You receive the final report. */
export const you = Fractal.person({ id: 'you' })
import fixCi from '#missions/fix-ci'
import { Fractal } from 'fractal'

/** Run locally with the required tools. */
export const runtime = Fractal.runtime({
  engine: Fractal.Engine.local(),
  // Start each agent with its chosen harness
  harness: Fractal.Harness.local(),
  workspace: Fractal.Workspace.local(),
  host: Fractal.Host.local(),
})

/** Start the mission or resume saved work. */
export const main = () =>
  Fractal.run(fixCi, { runtime })
// The main branch has failing checks.
// A CI fixer repairs and checks it again.
// You get a report when it passes or stops.

import { you, ciFixer } from '#agents/fix-ci'
import { GitHub } from '#services/github'
import { Data, Effect, Metric, Schedule } from 'effect'
import { Fractal } from 'fractal/effect'

class StillRed extends Data.TaggedError('StillRed') {}

const tokens = Metric.counter('agent_tokens').pipe(
  Metric.tagged('mission', 'fix-ci'),
)

// Save the check result so resumed runs reuse it
const inspect = Fractal.step(
  { id: 'inspect' },
  GitHub.checkRun({
    repo: 'acme/app',
    ref: 'main',
    name: 'ci',
  }).pipe(
    Effect.filterOrFail(
      (run) => run.conclusion === 'success',
      () => new StillRed(),
    ),
  ),
)

const round = Effect.gen(function* () {
  const turn = yield* Fractal.step({
    id: 'fix',
    timeout: '1 hour',
    goal: 'Fix the next CI failure on main.',
  }).pipe(
    Effect.provide(Fractal.Worker.layer(ciFixer)),
  )
  // Show token use without stopping the repair
  yield* Metric.incrementBy(tokens, turn.tokens)
  yield* inspect
})

/** Repair failing checks on main. */
export default Fractal.mission(
  {
    id: 'fix-ci',
    state: 'ready',
    timeout: '4 hours',
    reportTo: you,
    goal: 'CI on main is green again.',
    constraints: [
      'Do not skip, delete or retry away tests.',
    ],
  },
  () =>
    inspect.pipe(
      // Repair failing checks but stop on other errors
      Effect.catchTag('StillRed', () =>
        round.pipe(
          Effect.retry({
            schedule: Schedule.recurs(5),
            while: (error) =>
              error._tag === 'StillRed',
          }),
        ),
      ),
    ),
)
import { Fractal } from 'fractal/effect'

/** Repairs failing checks on main. */
export const ciFixer = Fractal.agent({
  id: 'ci-fixer',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/app',
  harness: {
    kind: 'codex',
    model: 'gpt-5.6-sol',
    effort: 'high',
  },
})

/** You receive the final report. */
export const you = Fractal.person({ id: 'you' })
import fixCi from '#missions/fix-ci'
import { GitHub } from '#services/github'
import { FetchHttpClient } from '@effect/platform'
import { Effect, Layer } from 'effect'
import { Fractal } from 'fractal/effect'

const adapters = Layer.mergeAll(
  // Start each agent with its chosen harness
  Fractal.Harness.local,
  Fractal.Workspace.local,
  Fractal.Host.local,
  GitHub.Default.pipe(
    Layer.provide(FetchHttpClient.layer),
  ),
)

/** Run locally with the required tools. */
export const runtime = Fractal.Engine.local.pipe(
  // Keep these tools available to mission steps
  Layer.provideMerge(adapters),
)

/** Start the mission or resume saved work. */
export const main = Fractal.run(fixCi).pipe(
  Effect.provide(runtime),
)

Runmission-run/fix-ci/one

round 1fixci-fixerCI on main · not yet
round 2fixci-fixerCI on main · not yet
round 3fixci-fixerCI on main · passed ✓
round 4fixci-fixerCI on main · not needed
round 5fixci-fixerCI on main · not needed
round 6fixci-fixerCI on main · not needed

3/3round 31h 56m / 1h 56m

// Weekly dependency updates are due.
// One bot per repo opens and tests its updates.
// A combined report shows what passed.

import { depsBot } from '#agents/update-deps'
import { Fractal } from 'fractal'

const repos = ['app', 'api', 'docs'] as const

/** Update dependencies across all repos. */
export default Fractal.mission(
  {
    id: 'update-deps',
    state: 'ready',
    timeout: '2h',
    reportTo: depsBot('app'),
    goal: 'Every repo runs current deps, CI green.',
    constraints: [
      'No major bumps without a migration note.',
    ],
  },
  async () => {
    // Update independent repos at the same time
    await Promise.all(
      repos.map((repo) =>
        Fractal.Worker.provide(depsBot(repo), () =>
          Fractal.step(
            {
              id: repo,
              timeout: '1h',
              goal: `A green deps PR in acme/${repo}.`,
            },
            // Require passing CI before counting an
            // update
            () =>
              Fractal.gate({
                name: 'CI passed',
                ciPassed: {
                  check: 'ci',
                  repo: `acme/${repo}`,
                  branch: 'deps/update',
                },
              }),
          ),
        ),
      ),
    )
    // Combine results only after every repo passes
    await Fractal.Worker.provide(depsBot('app'), () =>
      Fractal.step(
        {
          id: 'report',
          timeout: '15m',
          goal: 'A report links each PR and CI run.',
        },
        () =>
          Fractal.gate({
            name: 'report published',
            document: 'doc/deps/report',
          }),
      ),
    )
  },
)
import { Fractal } from 'fractal'

/** Opens and tests updates for app, api or docs. */
export const depsBot = (
  repo: 'app' | 'api' | 'docs',
) =>
  Fractal.agent({
    id: `${repo}-deps-bot`,
    lifecycle: 'standing',
    host: 'local',
    workspace: `/work/${repo}`,
    harness: {
      kind: 'codex',
      model: 'gpt-5.6-sol',
      effort: 'medium',
    },
  })
import updateDeps from '#missions/update-deps'
import { Fractal } from 'fractal'

/** Start dependency updates every Monday. */
export default Fractal.schedule({
  id: 'update-deps',
  every: '7d',
  anchor: '2026-10-26T07:00:00Z',
  // After downtime, run only the latest missed week
  catchUp: 'latest',
  // Use the latest published mission when it is ready
  // Use an older revision only when pinned
  work: {
    mission: updateDeps,
    workspace: '/work/factory',
  },
})
import updateDeps from '#missions/update-deps'
import { Fractal } from 'fractal'

/** Run locally with the required tools. */
export const runtime = Fractal.runtime({
  engine: Fractal.Engine.local(),
  // Start each agent with its chosen harness
  harness: Fractal.Harness.local(),
  workspace: Fractal.Workspace.local(),
  host: Fractal.Host.local(),
})

/** Start the mission or resume saved work. */
export const main = () =>
  Fractal.run(updateDeps, { runtime })
// Weekly dependency updates are due.
// One bot per repo opens and tests its updates.
// A combined report shows what passed.

import { depsBot } from '#agents/update-deps'
import { Effect } from 'effect'
import { Fractal } from 'fractal/effect'

const repos = ['app', 'api', 'docs'] as const

/** Update dependencies across all repos. */
export default Fractal.mission(
  {
    id: 'update-deps',
    state: 'ready',
    timeout: '2 hours',
    reportTo: depsBot('app'),
    goal: 'Every repo runs current deps, CI green.',
    constraints: [
      'No major bumps without a migration note.',
    ],
  },
  () =>
    Effect.gen(function* () {
      // Update independent repos at the same time
      yield* Effect.forEach(
        repos,
        (repo) =>
          Fractal.step(
            {
              id: repo,
              timeout: '1 hour',
              goal: `A green deps PR in acme/${repo}.`,
            },
            // Require passing CI before counting an
            // update
            Fractal.gate({
              name: 'CI passed',
              ciPassed: {
                check: 'ci',
                repo: `acme/${repo}`,
                branch: 'deps/update',
              },
            }),
          ).pipe(
            Effect.provide(
              Fractal.Worker.layer(depsBot(repo)),
            ),
          ),
        { concurrency: 'unbounded' },
      )
      // Combine results only after every repo passes
      yield* Fractal.step(
        {
          id: 'report',
          timeout: '15 minutes',
          goal: 'A report links each PR and CI run.',
        },
        Fractal.gate({
          name: 'report published',
          document: 'doc/deps/report',
        }),
      ).pipe(
        Effect.provide(
          Fractal.Worker.layer(depsBot('app')),
        ),
      )
    }),
)
import { Fractal } from 'fractal/effect'

/** Opens and tests updates for app, api or docs. */
export const depsBot = (
  repo: 'app' | 'api' | 'docs',
) =>
  Fractal.agent({
    id: `${repo}-deps-bot`,
    lifecycle: 'standing',
    host: 'local',
    workspace: `/work/${repo}`,
    harness: {
      kind: 'codex',
      model: 'gpt-5.6-sol',
      effort: 'medium',
    },
  })
import updateDeps from '#missions/update-deps'
import { Fractal } from 'fractal/effect'

/** Start dependency updates every Monday. */
export default Fractal.schedule({
  id: 'update-deps',
  every: '1 week',
  anchor: '2026-10-26T07:00:00Z',
  // After downtime, run only the latest missed week
  catchUp: 'latest',
  // Use the latest published mission when it is ready
  // Use an older revision only when pinned
  work: {
    mission: updateDeps,
    workspace: '/work/factory',
  },
})
import updateDeps from '#missions/update-deps'
import { Effect, Layer } from 'effect'
import { Fractal } from 'fractal/effect'

const adapters = Layer.mergeAll(
  // Start each agent with its chosen harness
  Fractal.Harness.local,
  Fractal.Workspace.local,
  Fractal.Host.local,
)

/** Run locally with the required tools. */
export const runtime = Fractal.Engine.local.pipe(
  // Keep these tools available to mission steps
  Layer.provideMerge(adapters),
)

/** Start the mission or resume saved work. */
export const main = Fractal.run(updateDeps).pipe(
  Effect.provide(runtime),
)
// Weekly dependency updates are due.
// One bot per repo opens and tests its updates.
// A combined report shows what passed.
version 2
mission "update-deps" state="ready" \
    timeout="2h" report-to="agent/app-deps-bot" {
  goal "Every repo runs current deps, CI green."
  constraint "No major bumps without a migration note."
  // Repos can update without waiting for each other
  step "app" timeout="1h" {
    assigned-to "agent/app-deps-bot"
    goal "A green deps PR in acme/app."
    // Tests must pass before an update counts as done
    gate "CI passed" {
      ci-passed "ci" repo="acme/app" \
          branch="deps/update"
    }
  }
  step "api" timeout="1h" {
    assigned-to "agent/api-deps-bot"
    goal "A green deps PR in acme/api."
    gate "CI passed" {
      ci-passed "ci" repo="acme/api" \
          branch="deps/update"
    }
  }
  step "docs" timeout="1h" {
    assigned-to "agent/docs-deps-bot"
    goal "A green deps PR in acme/docs."
    gate "CI passed" {
      ci-passed "ci" repo="acme/docs" \
          branch="deps/update"
    }
  }
  // The report needs results from every repo
  step "report" timeout="15m" {
    assigned-to "agent/app-deps-bot"
    depends-on {
      step "app" completed
      step "api" completed
      step "docs" completed
    }
    goal "A report links each PR and CI run."
    gate "report published" {
      document "doc/deps/report"
    }
  }
}
version 2
// Opens and tests dependency updates for the app
agent "app-deps-bot" {
  lifecycle "standing"
  host "local"
  workspace "/work/app"
  // Routine updates use medium effort
  harness "codex" {
    model "gpt-5.6-sol"
    effort "medium"
  }
}
// Opens and tests dependency updates for the API
agent "api-deps-bot" {
  lifecycle "standing"
  host "local"
  workspace "/work/api"
  harness "codex" {
    model "gpt-5.6-sol"
    effort "medium"
  }
}
// Opens and tests dependency updates for the docs
agent "docs-deps-bot" {
  lifecycle "standing"
  host "local"
  workspace "/work/docs"
  harness "codex" {
    model "gpt-5.6-sol"
    effort "medium"
  }
}
// Start dependency updates every Monday morning
version 2
schedule "update-deps" {
  every "7d"
  anchor "2026-10-26T07:00:00Z"
  // One run is enough to catch up after downtime
  catch-up "latest"
  work {
    // Use the current published mission when ready
    mission "update-deps"
    workspace "/work/factory"
  }
}

Runmission-run/update-deps/weekly-42

appacme/appCI ✓apiacme/apiCI ✓docsacme/docsCI ✓reportlinks every PRdoc ✓appCI ✓apiCI ✓docsCI ✓reportdoc ✓

2/2report1h 7m / 1h 7m

// A pull request is ready for review.
// A tester and reviewer gather the evidence.
// You decide whether to sign off the review.

import {
  you,
  prReviewer,
  prTester,
} from '#agents/review-prs'
import { Fractal } from 'fractal'

class Unsigned extends Error {}

/** Review a pull request with evidence. */
export default Fractal.mission(
  {
    id: 'review-prs',
    state: 'ready',
    timeout: '2h',
    reportTo: prReviewer,
    goal: 'The PR has an evidence-backed review.',
    constraints: [
      'Review only. Never approve or merge.',
    ],
    // Use the pull request that triggered this run
    payload: { source: Fractal.ResourceRef },
  },
  async ({ source }) => {
    // Gather test results and context at the same time
    await Promise.all([
      Fractal.Worker.provide(prTester, () =>
        Fractal.step({
          id: 'reproduce',
          timeout: '20m',
          goal: `Run the tests of ${source}.`,
        }),
      ),
      Fractal.Worker.provide(prReviewer, () =>
        Fractal.step({
          id: 'context',
          timeout: '15m',
          goal: `Find the issues behind ${source}.`,
        }),
      ),
    ])
    // Back the review with test results and context
    await Fractal.Worker.provide(prReviewer, () =>
      Fractal.step(
        {
          id: 'review',
          timeout: '30m',
          goal: 'Publish findings with evidence.',
        },
        () =>
          Fractal.gate({
            name: 'review published',
            document: 'doc/github/review',
          }),
      ),
    )
    await Fractal.step(
      { id: 'sign-off' },
      async () => {
        try {
          const answer = await Fractal.ask({
            name: 'You sign off the review',
            reviewer: you,
            question: 'Is this review ready to share?',
            timeout: '30m',
          })
          // Require your approval before signing off
          if (answer._tag === 'Rejected')
            throw new Unsigned()
        } catch (error) {
          if (error instanceof Fractal.TimedOut)
            throw new Unsigned()
          throw error
        }
      },
    )
  },
)
import { Fractal } from 'fractal'

/** Runs the pull request and its tests. */
export const prTester = Fractal.agent({
  id: 'pr-tester',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/review',
  harness: {
    kind: 'codex',
    model: 'gpt-5.6-sol',
    effort: 'medium',
  },
})

/** Reads the change and writes the review. */
export const prReviewer = Fractal.agent({
  id: 'pr-reviewer',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/review',
  harness: {
    kind: 'claude',
    model: 'claude-opus-5',
    effort: 'high',
  },
})

/** You decide whether to sign off the review. */
export const you = Fractal.person({ id: 'you' })
import reviewPrs from '#missions/review-prs'
import { Fractal } from 'fractal'

/** Run locally with the required tools. */
export const runtime = Fractal.runtime({
  engine: Fractal.Engine.local(),
  // Start each agent with its chosen harness
  harness: Fractal.Harness.local(),
  workspace: Fractal.Workspace.local(),
  host: Fractal.Host.local(),
})

/** Start the mission or resume saved work. */
export const main = () =>
  Fractal.run(reviewPrs, {
    runtime,
    payload: {
      source: 'resource/github/acme/app/pull/42',
    },
  })
// A pull request is ready for review.
// A tester and reviewer gather the evidence.
// You decide whether to sign off the review.

import {
  you,
  prReviewer,
  prTester,
} from '#agents/review-prs'
import { Data, Effect, Schema } from 'effect'
import { Fractal } from 'fractal/effect'

class Unsigned extends Data.TaggedError('Unsigned') {}

/** Review a pull request with evidence. */
export default Fractal.mission(
  {
    id: 'review-prs',
    state: 'ready',
    timeout: '2 hours',
    reportTo: prReviewer,
    goal: 'The PR has an evidence-backed review.',
    constraints: [
      'Review only. Never approve or merge.',
    ],
    // Use the pull request that triggered this run
    payload: Schema.Struct({
      source: Fractal.ResourceRef,
    }),
  },
  ({ source }) =>
    Effect.gen(function* () {
      yield* Effect.all(
        [
          Fractal.step({
            id: 'reproduce',
            timeout: '20 minutes',
            goal: `Run the tests of ${source}.`,
          }).pipe(
            Effect.provide(
              Fractal.Worker.layer(prTester),
            ),
          ),
          Fractal.step({
            id: 'context',
            timeout: '15 minutes',
            goal: `Find the issues behind ${source}.`,
          }).pipe(
            Effect.provide(
              Fractal.Worker.layer(prReviewer),
            ),
          ),
        ],
        // Gather test results and context at the same
        // time
        { concurrency: 'unbounded' },
      )
      // Back the review with test results and context
      yield* Fractal.step(
        {
          id: 'review',
          timeout: '30 minutes',
          goal: 'Publish findings with evidence.',
        },
        Fractal.gate({
          name: 'review published',
          document: 'doc/github/review',
        }),
      ).pipe(
        Effect.provide(
          Fractal.Worker.layer(prReviewer),
        ),
      )
      yield* Fractal.step(
        { id: 'sign-off' },
        Fractal.ask({
          name: 'You sign off the review',
          reviewer: you,
          question: 'Is this review ready to share?',
          timeout: '30 minutes',
        }).pipe(
          // Require your approval before signing off
          Effect.filterOrFail(
            (answer) => answer._tag === 'Approved',
            () => new Unsigned(),
          ),
          Effect.catchTag(
            'TimedOut',
            () => new Unsigned(),
          ),
        ),
      )
    }),
)
import { Fractal } from 'fractal/effect'

/** Runs the pull request and its tests. */
export const prTester = Fractal.agent({
  id: 'pr-tester',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/review',
  harness: {
    kind: 'codex',
    model: 'gpt-5.6-sol',
    effort: 'medium',
  },
})

/** Reads the change and writes the review. */
export const prReviewer = Fractal.agent({
  id: 'pr-reviewer',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/review',
  harness: {
    kind: 'claude',
    model: 'claude-opus-5',
    effort: 'high',
  },
})

/** You decide whether to sign off the review. */
export const you = Fractal.person({ id: 'you' })
import reviewPrs from '#missions/review-prs'
import { Effect, Layer } from 'effect'
import { Fractal } from 'fractal/effect'

const adapters = Layer.mergeAll(
  // Start each agent with its chosen harness
  Fractal.Harness.local,
  Fractal.Workspace.local,
  Fractal.Host.local,
)

/** Run locally with the required tools. */
export const runtime = Fractal.Engine.local.pipe(
  // Keep these tools available to mission steps
  Layer.provideMerge(adapters),
)

/** Start the mission or resume saved work. */
export const main = Fractal.run(reviewPrs, {
  source: 'resource/github/acme/app/pull/42',
}).pipe(Effect.provide(runtime))
// A pull request is ready for review.
// A tester and reviewer gather the evidence.
// You decide whether to sign off the review.
version 2
mission "review-prs" state="ready" \
    timeout="2h" report-to="agent/pr-reviewer" {
  goal "The PR has an evidence-backed review."
  constraint "Review only. Never approve or merge."
  // The input keeps the review tied to one PR
  input "source" kind="resource"
  // Tests and context can be gathered independently
  step "reproduce" timeout="20m" {
    assigned-to "agent/pr-tester"
    goal "Run the tests of ${input.source}."
  }
  step "context" timeout="15m" {
    assigned-to "agent/pr-reviewer"
    goal "Find the issues behind ${input.source}."
  }
  // Findings need both test results and context
  step "review" timeout="30m" {
    assigned-to "agent/pr-reviewer"
    depends-on {
      step "reproduce" completed
      step "context" completed
    }
    goal "Publish findings with evidence."
    gate "review published" {
      document "doc/github/review"
    }
  }
  // Sharing the review needs your sign-off
  step "sign-off" timeout="30m" {
    depends-on {
      step "review" completed
    }
    gate "You sign off the review" type="human" {
      reviewer "person/you"
      question "Is this review ready to share?"
    }
  }
}
version 2
// Runs the pull request tests
agent "pr-tester" {
  lifecycle "standing"
  host "local"
  workspace "/work/review"
  harness "codex" {
    model "gpt-5.6-sol"
    effort "medium"
  }
}
// Reviews the pull request with test evidence
agent "pr-reviewer" {
  lifecycle "standing"
  host "local"
  workspace "/work/review"
  // Review decisions use high effort
  harness "claude" {
    model "claude-opus-5"
    effort "high"
  }
}
person "you"

Runmission-run/review-prs/acme-app-1287

reproduceruns the tests$contextlinked issuesreviewfindings + evidencedoc ✓sign-offYouapproved ✓reproduce$contextreviewdoc ✓sign-offapproved ✓

3/3sign-off1h / 1h

// A flaky test needs a reliable repair.
// Three setups try the same task and tests.
// A judge checks the ranked comparison report.

import {
  contender,
  evalJudge,
} from '#agents/eval-flaky-test'
import { Schema } from 'effect'
import { Fractal } from 'fractal'

const setups = [
  'codex',
  'claude',
  'candidate',
] as const

// Check the report shape before returning it
const Report = Schema.Struct({
  ranking: Schema.Array(Schema.Literal(...setups)),
  summary: Schema.String,
})

/** Compare repairs for the same flaky test. */
export default Fractal.mission(
  {
    id: 'eval-flaky-test',
    state: 'ready',
    timeout: '20m',
    reportTo: evalJudge,
    goal: "One report compares every setup's fix.",
    constraints: [
      'Never disable harness features to pass.',
    ],
    success: Report,
  },
  async () => {
    // Use the same task and tests for a fair
    // comparison
    await Promise.all(
      setups.map((setup) =>
        Fractal.Worker.provide(contender(setup), () =>
          Fractal.step(
            {
              id: setup,
              timeout: '10m',
              goal: 'Fix the flaky test in acme/app.',
            },
            () =>
              Fractal.gate({
                name: 'the suite passes',
                exec: ['pnpm', 'test'],
                timeout: '5m',
              }),
          ),
        ),
      ),
    )
    return Fractal.Worker.provide(evalJudge, () =>
      Fractal.step(
        {
          id: 'compare',
          timeout: '5m',
          goal: 'Compare the diffs and test runs.',
          success: Report,
        },
        () =>
          Promise.all([
            Fractal.gate({
              name: 'report published',
              document: 'doc/eval/flaky-test/report',
            }),
            // Check that the comparison treats each
            // fix fairly
            Fractal.gate({
              name: 'the report is fair',
              llm: {
                model: 'gpt-5.6-sol',
                tools: ['shell', 'git'],
                tokenBudget: 20_000,
                timeLimit: '4m',
                prompt:
                  'Is the report fair to each diff?',
              },
            }),
          ]),
      ),
    )
  },
)
import { Fractal } from 'fractal'

const harnesses = {
  codex: {
    kind: 'codex',
    model: 'gpt-5.6-sol',
    effort: 'medium',
  },
  claude: {
    kind: 'claude',
    model: 'claude-opus-5',
    effort: 'medium',
  },
  // Change this setup to compare another harness
  candidate: { kind: 'opencode', model: 'kimi-k3' },
} as const

/** Creates one repair contender per setup. */
export const contender = (
  setup: keyof typeof harnesses,
) =>
  Fractal.agent({
    id: `${setup}-contender`,
    lifecycle: 'bounded',
    host: 'local',
    workspace: `/work/eval/${setup}`,
    harness: harnesses[setup],
  })

/** Compares the repairs and ranks them. */
export const evalJudge = Fractal.agent({
  id: 'eval-judge',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/eval',
  harness: {
    kind: 'claude',
    model: 'claude-opus-5',
    effort: 'high',
  },
})
import evalFlakyTest from '#missions/eval-flaky-test'
import { Fractal } from 'fractal'

/** Run locally with the required tools. */
export const runtime = Fractal.runtime({
  engine: Fractal.Engine.local(),
  // Start each agent with its chosen harness
  harness: Fractal.Harness.local(),
  workspace: Fractal.Workspace.local(),
  host: Fractal.Host.local(),
})

/** Start the mission or resume saved work. */
export const main = () =>
  Fractal.run(evalFlakyTest, { runtime })
// A flaky test needs a reliable repair.
// Three setups try the same task and tests.
// A judge checks the ranked comparison report.

import {
  contender,
  evalJudge,
} from '#agents/eval-flaky-test'
import { Command } from '@effect/platform'
import { Effect, Schema } from 'effect'
import { Fractal } from 'fractal/effect'

const setups = [
  'codex',
  'claude',
  'candidate',
] as const

// Check the report shape before returning it
const Report = Schema.Struct({
  ranking: Schema.Array(Schema.Literal(...setups)),
  summary: Schema.String,
})

/** Compare repairs for the same flaky test. */
export default Fractal.mission(
  {
    id: 'eval-flaky-test',
    state: 'ready',
    timeout: '20 minutes',
    reportTo: evalJudge,
    goal: "One report compares every setup's fix.",
    constraints: [
      'Never disable harness features to pass.',
    ],
    success: Report,
  },
  () =>
    Effect.gen(function* () {
      // Use the same task and tests for a fair
      // comparison
      yield* Effect.forEach(
        setups,
        (setup) =>
          Fractal.step(
            {
              id: setup,
              timeout: '10 minutes',
              goal: 'Fix the flaky test in acme/app.',
            },
            Fractal.gate({
              name: 'the suite passes',
              exec: Command.make('pnpm', 'test'),
              timeout: '5 minutes',
            }),
          ).pipe(
            Effect.provide(
              Fractal.Worker.layer(contender(setup)),
            ),
          ),
        { concurrency: 'unbounded' },
      )
      return yield* Fractal.step(
        {
          id: 'compare',
          timeout: '5 minutes',
          goal: 'Compare the diffs and test runs.',
          success: Report,
        },
        Effect.all([
          Fractal.gate({
            name: 'report published',
            document: 'doc/eval/flaky-test/report',
          }),
          // Check that the comparison treats each fix
          // fairly
          Fractal.gate({
            name: 'the report is fair',
            llm: {
              model: 'gpt-5.6-sol',
              tools: ['shell', 'git'],
              tokenBudget: 20_000,
              timeLimit: '4 minutes',
              prompt:
                'Is the report fair to each diff?',
            },
          }),
        ]),
      ).pipe(
        Effect.provide(
          Fractal.Worker.layer(evalJudge),
        ),
      )
    }),
)
import { Fractal } from 'fractal/effect'

const harnesses = {
  codex: {
    kind: 'codex',
    model: 'gpt-5.6-sol',
    effort: 'medium',
  },
  claude: {
    kind: 'claude',
    model: 'claude-opus-5',
    effort: 'medium',
  },
  // Change this setup to compare another harness
  candidate: { kind: 'opencode', model: 'kimi-k3' },
} as const

/** Creates one repair contender per setup. */
export const contender = (
  setup: keyof typeof harnesses,
) =>
  Fractal.agent({
    id: `${setup}-contender`,
    lifecycle: 'bounded',
    host: 'local',
    workspace: `/work/eval/${setup}`,
    harness: harnesses[setup],
  })

/** Compares the repairs and ranks them. */
export const evalJudge = Fractal.agent({
  id: 'eval-judge',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/eval',
  harness: {
    kind: 'claude',
    model: 'claude-opus-5',
    effort: 'high',
  },
})
import evalFlakyTest from '#missions/eval-flaky-test'
import { Effect, Layer } from 'effect'
import { Fractal } from 'fractal/effect'

const adapters = Layer.mergeAll(
  // Start each agent with its chosen harness
  Fractal.Harness.local,
  Fractal.Workspace.local,
  Fractal.Host.local,
)

/** Run locally with the required tools. */
export const runtime = Fractal.Engine.local.pipe(
  // Keep these tools available to mission steps
  Layer.provideMerge(adapters),
)

/** Start the mission or resume saved work. */
export const main = Fractal.run(evalFlakyTest).pipe(
  Effect.provide(runtime),
)
// A flaky test needs a reliable repair.
// Three setups try the same task and tests.
// A judge checks the ranked comparison report.
version 2
mission "eval-flaky-test" state="ready" \
    timeout="20m" report-to="agent/eval-judge" {
  goal "One report compares every setup's fix."
  constraint "Never disable harness features to pass."
  // The same task and tests make repairs comparable
  step "codex" timeout="10m" {
    assigned-to "agent/codex-contender"
    goal "Fix the flaky test in acme/app."
    gate "the suite passes" {
      exec "pnpm test"
      host "local"
      workspace "/work/eval/codex"
      time-limit "5m"
    }
  }
  step "claude" timeout="10m" {
    assigned-to "agent/claude-contender"
    goal "Fix the flaky test in acme/app."
    gate "the suite passes" {
      exec "pnpm test"
      host "local"
      workspace "/work/eval/claude"
      time-limit "5m"
    }
  }
  step "candidate" timeout="10m" {
    assigned-to "agent/candidate-contender"
    goal "Fix the flaky test in acme/app."
    gate "the suite passes" {
      exec "pnpm test"
      host "local"
      workspace "/work/eval/candidate"
      time-limit "5m"
    }
  }
  // Ranking needs results from all three setups
  step "compare" timeout="5m" {
    assigned-to "agent/eval-judge"
    depends-on {
      step "codex" completed
      step "claude" completed
      step "candidate" completed
    }
    goal "Compare the diffs and test runs."
    gate "report published" {
      document "doc/eval/flaky-test/report"
    }
    // A separate check keeps the ranking fair
    gate "the report is fair" type="llm" {
      model "gpt-5.6-sol"
      host "local"
      workspace "/work/eval"
      tools "shell" "git"
      token-budget 20000
      time-limit "4m"
      prompt "Is the report fair to each diff?"
    }
  }
}
version 2
// Repairs the flaky test with the Codex setup
agent "codex-contender" {
  lifecycle "bounded"
  host "local"
  workspace "/work/eval/codex"
  harness "codex" {
    model "gpt-5.6-sol"
    effort "medium"
  }
}
// Repairs the flaky test with the Claude setup
agent "claude-contender" {
  lifecycle "bounded"
  host "local"
  workspace "/work/eval/claude"
  harness "claude" {
    model "claude-opus-5"
    effort "medium"
  }
}
// Repairs the flaky test with the candidate setup
agent "candidate-contender" {
  lifecycle "bounded"
  host "local"
  workspace "/work/eval/candidate"
  // This setup changes between comparison runs
  harness "opencode" {
    model "kimi-k3"
  }
}
// Compares the repairs and publishes a ranked report
agent "eval-judge" {
  lifecycle "standing"
  host "local"
  workspace "/work/eval"
  harness "claude" {
    model "claude-opus-5"
    effort "high"
  }
}

Runmission-run/eval-flaky-test/candidate-7

codexcodex-contendertests ✓claudeclaude-contendertests ✓candidateyour new setuptests ✓compareone reportdoc ✓llm ✓codextests ✓claudetests ✓candidatetests ✓comparedoc ✓llm ✓

2/2compare13m / 13m

02Clients

Interact with Fractal your way. From anywhere

Every client reads the same store and sends the same authorized actions. Use the one that fits where you are.

fractal tui · app-deps-bot
 ● live · ⠦ 2 working · fleet ●1 · $ usage                                                 ▢ main ▾
────────────────────────────────────────────────────────────────────────────────────────────────────
  A> app-deps-bot   + 
  ⠦ app-deps-bot  working                                                          codex · studio 
    agent/app-deps-bot                                                                  ⋯ actions 
    mission app · Update Deps › update
 ─────────────────────────────────────────────────────────────────────────────── ◂ ctrl+d details ─
                                                                                                   
  Updating the three outdated packages from the audit, then the tests.                             
                                                                                                   
 ▎ ✓ $ pnpm update parser@3 vitest zod && pnpm test                                                
                                                                                                   
  Parser 3.0 drops the --flag=value syntax and the CLI uses it in three places. Asking the        ┃
  code-reviewer.                                                                                  ┃
                                                                                                  ┃
 ▎ app-deps-bot → code-reviewer  Deps PR  12:17                                                   ┃
 ▎ The dependency update is ready. Can you review it?                                             ┃
                                                                                                  ┃
 ▎ code-reviewer → app-deps-bot  Re: Deps PR  12:17                                               ┃
 ▎ Parser 3.0 drops the old flag syntax. The CLI breaks on it.                                    ┃
                                                                                                  ┃
  You chose 3.0. Moving the CLI to the new flag syntax.                                           ┃
                                                                                                  ┃
 ▎ ▸ 2 tool calls · ⠦1 · ✓1 · last: $ pnpm test cli                                               ┃
                                                                                                  ┃
 ▎ app-deps-bot → code-reviewer  Re: Deps PR  12:17                                               ┃
 ▎ Migrating the CLI to 3.0. Back to you when CI is green.                                        ┃
                                                                                                  ┃
 ── working · ctrl+c twice stops it ─────────────────────────────────── ● live · updated 14s ago ──
 › Message app-deps-bot · type or click

 Keys: ctrl+k open   tab tabs   alt+←→↑↓ splits            0.1.0+local.05b85c02dc · 26 minutes ago 
fractal tui · Update Deps
 ● live · ⠙ 2 working · fleet ●1 · $ usage                                                 ▢ main ▾
────────────────────────────────────────────────────────────────────────────────────────────────────
  A> app-deps-bot   M app · Update Deps   + 
  ⠙ working   app · Update Deps   1m
  mission/app/update-deps  ·  an agent is doing a step now

 ╭─ STEPS ───────────────────────────────────────────────────────────────────────────────────────╮
 │ ████████              2/5 done                                                                │
 │                                                                                               │
 │ ▸ ▰ audit         done       app-deps-bot · agent/app-deps-bot     1m                         │
 │ ▸ ▰ choose-parser done       You · person/you                      1m                         │
 │ ▸ ⠙ changelogs    working    code-reviewer · agent/code-reviewer   1m                         │
 │ ▸ ⠙ update        working    app-deps-bot · agent/app-deps-bot     1m                         │
 │ ▸ ◐ review        waiting    code-reviewer · agent/code-reviewer   1m                         │
 │ click a step to open it                                                                       │
 ╰───────────────────────────────────────────────────────────────────────────────────────────────╯
 ╭─ AGENTS · 2 ──────────────────────────────────────────────────────────────────────────────────╮
 │ ⠙ app-deps-bot       working    codex   on studio · 1m                                        │
 │ ⠙ code-reviewer      working    codex   on studio · 1m                                        │
 ╰───────────────────────────────────────────────────────────────────────────────────────────────╯
  k The whole declaration 










 Keys: ctrl+k open   tab tabs   alt+←→↑↓ splits            0.1.0+local.05b85c02dc · 26 minutes ago 
fractal tui
 ● live · ◆ 1 alert · ⠇ 0 working · $ usage                                                ▢ main ▾
────────────────────────────────────────────────────────────────────────────────────────────────────
  + 
  ⌨ New terminal     ⇥ Split right ctrl+v    ⤓ Split below ctrl+x 
  somebody is stopped on you  │ ┏━ REQUEST · WAITING 2S ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
▌ ◆ request  Run the invoi…   │ ┃                                                                ┃
▌   step ask-eb90fc10c363a09… │ ┃ Run the invoice migration now?                                 ┃
                              │ ┃ ◆ request · step ask-eb90fc10c363a09739b67c08b4b689e1 is waiting
                              │ ┃ mission  marrowpine/invoice-index                              ┃
                              │ ┃ waits    migrate · Write, rehearse and run the due-date index  ┃
                              │ ┃          migration. — it continues once you answer             ┃
                              │ ┃ agent    Migrator                                              ┃
                              │ ┃                                                                ┃
                              │ ┃ asks  Migrator                                                 ┃
                              │ ┃                                                                ┃
                              │ ┃ It locks invoice saving for about four minutes. Only you can   ┃
                              │ ┃ choose when customers notice.                                  ┃
                              │ ┃                                                                ┃
                              │ ┃  y Yes    n No    c Answer in words    x Dismiss: nothing to do 
                              │ ┃ Migrator is waiting on you: answer it, or x to dismiss it when ┃
                              │ ┃ there is nothing for you to do. Either way the step it waits   ┃
                              │ ┃ on continues.                                                  ┃
                              │ ┃                                                                ┃
                              │ ┃ related ────────────────────────────────────────────────────── ┃
                              │ ┃ raised by Migrator · agent/marrowpine/migrator                 ┃
                              │ ┃ step-run  step-run/ab14098d7c5162c8b8d5dcab52389e00/ask-eb90fc10
                              │ ┃                                                                ┃
                              │ ┃  t Chat about this    g Go to the mission                      ┃
                              │ ┃                                                                ┃
──────────────────────────────│ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
 ◆ decide    ✕ fault     ✉ mes│
 Keys: ctrl+k open   tab tabs   alt+←→↑↓ splits             0.1.0+local.80f81ea4f9 · 3 minutes ago 
fractal tui · ctrl+k
 ● live · ◆ 1 alert · ⠋ 0 working · fleet ●1 · $ usage                                     ▢ main ▾
────────────────────────────────────────────────────────────────────────────────────────────────────
  +     ╭─ open in a new tab ──────────────────────────────────────────────────────────────╮
  ⌨ New │ › ▏                                                                              │
  somebo│ alerts                                                                           │━━━━━┓
▌ ◆ requ│ ▌◆ Inbox                                                     alerts and updates  │     ┃
▌   step│  ◔ Usage                                             spend by agent, mission, …  │     ┃
        │  ◆ Run the invoice migration now?                                       request  │aiting
        │ agents                                                                           │     ┃
        │  ◌ Migrator  marrowpine/migrator                                     ? · studio  │dex  ┃
        │  ◌ On Call  marrowpine/oncall                                        ? · studio  │     ┃
        │  ◌ Reviewer  marrowpine/reviewer                                     ? · studio  │     ┃
        │ missions                                                                         │     ┃
        │  ⠋ marrowpine · Release  marrowpine/release                             working  │     ┃
        │  ◇ marrowpine · Invoice Index  marrowpine/invoice-index               unclaimed  │     ┃
        │ fleet                                                                            │an   ┃
        │  ▦ Fleet                                             every machine, its client…  │     ┃
        │  ● studio                                                          this machine  │     ┃
        │ start                                                                            │to do 
        │  + New mission                                       describe it; a planner dr… │when ┃
        │  + New terminal                                            a shell in a new tab │ts   ┃
        │  + Full conversations                                ctrl+p · tool calls to a … │     ┃
        │  + Conversation first: on                            this device; opening an a… │     ┃
        │  + Fabric only, no fallback                          terminal routes on this d… │──── ┃
        │ spaces                                                                           │     ┃
        │  ● main                                                                   shown  │90fc10
        │ enter open · ctrl+v split right · ctrl+x split below · ctrl+t tab · ctrl+g space │     ┃
        ╰──────────────────────────────────────────────────────────────────────────────────╯     ┃
                              │ ┃                                                                ┃
──────────────────────────────│ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
 ◆ decide    ✕ fault     ✉ mes│
 Keys: ctrl+k open   tab tabs   alt+←→↑↓ splits             0.1.0+local.80f81ea4f9 · 3 minutes ago 
The Fractal web app on demo data. On the left, the agent roster: WorkbenchShell is selected and working on build-host-a, MissionsUi and DocsWriter need you. On the right, WorkbenchShell’s thread: Priya’s request to fix the focus bug in #214, a failed command, a message from missions-ui, the usage line and the fix pushed to #214. The composer reads “This view cannot send messages.”The Fractal web app at phone width on demo data: WorkbenchShell’s thread, running for 10 minutes, with a failed command, a message from missions-ui, the usage line and the fix pushed to #214. The composer reads “This view cannot send messages.”
The Fractal web app on demo data. On the left, the agent roster: WorkbenchShell is selected and working on build-host-a, MissionsUi and DocsWriter need you. On the right, WorkbenchShell’s thread: Priya’s request to fix the focus bug in #214, a failed command, a message from missions-ui, the usage line and the fix pushed to #214. The composer reads “This view cannot send messages.”The Fractal web app at phone width on demo data: WorkbenchShell’s thread, running for 10 minutes, with a failed command, a message from missions-ui, the usage line and the fix pushed to #214. The composer reads “This view cannot send messages.”

The Fractal web app, running in this page on demo data. Click around: it is connected to no fleet.

The Fractal iOS app’s Now tab, live on the harbor demo fleet. It reads “4 alerts”. Under “somebody is stopped on you · 3”: Approve the widget release (review, waited 45m), Which region should the canary use? (request from Ember, waited 11m) and Pick the release name (request, waited 17m). Under “today · 1”: Plan: tidy the docs site (launch, waited 1h). Tabs at the bottom: Now with a badge of 4, Resources, Fleet and Spaces.The Fractal iOS app’s Now tab, live on the harbor demo fleet. It reads “4 alerts”. Under “somebody is stopped on you · 3”: Approve the widget release (review, waited 45m), Which region should the canary use? (request from Ember, waited 11m) and Pick the release name (request, waited 17m). Under “today · 1”: Plan: tidy the docs site (launch, waited 1h). Tabs at the bottom: Now with a badge of 4, Resources, Fleet and Spaces.
A conversation with the agent Beacon in the Fractal iOS app, running codex on harbor for the mission example/beacon/ship-widgets, step build. You ask why the widget build is slow. Beacon times compile, link and package, runs make, and finds that linking takes 80% of the time because the lto flag is on in debug builds. Turning it off cuts the build from 4m to 50s. A note says message delivery paused twice while Fractal restarted and recovered. Atlas tells Beacon to ship after the canary, Beacon edits build/profiles.toml, you say “Nice work. Open a PR when it is ready.” and Beacon runs cargo test. A message composer sits at the bottom.
Claude Code · depiction
> what needs me in fractal? ● Bash(fractal now)  ⎿  1 alert     request   Run the invoice migration now?               from marrowpine/migrator · just now ● One ask, from the migrator. It wants to run the invoice migration. It locks invoice saving for about four minutes. You pick when. > run it tonight at 2am ● Bash(fractal work done step-run/ab14…/ask-eb90… --as person/robin --summary "Run it tonight at 2am") ● Answered. The migrator has your time. Review runs after it.>  
Codex · depiction
› how is the invoice index going?• Ran fractal missions show marrowpine/invoice-index  └ STATE     running · normal    PROGRESS  0/3 completed · 1 ready · 0 active · 0 blocked    · waiting-person migrate — migrate · marrowpine/migrator    · pending    review — review · marrowpine/reviewer    … +11 lines ─ Worked for 2s • It waits on you. The migrator rehearsed it and found a 4 minute write lock on invoices, so it asked you when to run it. Review starts once the migration is done. Want me to answer it?›  
OpenCode · depiction
how is the release going?  $ fractal missions show marrowpine/release  MISSION  marrowpine/release  STATE     running · normal    progress: Tests pass, packaging the release   On-call is on the build step. Tests pass and it is packaging Marrowpine 2.3 now. Nothing there needs you. The one open ask is the invoice migration.   ▣ Build · 3s 

Grok Bot · depiction

  1. Robin:

    What needs me right now?

  2. Grok Bot:

    One ask, from the migrator.

    Run the invoice migration now?

    It locks invoice saving for about four minutes. Only you can choose when customers notice.

    marrowpine/migrator · invoice-index

    Want me to answer it for you?

What you could build on Fractal’s Client API.

Muse · depiction

  1. Robin:

    How is the release going?

  2. Muse:

    Marrowpine 2.3 is on its build step. On-call says the tests pass and it is packaging the release now.

  3. Robin:

    Anything holding it up?

  4. Muse:

    No. The only open ask is the invoice migration, and that is a different mission.

What you could build on Fractal’s Client API.

ChatGPT · depiction

  1. Robin:

    Where is the invoice index?

  2. ChatGPT:

    Used Fractal

    It is waiting on you. The migrator rehearsed the change and found a 4 minute write lock on invoices.

    It asked when to run it. Review comes after the migration.

Connects through Fractal’s ChatGPT adapter, in early testing.

Dot · depiction

  1. Dot:

    The migrator wants to run the invoice migration. It locks invoice saving for about four minutes. When should it run?

  2. Robin:

    Tonight at 2am.

  3. Dot:

    Done. I told the migrator to run it tonight at 2am.

    Answered · Run the invoice migration now?

What you could build on Fractal’s Client API.

Today: the ChatGPT adapter, loopback onlyIt refuses any non-loopback address and has no auth yet. OAuth comes next.

11 tools

  • fractal_alerts_listreadYour open alerts, with question and options.
  • fractal_alert_getreadOne alert, with its episode and answer options.
  • fractal_alert_answerwriteAnswer one alert with one of its options.
  • fractal_missions_listreadMission metadata.
  • fractal_agents_listreadAgent metadata, or one agent by exact ID.
  • fractal_conversations_listreadConversations and read handles, no content.
  • fractal_conversation_detailreadOne agent’s current conversation, in excerpts.
  • fractal_conversation_timelinereadPage through one conversation’s excerpts.
  • fractal_conversation_searchreadSearch conversation text for snippets.
  • fractal_conversation_readreadOne exact, revision-pinned conversation range.
  • fractal_message_sendwriteSend one message to an agent. Never to a person.

Run it

It talks only to fractal-client.sock and acts as assistant/chatgpt, never as you.

st3-client.sock still works as a legacy alias.

zsh · serves POST /mcp
$ st-chatgpt --socket <state>/fractal-client.sock \
    --credential-file <credential-file> \
    --listen 127.0.0.1:8787
stdio client config · example
{ "mcpServers": { "st-chatgpt": {
  "command": "st-chatgpt",
  "args": ["--transport", "stdio",
    "--socket", "<state>/fractal-client.sock",
    "--credential-file", "<credential-file>"]
} } }

One call · example

POST /mcp
{"jsonrpc":"2.0","id":3,"method":"tools/call",
 "params":{"name":"fractal_alerts_list",
  "arguments":{"max_response_bytes":16384}}}
result.content[0].text, parsed
{ "api_version": "st3.client.v0", …,
  "value": { "kind": "page",
    "collection": "assistant.attention-rich",
    "items": [{ "id": "attention/…",
      "attention_kind": "person-step",
      "person_id": "person/robin",
      "agent_id": "agent/marrowpine/migrator",
      "title": "Run the invoice migration now?",
      "detail": "It locks invoice saving for about four minutes. Only you can choose when customers notice.",
      … }], … } }
@fractal/client · README
import { FractalClient } from '@fractal/client'
import { context, trace } from '@opentelemetry/api'

const client = new FractalClient({
  baseUrl: daemonUrl,
  traceContext: () => {
    const span = trace
      .getSpan(context.active())
      ?.spanContext()
    if (!span) return undefined
    return {
      traceparent: `00-${span.traceId}-${span.spanId}-${span.traceFlags.toString(16).padStart(2, '0')}`,
      tracestate: span.traceState?.serialize(),
    }
  },
})

03Overview

How Fractal works

Agents and missions are code, in KDL (TypeScript soon). Fractal runs them on your machines, records what happens as observations in a graph replicated across them, and every client reads it.

clients read the graph via the client API

  • Web
  • iOS
  • CLI
  • Your own
  • harness.observed working
  • work.progressupdate
  • resource.observedchore(deps): update dependencies · ✓ CI
Declarations
agentapp-deps-bot.ts
import { defineAgent } from 'fractal'

export default defineAgent({
  name: 'app-deps-bot',
  workspace: '/work/app',
  restart: 'always',
  harness: { name: 'codex' },
})
missionupdate-deps.ts
import { defineMission } from 'fractal'

export default defineMission({
  name: 'update-deps',
  state: 'ready',
  goal: 'Dependencies are up to date.',
  steps: [
    {
      name: 'update',
      timeout: '1h',
      assignedTo: 'agent/app-deps-bot',
      goal: 'A deps PR with CI green.',
    },
  ],
})
agentapp-deps-bot.kdl
version 2
agent "app-deps-bot" {
  workspace "/work/app"
  restart "always"
  harness "codex" {}
}
missionupdate-deps.kdl
version 2
mission "update-deps" state="ready" {
  goal "Dependencies are up to date."
  step "update" timeout="1h" {
    assigned-to "agent/app-deps-bot"
    goal "A deps PR with CI green."
  }
}

StoreSQLite

declarations

  • app-deps-bot
  • update-deps

observations

  • harness.observed
  • work.progress
  • resource.observed

local, not replicated

  • harness.timeline

reconciles declarations into running agents

Observations

  • agentapp-deps-bot workingCodex transcript
    harness.observed
    working
    harness.timelinelocal
    tool_call
  • missionupdate-depsstep update · claimed
    work.claimed
    update
    work.progress
    update
  • GitHubrepository chore(deps): update dependencies✓ CI · issues
    resource.observed
  • Plugins

    • Linearplugin · plannedissues
      resource.observed

your machinesgraph replicated across them

  1. laptopfractal setup
  2. dev serverfractal setup
  3. cloud VMfractal setup
The same dependency update, task driven and mission driven. In one, done is what the agent says and every round goes through you. In the other, gates verify each step and you decide.

Task drivena prompt at a time

  1. youPrompt: update the dependencies.
  2. agent“Done, everything is updated.”
  3. youRun the tests yourself. The CLI is broken.
  4. youPrompt: fix the old flag syntax in the CLI.
  5. agent“Done, fixed.”
  6. youRun the tests again, read the diff, merge.

Done means the agent said so. You check every round.

Mission drivenmission/app/update-deps

  1. youDeclare update-deps: its goal, steps and gates.
  2. agentClaims update and reports it complete.
  3. gateverify fails: the CLI breaks on parser 3.0.
  4. youRevise: add migrate-cli, generation 2.
  5. gateverify runs again on migrate-cli and passes.
  6. youApprove the release at the human gate in Now.

Done means the gates passed. You set the intent and decide.

Agents message each other. When one needs a decision, it asks a person, and the answer goes back into the work.
  1. code-reviewer
  2. app-deps-bot
  3. YouNow · clear
  1. app-deps-bot to code-reviewer, message The dependency update is ready. Can you review it?

  2. code-reviewer to app-deps-bot, message Parser 3.0 drops the old flag syntax. The CLI breaks on it.

  3. app-deps-bot to You, ask Ship parser 3.0 and migrate the CLI, or hold at 2.x?

  4. You to app-deps-bot, answer Ship 3.0 and migrate the CLI.

  5. app-deps-bot to code-reviewer, message Migrating the CLI to 3.0. Back to you when CI is green.

update-deps · step update working

Providers keep a twin of the outside world in the graph. They record what changed on GitHub, in your files or in a system you plug in, and gates check those facts.
import { Effect, Schema } from 'effect'
import { Fractal } from 'fractal/effect'

import { ciFixer } from './agents'

const pullRequest = Fractal.resource({
  id: 'app/pull/42',
  kind: 'vcs.pull-request',
})

// GitHub's facts, recorded only when they change
const observer = Fractal.observer({
  id: 'pull-request',
  resource: pullRequest,
  provider: 'github.pull-request',
  locator: 'acme/app#42',
  facts: Schema.Struct({
    head: Schema.String,
    checks: Schema.Array(
      Schema.Struct({
        name: Schema.String,
        conclusion: Schema.NullOr(Schema.String),
      }),
    ),
  }),
})

/** Get pull request acme/app#42 to green checks. */
export default Fractal.mission(
  {
    id: 'green-pull-request',
    state: 'ready',
    timeout: '6 hours',
    reportTo: ciFixer,
    goal: 'Every check on acme/app#42 passes.',
    constraints: [
      'Push to the PR branch only. Never merge.',
    ],
    observers: [observer],
  },
  () =>
    Effect.gen(function* () {
      yield* Fractal.step({
        id: 'fix',
        timeout: '1 hour',
        goal: 'Fix the failing checks and push.',
        constraints: [
          'Do not poll. The mission waits.',
        ],
      }).pipe(
        Effect.provide(
          Fractal.Worker.layer(ciFixer),
        ),
      )
      // No agent, the gates wait on the recorded facts
      yield* Fractal.step(
        { id: 'checks-green' },
        Effect.all([
          // Every check of none would pass trivially
          Fractal.gate({
            name: 'the head has checks',
            nonEmpty: {
              list: 'checks',
              of: pullRequest,
            },
          }),
          Fractal.gate({
            name: 'every check passed',
            every: { list: 'checks', of: pullRequest },
            where: {
              field: 'conclusion',
              is: 'success',
            },
          }),
        ]),
      )
    }),
)
import { Fractal } from 'fractal/effect'

/** Fixes the pull request in the app checkout. */
export const ciFixer = Fractal.agent({
  id: 'ci-fixer',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/app',
  harness: {
    kind: 'codex',
    model: 'gpt-5.6-sol',
    effort: 'medium',
  },
})
import { Schema } from 'effect'
import { Fractal } from 'fractal'

import { ciFixer } from './agents'

const pullRequest = Fractal.resource({
  id: 'app/pull/42',
  kind: 'vcs.pull-request',
})

// GitHub's facts, recorded only when they change
const observer = Fractal.observer({
  id: 'pull-request',
  resource: pullRequest,
  provider: 'github.pull-request',
  locator: 'acme/app#42',
  facts: Schema.Struct({
    head: Schema.String,
    checks: Schema.Array(
      Schema.Struct({
        name: Schema.String,
        conclusion: Schema.NullOr(Schema.String),
      }),
    ),
  }),
})

/** Get pull request acme/app#42 to green checks. */
export default Fractal.mission(
  {
    id: 'green-pull-request',
    state: 'ready',
    timeout: '6h',
    reportTo: ciFixer,
    goal: 'Every check on acme/app#42 passes.',
    constraints: [
      'Push to the PR branch only. Never merge.',
    ],
    observers: [observer],
  },
  async () => {
    await Fractal.Worker.provide(ciFixer, () =>
      Fractal.step({
        id: 'fix',
        timeout: '1h',
        goal: 'Fix the failing checks and push.',
        constraints: [
          'Do not poll. The mission waits.',
        ],
      }),
    )
    // No agent, the gates wait on the recorded facts
    await Fractal.step(
      { id: 'checks-green' },
      () =>
        Promise.all([
          // Every check of none would pass trivially
          Fractal.gate({
            name: 'the head has checks',
            nonEmpty: {
              list: 'checks',
              of: pullRequest,
            },
          }),
          Fractal.gate({
            name: 'every check passed',
            every: { list: 'checks', of: pullRequest },
            where: {
              field: 'conclusion',
              is: 'success',
            },
          }),
        ]),
    )
  },
)
import { Fractal } from 'fractal'

/** Fixes the pull request in the app checkout. */
export const ciFixer = Fractal.agent({
  id: 'ci-fixer',
  lifecycle: 'standing',
  host: 'local',
  workspace: '/work/app',
  harness: {
    kind: 'codex',
    model: 'gpt-5.6-sol',
    effort: 'medium',
  },
})
// Get pull request acme/app#42 to green checks.
version 2
resource "app/pull/42" {
  kind "vcs.pull-request"
}
mission "green-pull-request" state="ready" \
    timeout="6h" report-to="agent/ci-fixer" {
  goal "Every check on acme/app#42 passes."
  constraint "Push to the PR branch only. Never merge."
  // GitHub's facts, recorded only when they change
  observer "pull-request" {
    resource "resource/app/pull/42"
    provider "github.pull-request"
    locator "acme/app#42"
    field "head"
    field "checks"
  }
  step "fix" timeout="1h" {
    assigned-to "agent/ci-fixer"
    goal "Fix the failing checks and push."
    constraint "Do not poll. The mission waits."
  }
  // No agent, the gates wait on the recorded facts
  step "checks-green" {
    depends-on {
      step "fix" completed
    }
    // Non-empty: not every check has a fake status
    gate "the head has checks" {
      not-every "checks" "resource/app/pull/42" {
        field "status" "is" "no-such-status"
      }
    }
    gate "every check passed" {
      every "checks" "resource/app/pull/42" {
        field "conclusion" "is" "success"
      }
    }
  }
}
// Fixes the pull request in the app checkout.
version 2
agent "ci-fixer" {
  lifecycle "standing"
  host "local"
  workspace "/work/app"
  harness "codex" {
    model "gpt-5.6-sol"
    effort "medium"
  }
}

Outside worldobserved by providers

  • GitHub

    acme/app#42

    checks passedgithub.pull-requestbuilt in
  • Your files

    config.toml

    readylocal.filebuilt in
  • Sentry

    or any system

    describe() · observe()Planned: providers you write

providers pollpolled: nothing changed, nothing recordedchecks passed on GitHubpolled: checks changed, resource.observed

Graph

  • vcs.pull-request · acme/app#42checks success
  • filesystem.file · config.tomlstatus ready
  • your kindfacts your provider publishes
  1. fix pushed
  2. checks-green passed
  3. mission done, no agent watched the checks
Same mission, swapped parts. The harness and then the machine change underneath while the run and its steps stay in the graph.

update-depsrun 1 running

  1. prepare
  2. update
  3. verify
  4. pull request

app-deps-bot

harness

  • Claude Code
  • Codex
  • OpenCode

machine

  • laptop
  • dev server
  • cloud VM

04Signal over noise

Stop drowning in agent chats and PR reviews. Focus on what matters

Running dozens of agents by hand buries you in chats, pull requests and pings. Four views of the same work, the old way beside the Fractal way.

Agent chats

Agents ask for a decision in Now instead of waiting in a chat for you to notice. Messages stay conversation.

The old way

A session per agent. Which one is waiting on you?

With Fractal

Now lists the asks, ordered by who is stopped on you.

Pull requests

A new pull request head in a watched repository starts a review mission. Reviews run without you, and a human gate asks you only where you declared one.

The old way

Each pull request waits for your review.

With Fractal

Reviews run on their own. Only the gate reaches you.

Finished work

An agent saying done is a report, not a verdict. A step passes only when every gate you declared passes.

The old way

The agent says done. CI says otherwise.

With Fractal

The step passes only when its gates pass.

Terminals

One roster for every agent: whether it is ready, the step it holds and what is queued next.

The old way

A pane per agent, a window per machine.

With Fractal

One row per agent, read from the graph.

05Showcase

What you can build with Fractal

The same agents, missions and graph, put to work beyond a single mission.

A factory that improves itself

Agents can publish and revise the missions and agents they run in. Point one at failed runs and stuck gates, and it proposes the change for you to approve.

See it in Missions →

agent
# run by an agent, as itself
fractal apply missions/maintainer.kdl --dry-run
fractal apply missions/maintainer.kdl

Evals from your missions

Run a mission across harnesses, models or setups. The same gates score every run, side by side.

See it in Missions →

eval/flaky-test · 10 runs per setup
setuppassedroundstokenstime
codexgpt-5.6-sol8/102.1170k6m 30s
claudeclaude-opus-59/101.5147k5m 24s
candidatekimi-k36/103.1108k8m 30s

gate · the suite passes · averages per runillustrative · from run, gate and usage records

Client experiences for your team

Build the dashboard, bot or app your team needs on @fractal/client. It reads the same live store and sends the same actions as Fractal’s own clients.

Planned · @fractal/client on npmClient API →

client.ts
import { FractalClient } from '@fractal/client'

const client = new FractalClient({
  baseUrl: daemonUrl,
})

Workflows that change while they run

Agents create and start missions at runtime. Revise a running mission and finished work carries over while the changed steps run again.

terminal
fractal work revise \
  mission-run/garden/readme/one \
  missions/readme-v2.kdl \
  --as person/you \
  --reason 'Check every relative link.'

Step away while agents keep working

An ask pauses only the step that raised it. Everything else keeps going, and you answer from the iOS app when you’re back.

Planned · Push alerts for asks

Now · needs you

Run the invoice migration now?

migrator · invoice-index

  • migrate waits for you
  • release keeps building

Integrations that start work

Observers watch GitHub and local files without spending agent turns. A change becomes a resource.observed claim that can start a mission.

Plugins →

intake.kdl
subscription "pull-requests" {
  observer "observer/repository"
  on "pull_requests"
  delivery "mission" {
    mission "example/app/review-pull-request"
  }
}

One factory across your machines

Join your machines into one fleet. Missions and work replicate to every machine. Live conversations and terminals stay with the machine that owns them.

terminal
# on studio
fractal fleet invite beacon --via tailscale
# on beacon
fractal fleet join --transports tailscale

06Observability

Full data about your software factory

Every step, agent turn, gate result and token count is a claim in one graph. Here is one factory over 14 days, by mission, agent and person, down to one open run, all drawn from the same claims.

factory acme

13 to 26 Oct 2026 · 14 days

throughput runs finished per day

2.5 a day 35 finished, 1 open

the open run, since 13:58 today

lead time created → completed

2h 50m p50 p90 4h 14m

  • < 1h9
  • 1–2h6
  • 2–3h4
  • 3–4h11
  • 4–5h4
  • 5h +1

the open run, 2h 33m so far

human attention time runs waited on a person

57m a day 1.9 asks a day

answered waiting on You · asks above

spend on the day a run finished

$3.64 a day $1.39 per finished run

open run · 2.90M tokens a day, 1.11M per finished run

runs
36 35 finished, 1 open
missions
26 in 7 categories
tokens
40.61M 1.72M on the open run
cost
$50.90 API-equivalent
asks
26 of 4 people
waited
13h 21m 6m still open

Derived from mission run, gate, attention and usage claims of the last 14 days. Cost is API-equivalent.

missionrunslead p50first trywaited cost open runtokenscost

  • collab 8 missions83h 46m77%4h 40m8 runs · p50 3h 46m · 77% first try · 4h 40m waited14.13M$18.96
  • search 3 missions54h 14m68%4h 20m5 runs · p50 4h 14m · 68% first try · 4h 20m waited10.50M$12.48
  • billing 6 missions72h 56m88%2h 32m7 runs · p50 2h 56m · 88% first try · 2h 32m waited8.77M$10.12
  • flaky 3 missions61h 01m83%–6 runs · p50 1h 01m · 83% first try2.58M$4.82
  • ios 2 missions31h 36m86%1h 20m3 runs · p50 1h 36m · 86% first try · 1h 20m waited2.63M$3.91
  • docs 2 missions338m100%29m3 runs · p50 38m · 100% first try · 29m waited500.0k$0.34
  • deps 2 missions450m88%–4 runs · p50 50m · 88% first try1.50M$0.27
  • factory 26 missions362h 50m80%13h 21m36 runs · p50 2h 50m · 80% first try · 13h 21m waited40.61M$50.90

Derived from mission run, step, gate, attention and usage claims of the last 14 days, by mission category. Cost is API-equivalent.

group by

agentruns · model · machine output input cachedtokenscost

  • api-dev20 runs · claude-sonnet-5 · studio-114.25M$20.85
  • ios-dev11 runs · claude-sonnet-5 · mini-27.62M$11.39
  • web-dev20 runs · gpt-5.6-sol · studio-111.97M$9.28
  • qa-tester14 runs · claude-sonnet-5 · studio-14.54M$8.49
  • docs-deps-bot3 runs · claude-haiku-5 · mini-2500.0k$0.34
  • LLM gates11 runs · gpt-5.6-sol · studio-1217.2k$0.27
  • app-deps-bot4 runs · gpt-5.6-mini · linux-11.50M$0.27
  • factory36 runs · 6 agents and LLM gates40.61M$50.90

Derived from harness.usage claims of the last 14 days by agent, and gate.result claims for LLM gates, which are not agents. Cost is API-equivalent.

modelruns · provider · used by output input cachedtokenscost

  • claude-sonnet-529 runs · anthropic · api-dev, ios-dev, qa-tester26.42M$40.74
  • gpt-5.6-sol23 runs · openai · web-dev, LLM gates12.19M$9.55
  • claude-haiku-53 runs · anthropic · docs-deps-bot500.0k$0.34
  • gpt-5.6-mini4 runs · openai · app-deps-bot1.50M$0.27
  • factory36 runs · 4 models40.61M$50.90

Derived from harness.usage and gate.result claims of the last 14 days, by the model each names. Cost is API-equivalent.

providerruns · models · used by output input cachedtokenscost

  • anthropic32 runs · 2 models · api-dev, ios-dev, qa-tester, docs-deps-bot26.92M$41.08
  • openai27 runs · 2 models · web-dev, app-deps-bot, LLM gates13.69M$9.82
  • factory36 runs · 2 providers40.61M$50.90

Derived from harness.usage and gate.result claims of the last 14 days, by the provider of each model. Cost is API-equivalent.

machineruns · works there output input cachedtokenscost

  • studio-129 runs · api-dev, web-dev, qa-tester, LLM gates30.98M$38.90
  • mini-214 runs · ios-dev, docs-deps-bot8.12M$11.73
  • linux-14 runs · app-deps-bot1.50M$0.27
  • factory36 runs · 3 machines40.61M$50.90

Derived from harness.usage claims of the last 14 days by host, and gate.result claims on the node that ran the LLM gate. Cost is API-equivalent.

attention per person time each person held runs at a human gate

personwaitedasksp50 an ask

  • You5h 09m1131m
  • chen4h 20m549m
  • ben2h 32m720m
  • dana1h 20m326m
  • everyone13h 21m2629m

answered open now · 10 of 36 runs asked no one

asks per day 13 to 26 Oct, one per human gate

asked still open · a figure counts two asks or more

Derived from attention and human gate claims of the last 14 days.

mission-run/reactions/one

live4 of 5 steps waiting on You · 6m 20s

35 finished runs, oldest first, then this run

  • lead time2h 33m open, so farmedian 2h 50m
  • first-try pass75% −6% vs medianmedian 80%
  • rounds to green1.50 +25% vs medianmedian 1.20
  • people waited6m 20s open, so farmedian 20m 00s
  • tokens1.72M +49% vs medianmedian 1.15M
  • cost$2.29 +73% vs medianmedian $1.33

stepagent · model output input cachedtokenscost

  • apiapi-dev · claude-sonnet-5394.7k$0.58
  • webweb-dev · gpt-5.6-sol476.3k$0.37
  • iosios-dev · claude-sonnet-5604.6k$0.90
  • parityqa-tester · claude-sonnet-5226.6k$0.42
  • ios gateLLM gate · gpt-5.6-sol14.2k$0.02
  • run5 gates passed1.72M$2.29

Derived from mission run, step, gate, attention and usage claims. Cost is API-equivalent.

  1. 16:24:40attention.requestedattention/…-approvetitle=Ship reactions on web and iOS? reviewer=person/you severity=info
  2. 16:24:40gate.requestedgate-operation/…/approve/shipgate=Ship reactions reviewer=person/you question=Ship reactions on web and iOS?
  3. 16:24:37step-run.statestep-run/…/approvestatus=verifying attempt=1
  4. 16:24:36harness.observedagent/qa-testerstate=idle driver=claude
  5. 16:24:36step-run.statestep-run/…/approvestatus=ready attempt=1 readiness_epoch=1
  6. 16:24:35loop.stateloop-run/…/paritystatus=completed round=3 best_round=3
  7. 16:24:30loop.round-resultloop-run/…/parityround=3 status=completed mission_run=mission-run/reactions/one/parity/3
  8. 16:24:25gate.resultgate-operation/…/parity/3gate=parity verdict=pass value.answer=pass
  9. 16:23:25gate.requestedgate-operation/…/parity/3gate=parity status=running attempt=1
  10. 16:14:56work.claimedstep-run/…-parity-3/fixstatus=claimed claimant=agent/qa-tester attempt=1
  11. 16:14:55loop.round-dispatchloop-run/…/parityround=3 dispatch=3 mission_run=mission-run/reactions/one/parity/3
  12. 16:14:50loop.round-resultloop-run/…/parityround=2 status=completed mission_run=mission-run/reactions/one/parity/2
  13. 16:14:45gate.resultgate-operation/…/parity/2gate=parity verdict=fail value.answer=not-yet
  14. 16:13:45gate.requestedgate-operation/…/parity/2gate=parity status=running attempt=1
  15. 16:03:16work.claimedstep-run/…-parity-2/fixstatus=claimed claimant=agent/qa-tester attempt=1
  16. 16:03:15loop.round-dispatchloop-run/…/parityround=2 dispatch=2 mission_run=mission-run/reactions/one/parity/2

40 earlier claims, back to 13:58:02

Every observation is a claim with a kind, a subject and a body.

mission run · reactions2h 32m
step · api38m 18s
turn api-113m 24s
turn api-218m 35s
gate · API tests5m 09s
step · web51m 20s
turn web-114m 49s
turn web-215m 09s
gate · web e2e7m 39s
step · ios1h 13m
turn ios-124m 30s
turn ios-232m 05s
gate · iOS e2e14m 09s
gate · iOS matches the web spec4m 19s
loop · parity35m 14s
round 1 · parity 0.8213m 40s
round 2 · parity 0.9111m 35s
round 3 · parity 1.009m 35s
step · approve6m 24s
human gate · Ship reactions6m 20s
  • step
  • agent turn
  • tool call
  • queued or paused
  • gate
  • pass
  • not yet

round 2 · parity 0.9116:03:15 → 16:14:50 · 11m 35s

mission_run
mission-run/reactions/one/parity/2
metrics.parity
0.91
token_usage
71,900
until · parity
not-yet · 1 of 11 scenarios differs
feedback
doc/loop-feedback/parity/2/outcome

An illustrative timeline derived from claims, not exported spans. OpenTelemetry exports usage logs and counters.

loop parity stops at the first rule it reaches

  • token-budget 300,000226.6k used
  • max-rounds 43 rounds
  • no-progress 20 identicalevery round changed the outcome

time a step's timeout counts only while an agent holds it

  • mission run · 24h2h 33m so far
  • api · timeout 24h32m 30s
  • web · timeout 48h30m 40s
  • ios · timeout 48h57m 12s

LLM gate iOS matches the web spec

  • token-budget 20,00014.2k used

accounts agents stop at 95% weekly

  • acme-claude63% weekly41% of 5 hours
  • acme-openai37% weekly18% of 5 hours

SLOs for the factory Planned

Tokens only. Budgets bound loops, LLM gates and accounts.

  • CLIfractal missions show RUN --json the run and its steps
  • client API{"kind":"subscribe","id":"runs","collection":"missions"} mission summaries, live
  • OpenTelemetry[observations.otlp] endpoint = "…" observations and usage as logs and countersOTEL_EXPORTER_OTLP_ENDPOINT traces of Fractal itself

07Plugins

Plug your world into the factory

Everything is modeled as a resource. A plugin observes one part of your world into the store, gives agents a way to act on it and lets people reach the factory where they already work.

  • GitHub

    Available

    Observes pull requests, issues and CI. New ones start review and triage missions.

  • Linear

    Planned

    Issues and projects become mission intent, and progress flows back as agents work.

  • Slack

    Planned

    Talk to agents in threads, and get the attention items that need you where your team already is.

  • Discord

    Planned

    Reach agents from any channel or DM, with replies attributed to the person who asked.

  • Sentry

    Planned

    New errors start a mission to reproduce, fix and link the pull request.

08Getting started

Adopt it incrementally

Pick the path that fits where you are today.

Not ready to adopt yet? Join the Discord and roll up your sleeves with us.

09FAQ

Common questions

10Community

Join the community and help build Fractal

Everyone is still figuring out software factories. So are we. Fractal is open research: bring your questions, share what works and what doesn’t, and contribute fixes, plugins and ideas.