AI Engineer World's Fair 2025
Ship Agents that Ship: A Hands-On Workshop for SWE Agent Builders
Loading slides…
Read the talk
Ship Agents that Ship: A Hands-On Workshop for SWE Agent Builders
Build a Dagger workspace that lets an agent edit and test a Vue application, then reuse that agent in a GitHub issue-to-pull-request workflow.
From a talk by Kyle Penfound and Jeremy Adams - Casañas
Before you start: Familiarity with Git, GitHub Actions, containers and basic Python will help; following along requires the Dagger CLI, a container runtime and access to an LLM provider.
An agent needs somewhere to run
How do you take a software engineering agent off your laptop and give other people a way to request work? Kyle Penfound and Jeremy Adams-Casañas begin with that deployment problem: build an agent locally, then run it in GitHub. The workshop’s unreliable connection makes the boundary unusually tangible. Once the workflow reaches GitHub, its execution no longer depends on the room’s network.
Following along requires the Dagger CLI and a container runtime such as Docker, Podman or nerdctl, because the Dagger engine itself runs in a container. The installation options shown include Homebrew, an install script and WinGet. Workshop questions go to the dagger-workshop Slack channel; the opening QR code advertises a separate Cloudflare hack night, rather than the installation instructions.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Make the workflow portable
Jeremy brings an ecosystem perspective; Kyle approaches the problem through DevOps and platform engineering. Their starting point is the delivery workflow: containers running builds, tests and other operations on a laptop, in Kubernetes or in GitHub. Dagger adds LLMs to the same collection of objects that already includes containers, repositories, directories and files. The agent becomes part of the project’s workflow, with environments that both people and agents can use.
The Docker comparison helps establish the scope. Jeremy notes that Docker and Dagger share founders, then distinguishes the units they make portable:
| Tool | Portable unit | Composition |
|---|---|---|
| Docker, in the comparison | An application | A containerized application |
| Dagger | A software workflow | Multiple containers and other objects |
Dagger’s workflows use sandboxed objects by default. An application environment is one building block; the sequence of operations around it is what travels between execution environments.
Workflow code can be written in Go, Python, TypeScript, Java or PHP. Modules distributed through the Daggerverse cross those language boundaries: a TypeScript-authored module that builds a TypeScript application can be installed into a Python module and exposed through native Python bindings. Choosing an SDK language does not isolate a project from modules written by other teams.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Build the developer tools first
Dagger offers both noninteractive CLI calls and an interactive shell. In the shell, Kyle starts with a container, selects Alpine as its image and opens a terminal inside it. These primitives can be assembled into a specialized coding workspace. The important next step is to give the agent the project’s existing test workflow, so it validates changes using the same implementation as developers and CI.
The pressure behind that reuse is familiar: code generation can outrun review. Jeremy recounts a conversation with someone receiving 25,000-line pull requests, with five more commits arriving while a review was pending. It is a secondhand example of review churn. Build, test and delivery checks provide a repeatable way to evaluate that growing stream of changes before production.
Start with the Build a CI Workflow guide and the Hello Dagger Template. Use GitHub’s Use this template action to create your own repository, then clone that repository. Owning the copy makes the later Actions setup straightforward. The application is a Vue website; Kyle uses Python for its Dagger workflows. The linked versioned guides document the workshop’s API style, but are not exact snapshots of the recording, and current Dagger documentation has moved on.
Dagger Cloud is optional, but visibility into the agent is useful from the start. A trace can reveal the prompt, which tools the model sees and how it calls them. If the model repeatedly calls a tool incorrectly, the repair might be a clearer description, a different tool interface or a prompt change. Observing the failure tells you which layer to adjust.
Initialize a Python module named hello-dagger under .dagger, then inspect its exposed functions:
bash
dagger init --sdk=python --name=hello-dagger --source=.dagger
dagger functions
The module name determines the generated object name. Its Python source lives under .dagger/src/hello_dagger/main.py; function descriptions come from the code and appear in the CLI.
The CI module builds larger operations from smaller ones. build_env prepares the base container, adds the application source and runs setup commands. A build reuses that environment, executes the application build and extracts the generated directory. In the linked CI guide, that intermediate dist directory is then packaged into an NGINX container returned by the public build function.
| Function | Responsibility |
|---|---|
build_env | Prepare the application’s build environment |
test | Run the project’s tests |
build | Build and package the application |
publish | Publish the resulting container |
The Python builder chains and shell commands reach the same underlying API and cache. At this point, these are ordinary developer and CI tools; the agent will be another caller.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Give the agent a focused workspace
The next layer is a workspace submodule containing the capabilities the coding task needs. An audience question about tools changing at runtime brings out the design tradeoff: the model needs enough options to choose a useful path, but exposing every available capability makes the task harder to constrain. A completely predetermined sequence may not need an LLM at all. Here, the model chooses how to inspect and modify the project within a deliberately small tool surface.
The agent-in-project guide creates a separate module in .dagger/workspace. Its source is a Dagger Directory, and its initial editing tools are simple:
- Read a file: Accept a path and return the Dagger
File’s contents. - Write a file: Accept a path and replacement contents, producing an updated workspace.
- List files: Run
treeagainst the source directory to expose the project structure.
For a larger repository, line-range reads, scanning or targeted insertion may be more appropriate than reading and replacing entire files. The workshop builds these tools directly to make their behavior visible; reusable modules can supply them in other projects.
A minimal Python implementation of the read/write portion makes the object boundary concrete:
python
from dataclasses import replace
import dagger
from dagger import field, function, object_type
@object_type
class Workspace:
source: dagger.Directory = field()
@function
async def read_file(self, path: str) -> str:
"""Read a file from the workspace."""
return await self.source.file(path).contents()
@function
def write_file(self, path: str, contents: str) -> "Workspace":
"""Return a workspace with the supplied file contents."""
return replace(
self,
source=self.source.with_new_file(path, contents),
)
When the workspace object becomes available to an agent, its functions become tools. Jeremy’s analogy is a robot body awaiting a brain: the environment exists independently of whichever LLM will use it.
The final workspace tool is test. It gives the model a validation result and, on failure, information it can use to revise the code. Linting or other checks can supplement it. Inspect the submodule and install it into the main module:
bash
dagger -m .dagger/workspace functions
dagger install .dagger/workspace
Installation records the dependency in dagger.json. The generated client then exposes both Dagger’s core objects and the dependency’s objects. Kyle describes a Daggerverse containing thousands of specialized modules; the same dependency mechanism also works for the local workspace. A workspace written in Go or TypeScript could be consumed by the Python main module.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Define the assignment, environment and prompt
The agent is a function named develop. It accepts an assignment and the project source, then returns the result of working on that assignment. Python parameter annotations supply descriptions for CLI help; Go comments serve a similar purpose. The source argument uses a default path of /, meaning the Git repository root in this context—not the host machine’s root directory. A caller can therefore supply just an assignment, or explicitly substitute another source directory.
The environment is the agent’s working contract. It contains tools, inputs, outputs, objects and state. Here, an assignment string describes the work, a workspace input supplies editing and testing tools, and a workspace output named completed declares the expected result. Dependency types generate the corresponding environment methods: installing an object with a different name would produce differently named input/output methods.
Dagger objects are immutable. Editing the workspace produces a new version; the input object remains unchanged. The completed output is therefore a new Workspace, not an instruction to overwrite the original source. A typed output also gives the surrounding workflow a concrete object to retrieve, avoiding a separate convention for parsing an arbitrary JSON response into a usable workspace.
The prompt lives in a Markdown file under .dagger; the linked guide uses .dagger/develop_prompt.md. Its $assignment placeholder is filled from the environment. The instructions establish an order of work:
- Inspect the workspace and understand the project structure before editing.
- Make the changes needed for the assignment without unrelated modifications.
- Run the tests after making changes.
- Continue until the assignment is complete and the tests pass.
Providing a test tool does not itself ensure the model will call it. These instructions tell the model to use the validator, and repeated reminders reinforce that behavior. Jeremy describes iterating on prompts through evaluations with different LLMs. A trace that shows only a file write followed by a return points to missing inspection or validation behavior that the prompt needs to address.
Because an agent is a Dagger function, it can also be composed with other agents. A reflection agent can sit around another agent’s work, or a specialist agent can be exposed through the environment as a callable capability. Kyle compares the latter to Google’s A2A idea: an agent knows what another agent can do and asks it for help, such as advice on writing TypeScript. This passage describes the composition, without running a reflection loop.
The central construction line connects the LLM object to the environment and prompt file:
python
work = dag.llm().with_env(environment).with_prompt_file(prompt)
Most of the engineering has happened before this line: defining what the model can access, what it should do and what it must return. work represents the resulting LLM workflow.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Put the final test outside the agent loop
After the agent finishes, the function retrieves completed from the resulting environment as a Workspace, then extracts its source Directory. The source handling excludes node_modules, keeping locally installed dependencies out of the returned source tree. The workflow then runs the project’s tests in ordinary code before returning that directory.
A prompt reminder and an enforced gate do different jobs. The model’s test calls help it iterate; the final test call prevents the enclosing function from returning successfully if validation fails. Kyle suggests that a failure at this boundary could be sent back to the LLM for another attempt. Linting or compliance checks could also occupy this boundary.
All the intermediate edits remain in sandboxed workspaces. Kyle uses ten concurrent agents as an illustration: each could work in its own environment without changing the others’ files or the developer’s local checkout. Only after final validation does develop return the completed directory. The new function then appears alongside the other module functions in dagger functions.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Ask for a greeting change
Before running the agent, configure a model provider. The workshop names OpenAI, Google’s Gemini, Anthropic, Ollama, Docker Model Runner and Bedrock as options. Provider environment variables connect Dagger to the model service. Kyle’s credential is a 1Password reference; authorization resolves the secret without printing the API key itself. In the shell, llm | model inspects the selected model, and the provider default can be overridden explicitly or in code. This setup uses Claude 3.5 Sonnet.
.help develop shows the required assignment, optional source and Directory return type. The guide’s example asks for a blue main page; Kyle instead asks the Vue application to display a new greeting:
bash
develop "Make the main page say 'Hello workshop people.'"
The terminal shows the prompt reaching the model, followed by workspace discovery, file listing and source reads.
The terminal and web interface receive the same OpenTelemetry stream. The agent writes new file contents and calls the test tool, which begins downloading npm dependencies. Network trouble holds up that stage, so the local run has not yet produced a completed result.
An audience question identifies a crucial distinction: did the model decide to run npm install? No—the developer put that command inside test, along with npm run test:unit. The agent only selected the test tool. It did not need to invent a test command or guess at test-runner options.
Keep flexibility where the task requires judgment, and encode known procedures directly. The model can decide which files to inspect and edit. The project already knows how its tests run, so that procedure belongs in a function. Additional tasks may justify more tools, but arbitrary command execution is unnecessary for this example.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Inspect the trace, then preview before export
Once Cloud loads, the trace makes the agent’s discovery sequence explicit. It lists the objects in its environment, lists the workspace’s methods and selects methods to use as tools. Function signatures provide the tool descriptions, argument types and return types without handwritten JSON schemas. The trace also expands the tool implementation: listing files creates an Alpine container, runs tree and returns the file structure to the model.
The source reads explain the chosen edit. The agent first examines HelloWorld.vue, then reads App.vue and discovers that the parent passes a message into the Hello World component. It rewrites App.vue to pass the requested greeting. Kyle reports roughly five minutes at the local testing stage amid connection problems. That wait describes this stalled run, rather than the normal runtime of a greeting change.
Cloud is visualizing this run; the Dagger engine on Kyle’s laptop is executing it. The workflow’s Python runtime and the application’s Node runtime are supplied through containers, with operations cached. Beyond Dagger and the container runtime, a fresh machine does not need host installations of Python and Node just to run these workflows.
Because the local run remains stalled, Kyle explains the next step conditionally. Once develop returns, a shell variable such as completed can hold its output directory. Passing that directory as the optional source argument lets existing build and serve functions operate on the agent’s result instead of the local repository. You can inspect the resulting site before accepting its files. Only export writes the directory back to disk. The same output object therefore supports validation, preview and eventual handoff without each step needing a new checkout.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Turn an issue into an assignment
A feature requester should not need Docker, Dagger or an interactive shell. GitHub issues can provide the interface instead. The GitHub Issue module supplies operations for issues, comments and pull requests. It wraps the GitHub Go SDK, yet the workshop installs it into the Python project through the same cross-language dependency mechanism.
A new function, develop_issue, wraps the existing agent:
- Use a GitHub token, issue identifier and repository name to read the issue.
- Pass the issue body to
developas the assignment, along with the source directory. - Receive the completed directory.
- Create a pull request from that directory, using the issue title and URL for metadata.
- Include an issue-closing reference in the PR body so GitHub links the work to the request.
The wrapper changes where the assignment comes from and where the result goes. It does not require a second coding agent, and it can run locally as well as in CI.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Run the agent when an issue is labeled
To move execution into GitHub Actions, first add the model API key under repository Settings → Secrets and variables → Actions. Add a Dagger Cloud token there too if you want the web trace. The documentation screenshot shows DAGGER_CLOUD_TOKEN and GEMINI_API_KEY; the model credential must match the provider your workflow uses.
Under Actions → General, enable the setting allowing GitHub Actions to create and approve pull requests. Then add a workflow under .github/workflows that listens for an issue being labeled and runs only when the label is Develop. Its command calls dagger call develop-issue, passing the GitHub token, issue identifier and repository supplied by the event.
The job needs these GitHub token permissions:
yaml
permissions:
contents: write
issues: read
pull-requests: write
contents: write permits the commits, issues: read permits reading the request, and pull-requests: write permits opening the PR. The model key and optional Cloud token are passed through the environment. GitHub Actions is invoking the same Dagger function a developer could invoke from the shell.
GitHub is convenient because the request already lives there and its runner avoids the workshop’s connectivity problem; it is not a required execution host. Kyle describes this example as free to run on Actions, with model usage paid separately. Actual runner eligibility depends on repository and runner type, not simply on modest compute requirements.
Kyle creates a “change the greeting” issue asking for Hello workshop people, applies the Develop label and opens the Actions tab to watch the run. If the label does not exist, create it first. With the Cloud token configured, the same run is also visible there. Jenkins, GitLab CI or Azure DevOps could serve as the orchestrator for the Dagger workflow instead.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Know what the guardrails do—and what they leave open
The Markdown assignment prompt is not the model’s only instruction. Dagger supplies a default system prompt explaining how to discover objects and select methods. That prompt can be extended or removed. If the returned code needs another revision, a developer can edit the completed source directly or feed further instructions through another function.
A more consequential question concerns the tests themselves. The workspace receives the full repository source, including tests, so the agent can edit them. A changed behavior sometimes warrants an updated assertion; in other cases, modifying a test merely hides a regression. Prompt restrictions or a validation step can check for unwanted test edits, but the workshop does not supply an automatic rule for distinguishing a legitimate update from a weakened test. Passing the returned test suite is only as strong as the suite being checked.
The runner setup also separates two kinds of installation. A checkout action obtains the repository, and Dagger’s GitHub Action installs a specified Dagger version. The project’s module dependencies are already declared in dagger.json: dagger install recorded them during development. When the workflow runs, Dagger resolves those declarations and ensures the client is generated, without a separate module-install command in the job. Committing .dagger and its dependency declarations alongside the application lets the repository carry the tools used by developers, platform engineers and agents.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Extend the environment with nesting and MCP
An agent that writes Dagger workflows must be able to validate Dagger workflows. Kyle opens Dagger Programmer, which he uses to turn documentation examples written in one SDK language into examples across five languages. The component shown is TypeScript. Its tests run the generated Dagger code, using privileged nesting so the inner container can communicate with the engine. This answers the practical nesting requirement raised by an audience question about agent fleets; it does not demonstrate a fleet scheduler or role architecture.
MCP adds another integration boundary. Jeremy describes exposing a module as an MCP server with the workshop-era command dagger -m <module> mcp. The speakers then distinguish that external interface from Dagger’s internal module mechanism. Jeremy explicitly corrects the suggestion that the internal mechanism is MCP: it predates MCP, although the concepts are similar. Consuming external MCP servers is described as forthcoming at recording time, separate from the module-to-server export already discussed.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Review the actual result and give it another turn
The hosted run produces a pull request. GitHub Actions’ bot has pushed a commit, and the PR includes the issue-closing reference. Its patch differs from the local trace: it changes TheWelcome.vue, and the presenters notice that it also deletes material they did not request removing. They acknowledge that the prompting needs more work. The demonstrated outcome is an unattended issue-to-PR handoff; the patch still needs review, and the recording does not establish a merge or semantic correctness.
The next step is a feedback path. Kyle opens the Greetings API project, which he describes as containing about five agents. In its example flow, a request creates a new API endpoint; a later /agent comment asks for authentication, and the agent resumes work and pushes changes. A /review command invokes a review agent, whose suggestions can then become another coding assignment. The explicit request not to delete tests reflects the same validation problem raised earlier. A person can participate at these handoffs, but the functions can also be composed without human intervention at every step.
The project also includes a repair path for human-authored changes. When a developer pushes code that fails tests, an agent can inspect the failure and propose a fix that the developer can accept. The output is a proposed correction, preserving a review point between diagnosing the failure and applying the change.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Use the environment with other agent frameworks
Why make the LLM a native Dagger primitive if Dagger could just provide containers? Kyle answers by showing an OpenAI Agents SDK example using Ollama, with Dagger-backed tools for reading files, writing files and building. Pydantic-based integrations are also possible. The environment can therefore be reused even when another framework owns the agent loop.
The integration choice changes how much tool wiring the application owns:
| Approach | Agent loop | Tool integration |
|---|---|---|
| Native Dagger LLM | Dagger | Module signatures become tools |
| External agent framework | The chosen framework | Explicitly wrap Dagger operations |
The native path makes installed Daggerverse modules immediately useful to the agent. The external-framework path still supplies container sandboxes that can run locally while keeping agent edits out of the host checkout.
For an HTML-game agent, validation may require a browser rather than only a unit-test command. Jeremy describes prior use of headless browsers in Linux containers and browser sessions accessed through VNC. Those are possible ingredients for a browser-testing environment, though the workshop does not implement or run a game-testing workflow.
This also clarifies what Dagger itself supplies: a platform for software engineering environments and workflows. Platform engineers and developers can invoke those functions directly, or give them to agents. The guardrails come from the shared tools and the surrounding workflow—such as the final test gate—not from assuming every agent will follow its instructions perfectly.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Explore in the shell, then decompose larger work
The final demonstration opens a broader interaction mode. Instead of explicitly chaining shell operations, Kyle chats with the connected LLM, which can see the available Dagger objects. He asks for a Python container. The model discovers container-creation and execution methods through the API, then pulls a Python 3.11 container. This mode supports exploratory interaction with the same building blocks; the workshop’s coding agent used a narrower environment to make its behavior easier to constrain.
The last question asks how the approach handles larger assignments requiring design, user input and multiple turns. Jeremy’s answer is qualified: decompose the work and architect the pieces appropriately, and the platform can support different task sizes. The workshop has demonstrated the smaller unit that such a system can compose—a focused agent, a reusable validation workflow and a reviewed output handoff—without demonstrating a complete large-task orchestration design.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
From the talk
Versioned walkthrough for adding reusable build, test and publish functions to the Vue example.
Example application used to create a personal repository for the workshop.
Dagger 0.21 guide covering workspace tools, typed outputs, validation and GitHub issue-to-PR automation.
The quickstart's pinned module for reading GitHub issues and creating pull requests.
Agent for translating Dagger modules between SDKs and generating usage examples.
Greeting application with Dagger functions for feature development, feedback, reviews and test-failure debugging.
Further reading
The pre-conference announcement of native LLM and tool-use support in Dagger workflows.
- GitHub Actions BillingDocumentation
Conditions governing free runner usage, private-repository allowances and additional charges.
Updates since the talk
- Dagger 0.19 Agent APIsArticle
Release notes introducing external MCP server integration and additional workspace APIs.
Dagger's account of evaluating tool discovery, tool calling and system prompts across models.
Full transcript
Loading transcript…