Skip to content
Français

Add an agent and choose execution

Configure agent roles, local or container execution and YAML editor completion.

recipe.yaml describes the work; outpost.yaml binds agent roles and chooses the environment. Start with the local tutorial. Use workspace configuration for directories, branches and output files.

Use direct sandbox and agents declarations for components used once. Introduce $ref when several roles share a profile, provider or toolset, or when a component needs a stable name. Both forms use the same validation and execution contracts; named components are optional.

For this local example, the Codex CLI must already be installed and authenticated on the host; follow the Codex guide. Save these two complete files. Commands and agents run with your host permissions.

version: 3
workspace:
  kind: git
  repository: ./project
  branch: { mode: named, name: feature/welcome, from: main }
sandbox:
  provider: local
agents:
  writer:
    harness: codex
    authentication: account

The recipe selects the configured writer role. Use a Git repository at ./project with a main branch. The agent creates welcome.md on a separate branch. File recipes accept native CLI harnesses with demonstrated file-workspace capabilities. Unsupported dispatch, continuation and interactive combinations are refused; the Outpost harness also supports file-only recipes with filesystem tools.

version: 3
name: write-note
tasks:
  - key: draft
    agent: writer
    brief: Write a short welcome message in welcome.md, then summarize it.

Run with npx outpost recipe run --file recipe.yaml --config outpost.yaml --json and inspect outputs.draft.text. The named branch is retained without automatic integration. Choose authentication explicitly for every CLI role; model selection is optional.

Prepare the Codex image using agent images, then replace only sandbox in the configuration above. Keep the workspace and agent role.

sandbox:
  provider: docker
  image: outpost-codex:dev

Other providers use their own sandbox options. Unsupported workspace or agent capabilities are refused. Container file workspaces require an explicit image.

Replace agents in the same configuration to add a profile. Move it under profiles and reference it with $ref when several roles share it. Profiles carry instructions, supported tool restrictions and MCP declarations. A brief asking an agent not to edit files does not enforce read-only access.

agents:
  writer:
    harness: codex
    authentication: account
    profile:
      type: portable
      instructions: Write concise, plain-language documents.

Native CLI lifecycle hooks and profile hook callbacks require local extensions. The built-in harness has its own tools, permissions and hook declarations.

Add this top-level block to forward only the selected host variable. Keep secret values out of recipes and configuration files. Secret sources can resolve selected names through declared components and host clients.

environment:
  PROJECT_TOKEN: PROJECT_TOKEN

Keep the corresponding header at the top of each file, followed by its existing contents. These URLs follow the deployed documentation. For reproducible completion, use /outpost/schemas/<package-version>/recipe.schema.json and recipe-configuration.schema.json, without v; archives exist for releases containing both schemas.

# yaml-language-server: $schema=https://elie-laloum.github.io/outpost/schemas/recipe.schema.json
version: 3
# yaml-language-server: $schema=https://elie-laloum.github.io/outpost/schemas/recipe-configuration.schema.json
version: 3

Offline, use a relative path such as ./node_modules/@elie-laloum/outpost/recipe.schema.json. recipe init writes installed-schema paths automatically. YAML format versions and package versions are independent; these guides use format 3, while older formats remain supported.

GoalGuide
Branches, copied files, mounts and publicationWorkspaces
Model providers, tools and validated JSON answersAgent loop
Progress events and final reportsObservation
Named components and their supported optionsYAML components