Skip to content
Français

Coding agent orchestration in TypeScript

Your agents.One TypeScript workflow.

Turn a brief into code, commits and a result you can check. Choose the agent and its sandbox. Connect tasks, tests and decisions in the code of your project.

npm install @elie-laloum/outpost

Node.js 24+ · Git · Docker for the example below

Example workflow

From brief to commit, with every step explicit.

  1. YouDefine the workA repository, a brief and a branch for the task.
  2. AgentRun your agentCodex, Claude Code or another agent in your chosen sandbox.
  3. WorkflowRun your checksYour criteria decide what follows: fix, continue or stop.
  4. YouReview the commitsYou decide which changes to integrate.
A branch for your reviewoutpost/fix-testsThe fix and its commits, ready for review.Build this workflow

One task now. A workflow when you need it.

Section titled “One task now. A workflow when you need it.”

Start by giving Codex a fix in its own Docker sandbox and Git workspace. Your current checkout stays available while the agent works. The named branch keeps the commits for review; this call does not integrate them.

Save these two files in your repository and run node task.ts. The reporter prints progress and token usage; result keeps the answer and commits available to your code. Use a new branch name for each task. Asking the agent to run tests is an instruction; the verification loop adds the check that decides whether to accept the work.

Run your first task to understand the result, then compose a workflow to connect it to the next step.

import { createAgent, createCodexHarness } from "@elie-laloum/outpost";
import { createDockerSandboxProvider } from "@elie-laloum/outpost/providers/docker";

export const coder = createAgent({
  harness: createCodexHarness({ authentication: "account" }),
});
export const sandboxProvider = createDockerSandboxProvider({
  image: "outpost:dev",
});
export const repository = process.cwd();
import { createReporter, dispatch } from "@elie-laloum/outpost";
import { coder, repository, sandboxProvider } from "./outpost.config.ts";

const result = await dispatch({
  repository,
  sandboxProvider,
  agent: coder,
  observe: createReporter(),
  branch: { mode: "named", name: "outpost/fix-tests" },
  brief: { text: "Fix the failing tests, run them and commit the fix." },
});

// Example output:
// [outpost · pass 1] running · codex
// Fixed the failing tests and committed the change.
// [outpost · pass 1] finished · 12.00s · status 0 · input 1200 · cache read 0 · cache write 0 · output 320

Deliver a CSV export, from ticket to branch

Section titled “Deliver a CSV export, from ticket to branch”

A ticket asks for a CSV export of the orders list. A planning agent identifies the files and expected behavior; a coding agent implements the change. Tests and a second agent’s review run in parallel, then their results are collected. A failed check sends its findings back to the coding agent, within three attempts. Once both checks accept the work, the maintainer approves delivery.

Drag to move · Ctrl + scroll to zoom
100 %
  • CSV export ticketExport the filtered orders, including dates and totals. (Maintainer)
    • → Plan the change : brief
  • Plan the changeIdentify the files, CSV format and edge cases to cover. (Agents)
    • → Implement the export : validated plan
  • Implement the exportWrite the code and tests in a dedicated Git workspace. (Agents)
    • → Run the tests : in parallel
    • → Review the diff : in parallel
  • Run the testsRun npm test; collect the exit status and failure output. (Checks)
    • → Collect the verdicts : test result
  • Review the diffA second agent checks the CSV format and returns a structured verdict. (Agents)
    • → Collect the verdicts : review result
  • Collect the verdictsWait for both checks; accept or return their feedback. (Checks)
    • → Implement the export : corrections · up to 3 attempts
    • → Approve delivery : tests and review accepted
    • → Stop the run : attempts exhausted
  • Approve deliveryPause for the maintainer to review the proposed changes. (Maintainer)
    • → Prepare the branch : approved
    • → Stop the run : rejected
  • Prepare the branchCommit the accepted work on outpost/csv-export for integration. (Checks)
  • Stop the runKeep the workspace and findings available for investigation. (Checks)

The dependencies join tests and review before the verdict. The correction loop reuses the workspace; the approval gate stores its pending decision in a checkpoint. Each arrow represents a step your TypeScript code controls.

You don’t need a whole automation platform to get value from an agent. Start with a broken build, a review waiting for attention or maintenance that keeps slipping. These recipes show the agents, checks and results involved.

Keep your tools. Choose how they work together.

Section titled “Keep your tools. Choose how they work together.”

Use Codex for one task, Claude Code for another, or your own agent loop. Choose the execution environment independently. Your workflow is TypeScript you can read, version and extend alongside your project.

What you can build with Outpost

Choose your agents, coordinate their tasks and keep the results available for the next step. Each capability has its own guide.