Skip to content

The Deska blog

Running Agents on Data Pipelines

Learn how to optimize running agents on data pipelines using an infinite canvas workspace and local-first AI tools for engineering efficiency.

12 min read

Modern data engineering has shifted from static ETL processes to dynamic orchestration. The practice of running agents on data pipelines represents the next evolution in this space, where autonomous or semi-autonomous AI entities handle error recovery, schema mapping, and pipeline optimization in real time. Instead of relying on rigid, pre-defined logic, engineers are now deploying agents that can reason about data quality issues and adjust transformation logic without manual intervention. This shift requires a robust environment that can handle multiple terminal sessions, code execution, and monitoring simultaneously.

The Architecture of Agentic Data Pipelines

When you integrate AI agents into your data stack, you move away from traditional scheduling. Traditional pipelines follow a linear path: extract, transform, and load. If a transformation fails due to a schema change at the source, the pipeline stops. By running agents on data pipelines, you introduce a layer of reasoning that can intercept these failures.

An agentic architecture typically consists of three layers. The first is the execution layer, where the actual data movement happens via tools like Spark, dbt, or simple Python scripts. The second is the observation layer, where logs and metadata are collected. The third is the agent layer, where LLMs analyze the metadata to make decisions. These agents might suggest a fix for a broken SQL query or automatically generate a new mapping file when a JSON structure changes.

Effective deployment of these agents requires a workspace that does not restrict your view. Many developers find that traditional IDEs feel cramped when trying to watch a live pipeline log while simultaneously prompting an agent to fix a script. Using an infinite canvas allows you to spread out these components. You can place your monitoring browser next to your agent terminals and your source code editor, providing a complete spatial overview of the system state.

Tooling for Agentic Workflows

Choosing the right stack for running agents on data pipelines involves balancing automation with control. Several tools have emerged to facilitate this integration, each with different philosophies regarding how much autonomy the AI should have.

Tool CategoryExamplesRole in Pipeline
ExecutionApache Airflow, DagsterOrchestrating tasks and providing hooks for agents.
Coding AgentsClaude Code, Codex CLIWriting and debugging transformation logic.
WorkspacesDeska, VS CodeHosting the interface where agents and engineers interact.
MonitoringGrafana, Great ExpectationsFeeding data quality metrics back to the agent.

Claude Code and OpenCode represent a new class of terminal-based agents. They do not just suggest code snippets; they can browse files, run tests, and execute git commands. When a data pipeline fails, these agents can be tasked with investigating the logs and proposing a patch. In a local-first environment, this process is faster because the agent has direct access to the filesystem. You can learn more about how these integrate in the coding agents documentation.

Local-First Development and Data Privacy

One significant hurdle in running agents on data pipelines is data privacy. Data engineers often work with sensitive PII or proprietary business logic. Sending entire datasets or complex schemas to a cloud-based IDE can create security risks. This is why a local-first approach is gaining traction.

By keeping your files, code, and sessions on your own machine, you ensure that the agent only accesses what is necessary. Tools that allow you to use your own API keys, often referred to as BYOK, provide an additional layer of cost control and privacy. In this model, the workspace acts as a secure shell for the agent. The agent runs locally, interacts with your local databases, and only sends specific prompts to the LLM provider.

This setup is particularly useful when debugging pipelines that connect to local staging databases. You can open a terminal panel to run your containerized database, a browser panel to view the database UI, and an agent panel to write the migration scripts. Seeing these side by side reduces the cognitive load of switching between different application windows.

Managing Complex Orchestration

As you scale the number of agents running on your pipelines, management becomes a bottleneck. It is common to have one agent focused on documentation, another on unit tests, and a third on performance tuning. Monitoring these agents requires a multi-panel setup.

  1. Terminal Panels: Used for running the pipeline orchestrator and the agents themselves.
  2. Code Editor: Used for reviewing the changes proposed by the agents before they are committed.
  3. Browser Widgets: Used for viewing documentation or internal data dashboards.
  4. Notes: Used for keeping track of prompt iterations and architectural decisions.

Deska provides a way to run these side by side in a single, zoomable workspace. If you need to step away from your desk, the mobile app allows you to monitor the output of these agents through a secure relay. Since the devices pair directly, you do not have to worry about exposing ports on your local network. This is essential for long-running data migrations where you might need to check progress or approve a critical agent action from another room or while on the move.

Optimization Strategies

To get the most out of running agents on data pipelines, you should implement specific optimization strategies.

  • Context Injection: Always provide the agent with the schema of the source and target tables.
  • Human in the Loop: Configure agents to request permission before executing destructive commands, such as dropping a table or deleting logs.
  • Iterative Testing: Use agents to generate synthetic data for testing the pipeline before running it on production data.
  • Session Persistence: Ensure your workspace saves the state of your terminals and editors so you can resume work after a restart.

The Ask Deska feature can further streamline this by allowing you to control the environment via voice or chat. You can ask the assistant to open all relevant panels for a specific data project or to run a sequence of startup commands. This reduces the manual setup time required every time you start a new debugging session. You can find more details in the voice documentation.

FAQ

How to run AI agents on local data?

To run agents on local data, you should use a workspace that supports terminal-based agents like Claude Code or OpenCode. These agents run directly on your filesystem, allowing them to read local CSV files, connect to local SQL instances, and execute scripts. Ensure your environment is local-first to maintain data privacy and reduce latency between the agent and the data source.

Best tools for data pipeline automation with LLMs?

The best tools include orchestrators like Dagster or Prefect for workflow management, combined with terminal-based agents for code generation. A multi-panel workspace is highly recommended to manage the various streams of information. Using a tool that supports an infinite canvas can help you visualize the entire pipeline flow alongside the agentic processes.

Are AI coding agents safe for production pipelines?

AI agents are safe for production when used with a human in the loop. You should never allow an agent to push code directly to a production branch without review. Using a workspace that integrates a code editor next to the agent terminal makes this review process seamless. Additionally, keeping the agent local prevents sensitive pipeline configurations from being stored on external servers.

Getting Started with Agentic Workspaces

Transitioning to an agentic workflow for your data pipelines does not require a complete overhaul of your current stack. You can start by integrating agents into your local development and testing phases. By using a specialized workspace, you can manage the complexity of multiple agents and data streams more effectively.

If you are ready to experiment with a more flexible environment for your data engineering tasks, you can download the free desktop app for Mac, Windows, or Linux. This will allow you to explore the infinite canvas and start running your preferred agents in a local-first environment today.