CypherMonkeyAI omni-channel lab

A lifelong-learner lab on AI omni-channel agents, including voice and the contact center. Free to read. Nothing sold.

Agents · L2 · 15 min

Step caps and traces

Learn in five minutes

  • A step cap is the maximum number of tool rounds.
  • Without a cap, a loop can repeat.
  • A trace lists each proposal, validation, result, and stop reason.
  • Lab 07 corrects a bad guess with a tool and then stops.
  • The stop reason is part of the artifact.

If the same tool returns the same result twice, stop. Another round will not add a fact. Write that rule next to the cap.

This section HTML

Visual

T5-R3 diagram

Diagram SVGDiagram PNGDiagram HTML

Flow SVGFlow PNGFlow HTML

Read the agent loop lab

  1. Run python3 labs/07-agent-loop.py.
  2. Read the artifact's steps.
  3. Find the stop.
  4. Confirm the bad guess was replaced by the tool result.

This section HTML

Quiz

What is a step cap?

It bounds the loop.

What belongs in the trace?

The path is the evidence.

What does lab 07 illustrate?

The loop ends on purpose.

This section HTML

Ecosystem

Trace
The ordered record of what the loop did.

Sisters: Workflows, State machines, Function calling.

The same loop can sit behind chat or a voice turn. The channel does not remove the cap.

MCP is one way to plug tools into that loop. It is the next track.

Config

  • Write the goal in one sentence.
  • Name the input and the allowed output.
  • Save the trace next to the result.

Troubleshooting

  • The answer looks fluent and is wrong. Check whether a source passage actually contains the claim.
  • The loop never stops. Set a step cap and stop when the tool result repeats.

This section HTML

Sources HTML

Sources and go deeper

sources.json