Your first workflow
Connect an agent task to a function and inspect their typed result.
Pass an agent’s answer to your code
Section titled “Pass an agent’s answer to your code”After your first task, add a second step that reads its result. This lesson uses the same committed README and configuration; it does not need failing tests or a checkpoint.
Save these three files beside outpost.config.ts. The first declares the agent task, the second builds a summary, and the last starts the workflow.
Run the workflow
Section titled “Run the workflow”The agent reads the README first. If that task succeeds, your summary function runs and the script prints its result.
Inspect the answer, branch name and commit count. unwrap() throws if the workflow did not succeed, so the script does not print a successful summary after a failed task. This example asks for no edits and never integrates the branch.
Understand the dependency
Section titled “Understand the dependency”after: [review] makes summary wait and lets it read context.value(review) with the correct TypeScript type. Neither task starts when declared: .start() runs the graph. The isolated task opens and closes its own sandbox; your summary runs in the Node.js process.
This run keeps its outputs in memory. A checkpointed workflow needs JSON outputs from every stored task, including the agent step: follow Save and resume a workflow when you need that behavior.
Build on the two steps
Section titled “Build on the two steps”Tasks and dependencies covers other task types and results. Use a verification loop when a real test must accept the work, and offline workflow tests to exercise your control flow without model calls.
API: defineIsolatedTask · defineTask · defineWorkflow.

