Choose an agent or a fixed workflow

Decide when an agent can take useful next steps, which work can run independently, and what evidence should make a run stop.

Choose between a fixed process and an agent

A fixed process fits when all next steps are known. An agent is useful when the next valid step depends on an observation, such as a transient network response. In either case, give the runner a result it can compare with the objective.

Building effective agents

Work through a late inventory feed

A daily import expects files for North, South, and West. It sees North and West at 09:00. South returns a temporary service error. Decide whether to send the daily count, retry South, or ask two workers to retrieve the same file.

Define the expected decision

Allow one retry for South after its delay. In parallel, a separate worker can compare required headers on North and West without changing the import. The final result should say whether each region was received and report the total only once all required files pass.

Check the stopping condition

If South still fails after the allowed retry, return a partial-state report with the affected region and contact owner. Replay with a malformed North file. A retry addresses a temporary service error, while a malformed file needs a validation finding.

Related reading

Claude is not a search engine

Subagents are for separable work

Define success before execution