MODULE 7 DEEP DIVE  ·  CONTAINERS FOR GENAI & AGENTIC AI

The four knobs nobody explained

crew.py ran end to end in the lab — this deck opens it up and asks why

temperature per agent, not per crew iteration no loop, no retry delegation a plain string baton gates code, not a prompt what crew.py actually does

Gourav Shah  ·  School of DevOps & AI  ·  Deep Dive (Part 2)

M7-DD·01

Low temperature plays the melody exactly as written, every time

Low temperature: reads the score exactly. High: improvises, sometimes off-key.

sheet music temp = 0 reads the score exactly temp = 0.9 improvises, notes scatter
M7-DD·02

Three of four agents pin temperature=0 on purpose

crew.py's four llm() call sites, read directly — one exception stands out

T I F R Triage — temp 0 one correct AREA/SEV label exists; no benefit to variety Investigator gate — temp 0 yes/no safety decision feeds an if — variety means flaky gating Fixer — temp 0.2 (default, unset) phrases prose around a fact; the command still must come verbatim from the runbook Reviewer — temp 0 APPROVED/REJECTED is binary; the code branches on it directly
M7-DD·03

Raising a classifier's temperature removes repeatability, not adds creativity

More temperature on a classifier isn't more capable — it's less repeatable

Triage temp=0 Investigator gate temp=0 Fixer temp=0.2 (default) Reviewer temp=0 raise this to 0.9 → §6 measures it
M7-DD·04

Someone who never stops re-googling the same question

No rule saying "three tries" — the loop can keep going indefinitely

search: "fix 503..." "fix 503 error" "503 checkout bug" "why 503 all users" "checkout down fix" discarded attempts, no stopping rule
M7-DD·05

A ReAct loop can cycle back to "reason" again — until something stops it

The reason-call-observe-decide loop this crew deliberately isn't

reason call tool observe good enough to answer? final answer yes no — try again iteration cap (if none: runs until timeout)
M7-DD·06

This crew costs exactly 5 model calls, always

retrieve() runs once — run() has no while loop and no retry branch

1 2 3 4 5 Triage retrieval relevance gate Fixer (0/1) Reviewer (0/1) predictable p99 cost & latency no code path runs 10× instead of 1×
M7-DD·07

A relay race passes the baton, not the runner's whole race so far

Each runner gets only the baton — not the whole race behind them

runner 1 runner 2 runner 3 baton = one string baton = one string
M7-DD·08

Triage's classification is printed for you — and thrown away by the code

retrieve() uses the raw incident string — never Triage's classification

incident raw string argument Triage → AREA/SEV printed only — a dead end Investigator retrieve(incident) console output for a human the actual query
M7-DD·09

Fixed order sidesteps two failure modes a dynamic router doesn't

A hard-coded run() order sidesteps both failure modes below

context dilution growing shared history (most of it irrelevant to this agent) agent spends attention parsing it instead of doing its one task error cascade manager re-summarizes a finding early mistake gets smoothed over invisible to everything downstream
M7-DD·10

Two gates, two Python string checks, zero follow-up prompts

Two deterministic string checks — not a second model policing the first

relevance gate .upper().startswith("YES") on the Investigator's answer deterministic — not a 2nd model call reviewer gate .upper().startswith("APPROVED") on the Reviewer's verdict deterministic — not a 2nd model call
M7-DD·11

Gate 1 sits after the tool call, Gate 2 sits at final-answer time

Where the two real gates physically sit in the pipeline

retrieval relevance gate 1 Fixer reviewer gate 2 OUTCOME after tool call, before Fixer acts before a human sees it gate 3: before a tool call not needed — query is never LLM-chosen
M7-DD·12

No debug flag — read the profile file and the f-string instead

No DEBUG flag — read the profile file plus run()'s f-string instead

1 2 3 docker compose run prints [TRIAGE] [INVESTIGATOR] [FIXER] [REVIEWER] OUTCOME: — outputs only cat crew/profiles/investigator.md the full system prompt each agent is built from profile + f-string = the complete prompt nothing else gets concatenated in — no hidden step
M7-DD·13

Same incident, three knob variants, always run one at a time

Sequential only — parallel runs would hide a knob change inside ordinary noise

1 2 3 baseline — unmodified crew.py the lab's own run, sequential, never parallel Variant A — Triage temp 0 → 0.9, ×3 repeats sequential, never parallel Variant B — relevance gate bypassed sequential, never parallel
M7-DD·14

The outcome held at 0.9 — the prose didn't

Three real repeats at temp 0.9 — the outcome held, the prose didn't

run 1 terse stayed on the profile's "be terse" instruction run 2 run-on sentence drifted from the expected terse shape run 3 unrequested ### sections broke the profile's format entirely OUTCOME: APPROVED — all 3 runs
M7-DD·15

Bypass one gate and the crew launders a fabricated command through two agents

Gate bypassed: wrong runbook, a fabricated command, approved anyway

payments runbook (wrong section — incident is Kafka) APPROVED fabricated command, approved anyway
M7-DD·16

The gate pins the marker — remove it and the marker stops being pinned

Wrong runbook repeats every run — OUTCOME stable only while gate holds

1 2 3 baseline — APPROVED, 5 calls the reference run, nothing changed Variant A — APPROVED ×3, prose drifted structural outcome stable; wording is not Variant B — gate removed, wrong runbook every run but OUTCOME itself flips run to run — not stable
M7-DD·17

MODULE 7 DEEP DIVE  ·  TAKEAWAYS

Pin the gates, bound the loop, check what really crosses each hop

! 1 2 3 4 small-model variance: low temperature stabilizes the outcome marker faster than the prose temperature is a per-agent-role decision — pin classification and safety gates at 0 a bounded pipeline trades self-correction for a predictable cost and latency SLO delegation is only as safe as what crosses each hop — check what's really passed a code-level gate beats a follow-up prompt — it can't be talked out of its answer

Next: apply these levers to a real crew.  ·  Gourav Shah  ·  School of DevOps & AI

M7-DD·18