Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Getting Started with AI for VLSI Engineers5
  • Just Enough AI: Models and Context15
  • Prompting13
  • Trust and Verification14
  • Using AI for Engineering Work17
  • Engineering Walkthroughs7
  • Practical Foundations for AI Workflows4
  • Engineering Data5
  • Retrieval-Augmented Generation6
  • Agents and Tool Use18
    • What an Agent Is
    • Tool Use and Structured Output
    • Planning, Memory and Stopping
    • Multi-Agent Patterns and When Not to Use Agents
      • Planner, Worker and Reviewer Patterns
      • Hand-off Cost and Error Compounding
      • Complexity and Debuggability
      • Script, Workflow or Agent
  • Agent Design8
  • MCP and Skills6
  • Multi-Agent Design6
  • Practical Capstone6
  • Tokens, Cost and Latency12
  • Agentic Workflows for Chip Teams18
  • Interview and Judgment10
  • AI Skills: Full Course Index
  • Working with AI Glossary
  • Working with AI Cheatsheet
Loading lesson

‹Multi-Agent Patterns and When Not to Use Agents
  1. Topics
  2. AI Skills for VLSI Engineers
  3. Agents and Tool Use
  4. Multi-Agent Patterns and When Not to Use Agents
  5. Script, Workflow or Agent

Tools, Workflows and Agents · Beginner to Intermediate

Script, Workflow or Agent

A decision table for script versus workflow versus agent, with worked costs.

On this page

    Three ways to automate

    A script runs fixed code with no model calls. A workflow runs fixed steps that call a model at chosen points, and an agent chooses its own steps toward a goal.

    Situation

    Use

    Why

    Fixed inputs, fixed checks

    Script

    Deterministic, cheap and reviewable; no model variance.

    Fixed steps with judgment calls inside

    Workflow

    Structure stays fixed while a model handles the fuzzy steps.

    Open-ended task, unknown steps

    Agent

    Only an agent can plan when the path is not known upfront.

    High stakes or irreversible actions

    Script or workflow with approval

    Fixed paths plus human gates beat free exploration.

    A worked cost comparison

    The example below uses abstract units, not any real price. Forty log files need the same triage, and both routes are estimated in the same units.

    plaintext
    1
    2
    3
    4
    5
    6
    example parameters: 40 files, costs in abstract units
    script route: 120 authoring + 40 runs x 1 = 120 + 40 = 160
    agent route: 40 files x 8 + 25 review = 320 + 25 = 345
    difference: 345 - 160 = 185, so the script route costs less here
    crossover illustration: at 4 files the agent route costs 4 x 8 + 25 = 57
    against a script at 120 + 4 = 124, so few runs favor the agent route
    example.py
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    def check(cond, msg):
        if not cond:
            print("FAIL: " + msg)
            raise SystemExit(1)
    
    files = 40
    script_total = 120 + files * 1
    agent_total = files * 8 + 25
    check(script_total == 160, "script total wrong")
    check(agent_total == 345, "agent total wrong")
    best = "script" if script_total < agent_total else "agent"
    check(best == "script", "choice wrong")
    print("PASS: script total 160 beats agent total 345 across 40 files")

    Rules of thumb

    • Start with a script for anything run more than a few times with fixed checks.

    • Promote to a workflow when one or two steps need judgment but the path is fixed.

    • Promote to an agent only when the step sequence itself is unknown upfront.

    • Recheck the choice after the run count grows: repetition favors scripts.

    Common mistakes

    The standard mistake is automating with an agent first and scripting later. That order pays model cost on every run while the shape of the task is still being learned.

    Common pitfall

    An agent loop over hundreds of identical files multiplies cost and variance for no planning benefit. One scripted pass with a fixed check does the same work deterministically.

    Interview

    Likely probes: defending the choice with numbers.

    • Name the run count, the per-run cost and the authoring cost in one breath.

    • Fixed checks with many runs point to a script; unknown paths point to an agent.

    • Irreversible actions need approval gates whatever the route.

    Check yourself A nightly regression triages 200 identical log files with a fixed checklist. Which route, and why?

    A script. The checks are fixed and runs repeat nightly, so deterministic code wins on cost and variance.

    Check yourself In the worked example, which route costs less at 40 files, and by how much?

    The script route: 160 against 345, a gap of 185 units.

    Related topics

    • Hand-off cost and error compounding

    • Scripts and automation

    • Evaluating and operating agents

    Previous

    104 / 173

    Next: Agent Design

    Up next

    Up nextAgent Design

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Planner, Worker and Reviewer Patterns
    • Hand-off Cost and Error Compounding