Shopify’s Tangle and Tangent: Automating Machine Learning Experimentation for Accelerated Insights
Building Autonomous ML Experimentation with Tangle and Tangent
Shopify has open-sourced Tangle and Tangent, an integrated stack designed to automate the machine learning experimentation loop. By combining a platform-agnostic pipeline manager with an autonomous agentic layer, the system enables engineers to offload iterative hypothesis testing to containerized sub-agents. This architecture, which utilizes persistent memory and gated checkpoints, addresses the latency and reproducibility bottlenecks common in large-scale ML model development.
The Tech TL;DR:
- Automated Experimentation: Tangent manages an eight-step loop that handles hypothesis generation, pipeline modification, and execution without human intervention.
- Reproducible Infrastructure: Tangle provides a caching layer and visual graph editor, ensuring pipelines remain functional and audit-ready across multi-year development cycles.
- Security-First Agent Hosting: The platform utilizes an Auth Proxy to manage service access, ensuring agents can interact with cloud APIs without direct access to plaintext credentials.
Architectural Logic: Tangle as the Execution Backbone
At its core, Tangle serves as the orchestration layer for ML pipelines. Unlike proprietary notebooks that often suffer from environment drift, Tangle treats components as containerized CLI programs. According to the project documentation, it utilizes a caching model where data exchange occurs via files—such as Parquet, CSV, or JSON—mimicking the modularity of Unix pipes. This design allows for rapid iteration by skipping previously executed steps.

By storing the full graph, components, and execution logs, Tangle ensures that any team member can inspect or fork a pipeline in seconds.
Tangent: Implementing the Autoresearch Loop
Tangent functions as the agentic brain atop Tangle. It follows the “autoresearch” pattern, where an agent manages a fleet of specialized sub-agents—researcher, builder, debugger, and reviewer—to navigate complex model optimizations. The agent operates through an eight-step loop: Initialize, Analyze, Hypothesize, Submit, Monitor, Evaluate, Synthesize, and Decide.
To prevent the “drift” often seen in long-running LLM-based agents, Tangent enforces gated checkpoints. The agent must successfully pass a checklist at each gate before advancing, re-loading its context to maintain alignment with the original objective. Developers can trigger this loop using a simple command-line interface:
# Execute the autonomous eight-step experimentation loop
tangent auto
Security and Credential Isolation
A primary risk in agentic workflows is the exposure of authentication tokens to AI providers. The Shopify engineering team addressed this by implementing a dedicated Auth Proxy. This proxy resides in a separate container, intercepting HTTP requests from the agent. By generating temporary SSL certificates and rotating headers, it ensures the agent receives authorized access to cloud services without ever handling raw secrets.
It allows for the deployment of autonomous agents within a secure perimeter, mitigating the risk of credential leakage.
Comparative Framework: Tangle vs. Traditional Orchestration
When evaluating Tangle against standard orchestration tools, the primary difference lies in the “memory” of the experiment. While traditional tools like Airflow excel at static DAG execution, Tangle is built specifically for the volatility of research.
| Feature | Tangle/Tangent | Traditional ML Pipelines |
|---|---|---|
| Experiment Memory | Persistent (MEMORY.md) | Ephemeral/Volatile |
| Agentic Loop | Native (8-step) | Manual/External Scripting |
| Caching | Step-level/Reusable | Task-level/Often Cleared |
Future Trajectory for Agentic ML
The transition toward agentic experimentation represents a shift from “human-in-the-loop” to “human-on-the-loop” development. By codifying research skills into Markdown-based files, the Tangent architecture makes experimentation logic portable and reviewable via standard pull requests.