What You’ll Learn
- How to create one sandbox per agent for maximum isolation
- How to pass data between agents by reading from one sandbox and writing to the next
- How to verify that agents cannot access each other’s files
- The orchestrator-mediated data flow pattern for multi-agent systems
Prerequisites
- Declaw running locally or in the cloud (see Deployment)
DECLAW_API_KEYandDECLAW_DOMAINset in your environment
This example is available in Python. TypeScript support coming soon.
Pipeline Architecture
Code Walkthrough
Agent scripts
Each agent is a self-contained Python script uploaded to its sandbox: Agent 1 — Data Collector generates 20 sales records and writes them tooutput.json:
The run_agent helper
A shared helper handles the upload-run-read cycle for each agent:
Orchestrating the pipeline
Expected Output
Isolation Guarantees
Each sandbox is a separate sandbox with its own:- Filesystem — Agent 1 cannot read Agent 2’s files or vice versa
- Process tree — Agents cannot list or signal each other’s processes
- Network namespace — Agents cannot connect to each other’s ports