Skip to main content

MANUAL

Guidance on how to thrive in the Swamp.

Swamp is an adaptive automation framework designed to be operated by AI agents. New here? Pick a path:

Already working in an AI agent? Ask it to "get started with Swamp" for an interactive walkthrough built around your own goal.

01Tutorialslearn
02How-to Guidessolve

Install Swamp

Install the Swamp CLI on macOS or Linux with the official install script, verify the installation, and troubleshoot PATH issues if the command is not found.

How-to Guides →

Collaborate in the Swamp

Promote a local Swamp repo to a shared datastore, migrate vaults to a cloud backend, and onboard teammates so they can run models and workflows together

How-to Guides →

Set Up Extension Trust

Control which collectives can supply extensions in your Swamp repository — list trusted collectives, add or remove entries, and enable membership auto-trust

How-to Guides →

Set Up Webhooks

Trigger Swamp workflows from external services — configure GitHub, Linear, Stripe, and generic webhook endpoints on swamp serve with secret validation

How-to Guides →

Set Up Shell Completions

Generate and install tab-completion scripts for Swamp CLI commands in bash, zsh, or fish so you can autocomplete subcommands, flags, and model names easily

How-to Guides →

Set Up OpenTelemetry

Export traces from Swamp model and workflow runs — enable console tracing for local debugging, send spans to a collector, and configure vendor headers

How-to Guides →

Run Workflows on a Schedule

Add a cron trigger to a Swamp workflow so swamp serve executes it automatically — configure the schedule, validate, and disable scheduling when needed

How-to Guides →

Use the Audit Timeline

Review what commands were run in a Swamp repository — filter the audit timeline by time window or session, show all commands, and verify audit hook health

How-to Guides →

File Issues from the CLI

Search, view, and file bug reports, feature requests, and security reports on swamp-club from the terminal — post comments, close, reopen, and edit issues

How-to Guides →

Inspect Repo Activity

See a summary of recent model runs, workflow executions, and data changes in a Swamp repository — filter by time window, cap output, and check remotely

How-to Guides →

Remote Execution

Monitor the worker pool, query worker state, troubleshoot enrollment failures, deploy workers, and upgrade the fleet

How-to Guides →

Set Up TLS for swamp serve

Configure swamp serve with TLS using direct certificate files or a reverse proxy like Caddy, for encrypted WebSocket and HTTP connections

How-to Guides →

Set Up Background Autoupdating

Enable opt-in background autoupdating so Swamp stays current without manual intervention, using platform-native scheduling (launchd on macOS, systemd or cron on Linux).

How-to Guides →

Authenticate with API Keys

Log in with the Swamp CLI, create personal API keys, generate collective tokens for CI/CD, and manage credentials for programmatic access.

How-to Guides →

Troubleshoot Your Swamp Repo

Diagnose and fix problems with swamp doctor — installation health, broken audit hooks, unhealthy extensions, datastore health, namespace contamination, malformed workflows, cleartext secrets, and missing vaults.

How-to Guides →

Gate a Workflow with Manual Approval

Pause a workflow at a manual_approval step so a human signs off before production runs — check pending gates, approve or reject with a reason, and resume.

How-to Guides →

Cancel a Stuck Run

Stop a running workflow or model method run using swamp workflow cancel, swamp model cancel, or Ctrl+C signal handling

How-to Guides →

Reuse a Model with the Factory Pattern

Define one model with an inputs schema and call it multiple times from a workflow to create separately addressable resource instances.

How-to Guides →

Verify Infrastructure with Assert Steps

Add assert steps to a workflow to validate collected state, control CI exit codes with severity thresholds, and generate JUnit XML for test reporters.

How-to Guides →

Make Workflows Idempotent

Add guard expressions to workflow steps so re-runs skip completed work, and use resume --from to recover failed runs without repeating irreversible side effects

How-to Guides →
03Referencelookup

CEL Expressions

Complete reference for CEL expression syntax, context variables, operators, functions, and data queries in Swamp

Reference →

Model Definitions

Complete YAML schema reference for Swamp model definitions — fields, types, defaults, constraints, and validation rules

Reference →

OpenTelemetry

Reference for OpenTelemetry tracing and log export configuration, span hierarchy, context propagation, and instrumentation in Swamp

Reference →

Workflows

Complete YAML schema reference for Swamp workflows — jobs, steps, tasks, dependencies, triggers, forEach iteration, and execution ordering

Reference →

Vaults

Complete reference for Swamp vaults — types, creation, key storage, retrieval, annotations, refresh hooks, CEL integration, audit trail, and encryption

Reference →

Data

Reference for Swamp data: resource and file specs, lifetime, garbage collection, versioning, streaming, tags, sensitive fields, querying, and CLI

Reference →

Repository Configuration

Complete YAML schema reference for .swamp.yaml — every field, type, default, environment variable override, and validation rule

