Lesson 2 of 6 · 0%Trace one request through the agent loopNext
Course map

Foundations and Architecture

0 of 6 complete0 of 6

Lesson 2.1 · 40 minutes

Trace one request through the agent loop

Follow a bounded inbound message from routing through model work and a tool decision to a recorded response without confusing a plan with an action.

Skip course map
Current lessonTrace one request through the agent loop0% complete · 0/6 lessons

Foundations and Architecture

0% complete · Current: Trace one request through the agent loop

Verifiedon 2026.7.1-2

Action boundary

Before you act

Expected result
A request trace identifies the inbound source, session selection, agent turn, any tool boundary, outbound route, and retained evidence.
Failure mode
An implied or model-proposed action is recorded as completed, or a trace includes private prompts, credentials, or recipient content.
Rollback
Make no external action. Redact or discard the trace and repeat with a synthetic message in a disposable environment.

A request is a sequence, not a magic answer

The Gateway accepts a request, routes it to an agent session, and exposes the run through its typed interface. The agent loop builds context, invokes the configured model, may request a tool, receives the tool result, and produces a final response. A tool request is not proof that a side effect occurred; treat the tool result and the outbound delivery record as separate evidence.

inbound message
  → Gateway validates + routes
  → session context + agent run
  → model proposes text or tool call
  → policy / approval / sandbox boundary
  → tool result or refusal
  → final response → configured reply route
  → bounded record: run, outcome, owner, follow-up

Lab: trace a harmless request

Use the instructor’s synthetic prompt: “Summarise this three-line local note and do not send it anywhere.” Record only the timestamps, component names, and outcome categories—not the note or full model transcript. Mark where the system would cross a boundary if the prompt instead asked it to read a file, call a web service, or send a message.

Then change one line in the trace: replace “tool call” with “tool proposal until result is observed.” That wording prevents a common incident-reporting error.

Decision check

A model says it sent a message. What evidence proves delivery? The model text does not. Look for the tool or channel result appropriate to the configured route, and keep only the minimum redacted identifiers needed for handoff. If the target is a real person or system and permission is unclear, stop rather than use the trace as authorization.

Source provenanceVerification and sources

Review receipt rr_foundations_request_path

Outcome
approved
Method
source-review
Reviewer
forge-independent-review
Reviewed

Evidence

Limitations

  • Primary-source editorial review; the synthetic lab does not authorise external actions.

Open the public evidence snapshot

Lesson checkpoint

Ready to move on?

Mark this lesson complete when you can apply its outcome without relying on the examples above.