---
title: "Under the River"
description: "Shopify's Slack-native agent River co-authors one in eight merged PRs, and it rests on two 2024 bets: a single monorepo (World) and Nix-built reproducible environments across dev, CI and production."
url: "https://swe.quest/articles/under-the-river-4570734a0df8615c"
canonical: "https://shopify.engineering/under-the-river"
source: "Shopify Engineering"
published: "2026-05-28"
difficulty: "medium"
kind: "Case study"
reading_minutes: 10
tags: ["ai-agents","developer-productivity","system-design","ai-coding","build-systems"]
---

# Under the River

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2026-05-28, 10 min read, Case study. Original: [https://shopify.engineering/under-the-river](https://shopify.engineering/under-the-river)

## Summary

Shopify's Slack-native agent River co-authors one in eight merged PRs, and it rests on two 2024 bets: a single monorepo (World) and Nix-built reproducible environments across dev, CI and production. Underneath sits Aquifer, an internal agent platform built so the session outlives any process. A Postgres-backed append-only event log holds the conversation, the agent harness runs outside a disposable sandbox, and ephemeral session cells are recreated on demand. Agents are shipped as Nix-built profile bundles across interactive, automation and job modes. Lessons for agent infrastructure: decouple the brain from the hands, make agents public and multiplayer so transcripts compound into shared skills, and treat each new agent as a profile rather than a new platform.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)

## Prerequisites

- LLM coding agents ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- monorepos
- CI infrastructure ([easy posts on CI/CD](https://swe.quest/tags/ci-cd.md?difficulty=easy))

## Keywords

River, Aquifer, Nix, Slack, World monorepo, Postgres, AGENTS.md

## Related posts

- [Open SWE: An Open-Source Framework for Internal Coding Agents](https://swe.quest/articles/open-swe-an-open-source-framework-for-internal-coding-agents-1b0f7521a5a00040.md): LangChain · 2026-10-13 · Medium · 8 min read · AI agents, AI for coding, Open source, Sandboxing & isolation
  Open SWE is an MIT-licensed framework for internal coding agents, built on Deep Agents and LangGraph.
- [Agents in the Sandbox](https://swe.quest/articles/agents-in-the-sandbox-6c4d7e3dae7cde47.md): Railway · 2026-06-24 · Medium · 9 min read · AI agents, Sandboxing & isolation, Developer tools, TypeScript
  Railway sandboxes now ship Claude Code, Codex, OpenCode and Pi in the default image and can join an environment's private network, which lets agents test against real Postgres, Redis and internal services.
- [Harness engineering: leveraging Codex in an agent-first world](https://swe.quest/articles/harness-engineering-leveraging-codex-in-an-agent-first-world-2c11ac81997bc6aa.md): OpenAI · 2026-02-11 · Medium · 14 min read · AI for coding, AI agents, Developer productivity, Static analysis, Observability
  A small OpenAI team built and shipped an internal product of roughly a million lines over five months with zero manually written code, merging about 1,500 Codex-authored PRs at around 3.5 PRs per engineer per day, an estimated 10x faster than writing it by hand.
- [How to Build a Full-Stack AI Agent](https://swe.quest/articles/how-to-build-a-full-stack-ai-agent-668e986cd5c15ccd.md): Neon · 2025-10-29 · Medium · 11 min read · AI agents, AI for coding, PostgreSQL, System design, Multi-tenancy
  Aileen is an open-source codegen agent that generates full-stack web apps, combining Next.js on Vercel, Mastra for the agent loop, Assistant UI for persisted chat, Freestyle.sh for Git repos and dev sandboxes, and Neon for both the control-plane database and per-app Postgres with Neon Auth.
- [Scaling Managed Agents with stable interfaces](https://swe.quest/articles/scaling-managed-agents-with-stable-interfaces-06b4cb4f85923c79.md): Anthropic Engineering · 2026-04-08 · Medium · 9 min read · AI agents, System design, Sandboxing & isolation, Resilience, LLMs
  Claude Managed Agents splits a long-running agent into three virtualized interfaces: an append-only session log, a stateless harness that calls Claude and routes tool calls, and sandboxes reached through a generic \`execute(name, input) → string\` tool call.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
