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
      • Prompts, Scripts, and Agents
      • The Agent Loop Step by Step
      • Agent Components
      • Agent Loop Simulator
      • When a Script Wins
    • Tool Use and Structured Output
    • Planning, Memory and Stopping
    • Multi-Agent Patterns and When Not to Use Agents
  • 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

‹What an Agent Is
  1. Topics
  2. AI Skills for VLSI Engineers
  3. Agents and Tool Use
  4. What an Agent Is
  5. The Agent Loop Step by Step

Tools, Workflows and Agents · Beginner to Intermediate

The Agent Loop Step by Step

Read, choose, run, and record: the four loop events and the step budget.

On this page

    The four loop events

    Each turn has four events: read the state, choose an action, run the tool, record the result. The loop repeats until a stopping rule fires.

    State to choose to execute to update and back, with a stop edge to end.
    Four events per turn: read state, choose, execute, update; stop leaves the loop.

    Results feed back in

    The result of step N is part of the input to step N+1. That feedback lets the loop change course after a surprising tool result.

    Event

    Reads

    Writes

    Read

    Goal, history, past tool results.

    Nothing.

    Choose

    The full current state.

    One action: a tool call or stop.

    Execute

    The chosen action and its inputs.

    A tool result.

    Record

    The tool result.

    The result appended to state.

    Step budget bounds the loop

    Every loop carries a maximum step count. The count guarantees termination even when the goal stays out of reach.

    Token counts below are stated example parameters. Real counts are approximate and tokenizer-dependent.

    plaintext
    1
    2
    3
    4
    stated example: start state 500 tokens, each step appends about 300 tokens of tool result
    full budget of 8 steps: 500 + 8 x 300 = 500 + 2400 = 2900 tokens
    early stop at step 5: 500 + 5 x 300 = 500 + 1500 = 2000 tokens
    unused budget costs nothing: steps never taken append nothing

    Common mistakes

    Common pitfall

    Logging only the final answer. Without per-step records of action and result, a failed run cannot be replayed or graded.

    Interview

    Likely probes: the four events and why the budget exists.

    • Read, choose, execute, record; stop is a choice, not a fifth event.

    • Feedback means step N+1 sees the result of step N.

    • The budget guarantees termination when the goal is unreachable.

    Check yourself The loop ran 8 steps with no answer and stopped. What fired?

    The step budget. The budget ends the loop when the goal is not reached first.

    Check yourself A tool result at step 2 contradicts the plan. Which loop event handles it?

    The next read-and-choose pass. Step 3 sees the updated state and picks a different action.

    Related topics

    • Agent components

    • Planning, memory and stopping

    Previous

    88 / 173

    Next: Agent Components

    Up next

    Up nextAgent Components

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Agent Loop Simulator
    • When a Script Wins