Shopify River 4-Layer Agent Architecture
Slack as interface, River as agent surface, Aquifer as foundation and a separate harness: the four layers behind an internal agent that treats a session as a durable entity.
Three session modes in one agent: interactive in Slack, automated review in the pull request, and ephemeral batch runs triggered by CI — cattle, not pets.
Copy and paste the following FlowZap code into a project in your FlowZap account to see this template diagram.
river { # Interactive Mode
n1: circle label:"@River Slack"
n2: rectangle label:"Public session"
n1.handle(right) -> n2.handle(left)
n2.handle(bottom) -> aquifer.n7.handle(top) [label="via Aquifer"]
}
review { # Automation Mode
n3: circle label:"PR Webhook"
n4: rectangle label:"Automated review"
n3.handle(right) -> n4.handle(left)
n4.handle(bottom) -> aquifer.n8.handle(top) [label="via Aquifer"]
}
ci { # Batch Mode
n5: circle label:"CI Trigger"
n6: rectangle label:"Ephemeral batch"
n5.handle(right) -> n6.handle(left)
n6.handle(bottom) -> aquifer.n9.handle(top) [label="via Aquifer"]
}
aquifer { # Aquifer - Shared Foundation
n7: rectangle label:"Session model"
n8: rectangle label:"Sandbox plane"
n9: rectangle label:"Gateway"
n7.handle(right) -> n8.handle(left)
n8.handle(right) -> n9.handle(left)
}
Install the MCP packagenpm install -g flowzap-mcpMCP documentation
Slack as interface, River as agent surface, Aquifer as foundation and a separate harness: the four layers behind an internal agent that treats a session as a durable entity.
Decoupling the brain from the hands: the harness calls the LLM and emits tool intents, while the sandbox executes them, so a new agent is a profile and not a platform.
n8n as the central integration layer: one workflow decides whether an event is a product sync or an order, routes it to the right channel and closes the loop.
Coinbase AgentKit flow: a human allocates a USDC budget, the agent authenticates its Base wallet, pays an x402 invoice and processes the supplier data, with no fiat in the path.
Stripe Agent Toolkit flow: the consumer approves an agent spend, the agent requests a scoped token, passes it to the merchant and the order completes in fiat.
The trust layer behind agent-to-agent payments on Coinbase: the agent initiates the spend, the transaction is broadcast, the block confirms and the payment finalizes on-chain.