AI Agents vs. Simple Workflows: Build Deterministic Pipelines First for AI Chip Software Stacks

    This article argues that teams building complex AI chip software stacks, compilers, drivers, and simulation environments should establish simple, deterministic workflows before introducing AI agents. It explains why multi-layer systems spanning user APIs, compiler frameworks, intermediate representations, drivers, runtimes, and functional simulation are risky to automate upfront. The article breaks the process into five workflow layers, shows how structured errors and intermediate artifacts create safe interfaces for AI assistance, and outlines a gradual path from a minimal working loop to reliable, assisted automation.

    Don’t Build AI Agents Yet: Start with Simple Workflows

    In complex engineering domains such as AI chip software stacks, compilers, drivers, and simulation-based verification, more teams are experimenting with AI coding tools or agents to automate code generation, defect localization, and solution migration. However, one common and important recommendation is this: don’t rush to build an AI agent—start with a simple workflow first. This is not a rejection of automation. It is a reminder that when the underlying pipeline is not clearly defined, inputs and outputs are not stable, and failures cannot be reproduced reliably, the benefits of an agent are often outweighed by the uncertainty it introduces.

    This is especially true for tasks like “build a complete software stack for a custom RISC-V AI chip and run high-level operators in a simulation environment.” Such a system spans multiple layers: user interfaces, the compiler framework, intermediate representations, driver startup, runtime, and functional simulation. If any layer is vaguely defined, automation turns into an uncontrollable “black-box guessing” process. A safer approach is to first decompose the complex task into deterministic workflows, then embed intelligent capabilities into specific nodes.

    1. Why Complex Systems Should Not Depend on Agents from the Start

    The core challenge of a complex software stack is not “writing a piece of code.” It is making multiple heterogeneous components work together under strict constraints. Take an AI chip software stack as an example. A high-level operator, initiated on the user side and eventually executed on a simulated chip, typically follows this path:

    1. User operator description
    2. → Front-end syntax and type checking
    3. → High-level intermediate representation
    4. → Shared/common intermediate representation
    5. → Low-level intermediate representation
    6. → Target code generation
    7. → Launch parameters and runtime packaging
    8. → User-space driver submission
    9. → Kernel-space driver handling
    10. → Simulation model execution
    11. → Result return and verification

    Every step in this chain has a clear contract: what the input is, what the output is, which error is returned on failure, how the cache key is generated, and how metadata is stored. If these contracts are not fixed as simple workflows, an agent can hardly determine whether the problem lies in front-end parsing, compilation lowering, link packaging, or the driver submission stage.

    Therefore, the first phase should prioritize establishing a “repeatable minimal closed loop”:

    1. Fix a minimal operator sample;
    2. Fix compilation options and the target architecture;
    3. Fix the simulation environment and result comparison method;
    4. Preserve intermediate artifacts at every step;
    5. Ensure any failure can be traced to a specific stage.

    Only on this foundation does automation have reliable boundaries.

    2. Replace One-Shot Agent Decisions with Five Workflow Layers

    During AI chip software stack integration, the system can be abstracted into five layers: the user layer, the operator framework layer, the chip compilation layer, the driver and launch layer, and the execution runtime and simulation layer. Each layer should correspond to a simple workflow, rather than having an agent cross all layers at once.

    1. User Layer: Keep the Interface Minimal

    The user layer is only responsible for describing computation logic and parallel structure. For example, it expresses block-level computation through a kernel function with a compilation decorator and specifies parameters such as grid size and block size. This layer should avoid exposing low-level hardware details and should only output a standardized operator request.

    Workflow essentials:

    • Validate tensor shapes, data types, and scalar parameters;
    • Generate a stable operator identifier;
    • Convert the user request into an intermediate source object recognized by the framework.

    2. Operator Framework Layer: Caching and Metadata Must Be Deterministic

    The framework layer converts the user description into a high-level intermediate representation and generates cacheable compilation artifacts. The most important aspect here is cache key design. A cache key is typically determined by the source code, compilation options, target architecture, data types, and block parameters together.

    Workflow essentials:

    • Generate the high-level intermediate representation;
    • Compute the cache key;
    • Query the local cache;
    • If there is no hit, enter the compilation layer;
    • Save metadata, including the target platform, entry symbol, and parameter layout.

    If an agent is introduced at this layer, it is only suitable for “compilation option recommendation” or “error message explanation.” It should not be allowed to directly rewrite the caching strategy.

    3. Chip Compilation Layer: Converge Uncertainty into a Pipeline

    The compilation layer is the most uncertainty-prone part of the entire chain because it involves multi-level intermediate representation conversion, target code generation, launch packaging, and linking. This is where free-form agent behavior is most harmful. A fixed pipeline should be used instead:

    1. High-level intermediate representation
    2. → Common shared intermediate representation
    3. → Low-level intermediate representation
    4. → Target assembly or binary
    5. → Automatically generated launch wrapper
    6. → Compilation runtime support code
    7. → Linked into a loadable artifact

    Workflow essentials:

    • Every conversion level outputs logs and intermediate files;
    • Unsupported syntax or data types produce explicit errors;
    • A minimal launch wrapper is generated automatically to avoid hand-written template drift;
    • The linking stage fixes library paths and symbol rules;
    • The artifact includes a manifest file recording dependencies and generation commands.

    Under this structure, an agent can take on the role of “providing fix suggestions based on error codes,” but it cannot replace the fixed pipeline.

    4. Driver and Launch Layer: Separate User-Space and Kernel-Space Responsibilities

    The compiled artifact must eventually be submitted to the simulated chip for execution, which requires cooperation between a user-space launch component and a kernel-space driver component. User space handles parameter packing, command construction, and submission. Kernel space handles resource checks, address mapping, command dispatch, and state reclamation.

    Workflow essentials:

    • User space generates a unified command description;
    • Kernel space performs validity checks;
    • Error return codes are clearly defined;
    • Submission sequence numbers and completion status are recorded;
    • Timeout and reset flows are supported.

    This layer especially requires determinism, because any error in address, length, or synchronization semantics can cause abnormal simulation results that are difficult to trace.

    5. Execution Runtime and Simulation Layer: Results Must Be Recomputable

    Final execution happens in a functional simulation model. The goal of this layer is not performance but functional correctness. Therefore, the workflow should emphasize recomputability and comparability:

    • Fix random seeds and input data;
    • Save reference computation results;
    • Compare output errors;
    • Output per-stage timing and status;
    • Preserve the full context on failure.

    Once this layer is stable, introducing intelligent analysis capabilities—such as automatically summarizing failure patterns, generating reproduction scripts, or recommending debugging entry points—delivers real value.

    3. How Simple Workflows Reserve Interfaces for Intelligent Capabilities

    “Start with simple workflows” does not mean rejecting agents forever. It means reserving clear interfaces for future intelligent capabilities. A mature workflow should provide three types of observable signals:

    1. Stage identifiers: whether the system is currently in compilation, linking, submission, or simulation;
    2. Structured errors: error codes, failed nodes, input summaries, and paths to relevant intermediate artifacts;
    3. Rollback-capable artifacts: every step can be re-run, rather than forcing a restart from the beginning.

    With these three types of signals, AI coding tools can safely take on auxiliary tasks, such as:

    • Recommending fix directions based on structured errors;
    • Generating candidate configurations for missing compilation options;
    • Clustering recurring failure patterns;
    • Automatically generating test cases and regression scripts;
    • Converting high-level operator descriptions into standardized templates.

    All of these capabilities build on deterministic workflows rather than letting an agent directly control low-level execution.

    4. Practical Advice: From a Minimal Closed Loop to Gradual Intelligence

    For teams preparing to build an AI chip software stack or a similar complex compilation and execution chain, a progressive approach is recommended:

    1. Get one minimal operator running first: support only one data type, one block configuration, and one simulation target;
    2. Fix intermediate artifact formats: make each layer’s output inspectable and comparable;
    3. Establish an error classification system: divide failures into six categories—syntax, type, resource, linking, submission, and execution;
    4. Introduce assistive intelligence: limit it to explanation, suggestions, and script generation, without directly modifying the critical path;
    5. Expand automation scope gradually: after regression testing is stable, progressively open up more automatic repair and automatic tuning capabilities.

    This approach may seem conservative, but it significantly reduces maintenance costs. What complex chip software stacks fear most is not having few features, but every change triggering unpredictable chain reactions.

    Conclusion

    The essence of “don’t build an AI agent yet—start with a simple workflow” is that engineering determinism takes priority over the imagination of automation. In a system like an AI chip software stack that spans compilation, drivers, runtime, and simulation, clearly defining each layer’s inputs and outputs, error semantics, and artifact formats is what allows subsequent intelligent capabilities to truly land. A simple workflow is not the endpoint; it is the prerequisite for reliable agent adoption.