Reference →

Datastore Configuration

Reference for Swamp datastore backends, configuration fields, hydration strategies, environment variable overrides, sync behavior, distributed locking, and CLI commands

Reference →

Doctor

Reference for the swamp doctor subcommands — audit, datastores, extensions, install, secrets, vaults, and workflows. Flags, exit codes, and the text and JSON output shapes.

Reference →

API Key Authentication

Reference for Swamp API key formats, authentication headers, credential storage, scoping rules, limits, and the full key lifecycle.

Reference →

TLS and Proxies

Reference for Swamp TLS trust stores (DENO_TLS_CA_STORE, DENO_CERT, SSL_CERT_FILE) and swamp serve server-side TLS (--cert-file, --key-file)

Reference →

Okta SAML SSO

Reference for configuring Okta as a SAML identity provider for Swamp SSO, including application setup, attribute mapping, and connection testing

Reference →

Operational Commands

Reference for swamp run history, swamp run doctor, swamp run gc, swamp audit, swamp summarise, swamp telemetry stats, and swamp source — flags, output, and examples

Reference →

Issue Commands

Reference for swamp issue search, swamp issue get, swamp issue bug, swamp issue feature, swamp issue security, and swamp issue ripple

Reference →

Notifications

What triggers a Lab inbox notification, how mentions are parsed, the dedup and rate-limit rules, and scope caveats.

Reference →

Glossary

Definitions of terms used throughout the Swamp documentation — models, workflows, vaults, extensions, and the foundational concepts that connect them

Reference →
04Explanationunderstand

How Swamp Works

How Swamp decomposes automation into models, workflows, vaults, extensions, skills, and a queryable data layer — and how the primitives compose together

Explanation →

Models, Types, and Methods

Why Swamp separates model types from definitions, how the method execution lifecycle works, and the tradeoffs between auto-creation and explicit definitions

Explanation →

The Data Layer

Why Swamp uses versioned, immutable data as the composition mechanism between models, and how querying, provenance, and redaction shape cross-model work

Explanation →

The Workflow Execution Model

Why Swamp workflows are DAGs rather than scripts, how dependency resolution enables maximum parallelism, and why forEach is a first-class workflow primitive

Explanation →

Extension Trust and the Supply Chain

Why Swamp requires explicit trust for third-party extensions, how dependency auditing protects the supply chain, and what the Verified by Swamp badge means

Explanation →

AI Agent Integration

Why Swamp is designed around AI agents, how the agent interface works, and what makes different tools effective with Swamp

Explanation →

About the Extension Scorecard

What the extension quality score measures, why it exists, where it appears, and why Verified by Swamp is a separate badge rather than a scored factor

Explanation →

About the Extension Publishing Lifecycle

Why publishing an extension is a gated sequence rather than a single upload — what each gate protects, how authoring hands off to publishing, and where supply-chain trust fits.

Explanation →

Background Autoupdating

Why Swamp uses platform-native scheduling for background updates, how the update lifecycle works, and design decisions around opt-in behavior and CI environments.

Explanation →

API Key Scoping

Why Swamp has two types of API keys, how personal keys differ from collective tokens, and when to use each for CLI workflows and CI/CD.

Explanation →

Understanding Workflow Suspension

Why Swamp workflows suspend at a manual_approval gate, how run state persists to disk and resume rebuilds it, and why approval and resume are separate.

Explanation →

Giga-Swamp and Namespaces

Why giga-swamp exists, how namespaces provide provenance without isolation, and the design decisions behind shared datastores

Explanation →

Remote Execution

How the orchestrator-worker model distributes step execution across machines while keeping credentials, data, and definitions centralized

Explanation →

Worker Fleets

Why Swamp groups workers into fleets, how fleet tokens replace per-machine provisioning, and the design trade-offs behind elastic queueing and drain policies

Explanation →

swamp serve

How swamp serve exposes a repository as a remote API, why OAuth uses the device grant flow, how collective-based admission works, and admin access

Explanation →

The Audit System

Why Swamp records commands and CLI invocations, how audit hooks bridge each AI tool, what the timeline omits, and how vault read-access auditing differs

Explanation →

Datastore Architecture

How the datastore unifies runtime data behind a single persistence layer, why lazy hydration is the default for remote backends, and how locking works.

Explanation →

Data Lifetimes

Why Swamp offers five data lifetimes, when to choose each one, and how the tradeoffs between durability, storage cost, and query visibility shape pipeline design

Explanation →

The Run Tracker

Why the run tracker uses a local SQLite database with heartbeat-based liveness detection, and what it records about in-flight model and workflow executions

Explanation →

Configuration Layers

Why Swamp's four configuration sources — repo, user, environment, and CLI — have the precedence they do, and when each layer is the right place for a setting

Explanation →