<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/swamp-tutorial-make-ai-agent-work-repeatable-va3nkfhad" -->

---
title: Swamp tutorial: make AI agent work repeatable | daily.dev
description: Swamp is an open source automation runtime that lets AI coding agents turn one-off task solutions into repeatable, typed automation. It runs alongside agents...
canonical: https://daily.dev/posts/swamp-tutorial-make-ai-agent-work-repeatable-va3nkfhad
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Swamp tutorial: make AI agent work repeatable | daily.dev
og:description: Swamp is an open source automation runtime that lets AI coding agents turn one-off task solutions into repeatable, typed automation. It runs alongside agents...
og:url: https://daily.dev/posts/swamp-tutorial-make-ai-agent-work-repeatable-va3nkfhad
og:image: https://api.daily.dev/og/posts/va3nKfHaD.png
og:image:alt: Swamp tutorial: make AI agent work repeatable
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Swamp tutorial: make AI agent work repeatable

**[Flavio Copes](https://daily.dev/sources/flaviocopes)** · 10 min read · 1 upvotes · 0 comments

## Summary

Swamp is an open source automation runtime that lets AI coding agents turn one-off task solutions into repeatable, typed automation. It runs alongside agents like Codex, Claude Code, or Cursor as a CLI tool, offering models (typed operations), workflows (DAGs connecting operations), versioned data storage, credential vaults, and skills that teach agents how to use it all. A tutorial walks through installing Swamp, building an HTTP health check model with two definitions, wiring them into a workflow with assertions, deliberately breaking one endpoint to see assertions fail, and querying run history. The core idea: let the agent figure out how to solve a task once, then let Swamp run that solution the same way every time, keeping a versioned record of what happened. The author suggests using it for release verification pipelines and cautions it's overkill for simple one-line cron jobs, and that deterministic execution doesn't make a bad workflow correct.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://flaviocopes.com/swamp>

## Questions this post answers

### What is Swamp and how does it differ from MCP for AI agent automation?

Swamp is an open source automation runtime that runs under a coding agent (like Codex, Claude Code, or Cursor) as a command-line tool, turning successful one-off agent work into typed, repeatable systems. Unlike MCP, which exposes tools to an agent, Swamp gives the agent an execution layer with models, workflows, versioned data, and vaults so results can be replayed reliably rather than rediscovered each time.

_daily.dev helps developers compare emerging agent tooling like Swamp and MCP before wiring them into a workflow._

### How do I install the Swamp CLI on macOS or Linux?

Install it by running curl -fsSL https://swamp-club.com/install.sh | sh, then restart the shell and verify with swamp version. The binary installs to ~/.local/bin, which needs adding to PATH if the command isn't found. Users wary of piping remote scripts can open the install script in a browser first to inspect it before running it.

_Developers setting up new agent tooling can track install steps like these alongside other daily.dev reads on automation._

### How does a Swamp workflow distinguish between a valid result and a failing check?

A Swamp model always produces a valid typed result even when the underlying operation fails, such as an HTTP check returning status 0 and ok false for a network error. Separately, a workflow job defines assert steps with CEL expressions, like checking that attributes.ok == true, so the workflow itself decides whether the recorded state is acceptable rather than the model failing silently.

_daily.dev keeps developers building agent workflows current on patterns like assertion-based validation._

## Similar posts on daily.dev

- [Automation at the speed of Swamp \(Changelog & Friends \#130\)](https://daily.dev/posts/automation-at-the-speed-of-swamp-changelog-friends-130--drgz0cacp) · Changelog · 5 upvotes · 1 comments
- [Inception: Learning Swamp Through Swamp](https://daily.dev/posts/inception-learning-swamp-through-swamp-lnjnbkjuu) · Webframp · 1 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#automation](https://daily.dev/tags/automation), [#mcp](https://daily.dev/tags/mcp), [#openai-codex](https://daily.dev/tags/openai-codex)

[View this post on daily.dev](https://daily.dev/posts/swamp-tutorial-make-ai-agent-work-repeatable-va3nkfhad)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Swamp tutorial: make AI agent work repeatable","url":"https://daily.dev/posts/swamp-tutorial-make-ai-agent-work-repeatable-va3nkfhad","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/swamp-tutorial-make-ai-agent-work-repeatable-va3nkfhad"},"datePublished":"2026-08-22T13:20:47.559Z","dateModified":"2026-09-13T20:10:05.591Z","description":"Swamp is an open source automation runtime that lets AI coding agents turn one-off task solutions into repeatable, typed automation. It runs alongside agents...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5fd36cbab43c2055a70dd83de41cb5d9?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5fd36cbab43c2055a70dd83de41cb5d9?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Flavio Copes","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Flavio Copes","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9","url":"https://daily.dev/sources/flaviocopes"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/swamp-tutorial-make-ai-agent-work-repeatable-va3nkfhad","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,automation,mcp,openai-codex","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Flavio Copes","item":"https://daily.dev/sources/flaviocopes"},{"@type":"ListItem","position":3,"name":"Swamp tutorial: make AI agent work repeatable"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/swamp-tutorial-make-ai-agent-work-repeatable-va3nkfhad#faq","mainEntity":[{"@type":"Question","name":"What is Swamp and how does it differ from MCP for AI agent automation?","acceptedAnswer":{"@type":"Answer","text":"Swamp is an open source automation runtime that runs under a coding agent (like Codex, Claude Code, or Cursor) as a command-line tool, turning successful one-off agent work into typed, repeatable systems. Unlike MCP, which exposes tools to an agent, Swamp gives the agent an execution layer with models, workflows, versioned data, and vaults so results can be replayed reliably rather than rediscovered each time. daily.dev helps developers compare emerging agent tooling like Swamp and MCP before wiring them into a workflow."}},{"@type":"Question","name":"How do I install the Swamp CLI on macOS or Linux?","acceptedAnswer":{"@type":"Answer","text":"Install it by running curl -fsSL https://swamp-club.com/install.sh | sh, then restart the shell and verify with swamp version. The binary installs to ~/.local/bin, which needs adding to PATH if the command isn't found. Users wary of piping remote scripts can open the install script in a browser first to inspect it before running it. Developers setting up new agent tooling can track install steps like these alongside other daily.dev reads on automation."}},{"@type":"Question","name":"How does a Swamp workflow distinguish between a valid result and a failing check?","acceptedAnswer":{"@type":"Answer","text":"A Swamp model always produces a valid typed result even when the underlying operation fails, such as an HTTP check returning status 0 and ok false for a network error. Separately, a workflow job defines assert steps with CEL expressions, like checking that attributes.ok == true, so the workflow itself decides whether the recorded state is acceptable rather than the model failing silently. daily.dev keeps developers building agent workflows current on patterns like assertion-based validation."}}]}
```

