Skip to main content
The following sections trace one user question through the full agent execution cycle: skill match, instruction load, tool call, script runs, reference read, and final answer. Each step shows exactly what loads and when.

Sample utterance

“Is Gadget Max running low? Do we need to reorder?”

Step 1 Skill matching

The agent holds two skills: order-placement and inventory-check. It compares each skill’s description field against the utterance.
The utterance contains “running low” and “reorder”, which matches inventory-check, not order-placement. The agent loads only this skill’s full instructions into context. Tool access narrows to allowed-tools: check_inventory plus any agent-level tools (get_customer_profile).

Step 2 Instruction load

The full inventory-check SKILL.md body enters context. The first instruction reads:
The agent resolves “Gadget Max” to SKU-002 through catalog lookup, then calls the tool.

Step 3 Tool call

The tool returns:

Step 4 Script run check_stock.py

The skill instructions say to run check_stock.py with the retrieved values:
The script computes:
The script returns:

Step 5 Reference read INVENTORY_GUIDE.md

The skill instructions send the agent to INVENTORY_GUIDE.md for threshold definitions and escalation rules. The file is not preloaded, it fetches now because the critical status needs to interpret. The guide confirms:
The escalation table adds the required action:
The guide also points to a second script for the reorder calculation.

Step 6 Script run calc_reorder.py

Because reorder_needed is true, the guide instructs the agent to run calc_reorder.py:
The script computes:
The script returns:

Final answer

The agent combines the tool output, both script results, and the guide’s escalation line into one reply:
Gadget Max (SKU-002) is critical, 0.6 days of supply left (5 units at 8.5 per day demand). Recommend ordering 170 units now (reorder point 85, safety stock 26). Per policy, alert the supply chain team and request an expedited shipment.

What loaded and in what order

Nothing from order-placement loads. That skill’s SKILL.md, scripts, and reference all stay out of context because the utterance does not match its description.

Tool visibility during execution

While inventory-check runs, the agent’s available tool set is check_inventory (from allowed-tools) plus the agent-level tool get_customer_profile. The order-placement tools create_order and update_order_status are not visible or callable at any point in this run. The model cannot see them, cannot call them, and has no knowledge of them. Each skill sees only its own allowed-tools plus agent-level tools, never another skill’s.

Next steps