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 · 20 min

Tools and schemas

Learn in five minutes

  • A tool is a function with a name, a schema, and a side effect you understand.
  • The model proposes arguments. Your code validates them.
  • Toolformer is a paper about models learning to call tools. It is not a product you must buy.
  • Lab 02 returns math from a tool, not from a fluent guess.
  • A tool that can send a message needs a human check in this lab's examples.

The tool get_sum(2, 2) returns 4 because the code adds. The model is not the calculator. The trace should show the tool result.

This section HTML

Visual

T5-R2 diagram

Diagram SVGDiagram PNGDiagram HTML

Flow SVGFlow PNGFlow HTML

Run the tool lab

  1. Run python3 labs/02-tool-call.py.
  2. Open the artifact.
  3. Find the number that came from the tool.
  4. Write one line: the model did not invent that number.

This section HTML

Quiz

Who computes the sum in lab 02?

The lab's point is the tool result.

What do you do with proposed arguments?

The schema is the gate.

What is Toolformer?

Schick and co-authors, 2023.

This section HTML

Ecosystem

Tool
A function the loop may call, with a schema and a known effect.

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