MANUAL
Guidance on how to thrive in the Swamp.
Swamp is an adaptive automation framework designed to be operated by AI agents. Start by reading How Swamp Works if you're just getting started.
Hello World
Install Swamp, initialize a repo, and run your first workflow
Tutorials →Publish Your First Extension
Build a TypeScript extension model, smoke-test it, score it against the quality rubric, walk it through every publishing gate, and install it in another repo.
Tutorials →Remote Execution
Mint a token, start the orchestrator, connect a worker, and run a placed workflow step end-to-end
Tutorials →Working with Data
Create two models, wire them together with a data.latest() expression, orchestrate them in a workflow, then query and inspect the versioned data in The Swamp.
Tutorials →Storing Secrets
Create an encrypted vault, store an API token, annotate it with metadata, reference it from a model using vault.get(), and see it redacted in all output.
Tutorials →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, 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 →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, 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 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 →How Swamp Works
How models, workflows, vaults, extensions, skills, data querying, the run tracker, and configuration compose into Swamp's agent-driven automation framework
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 →