Skip to content
AgenticAIWiki

← Chapter 42. The agent loop and agent SDKs

Gather, act, check, repeat

contextchangeresultgo againTaskfix failing testGather contextread test and codeTake actionedit the functionCheck the workrun the testsDecidecontinue or stop?

Swipe to change step

Step 1 of 8. The loop starts by gathering context. Good agents look before they act: here it reads the failing test and the code it covers. Task (fix failing test). Gather context (read test and code), highlighted. Take action (edit the function). Check the work (run the tests). Decide (continue or stop?). arrow from Task to Gather context. arrow from Gather context to Take action, labelled context. arrow from Take action to Check the work, labelled change. arrow from Check the work to Decide, labelled result. arrow from Decide to Gather context, labelled go again. a task moving along e0.

Keys: → or J next, ← or K back, Home and End jump, Space toggles auto-play when the diagram has focus.