Schema Validation Between Agents
In this article
- Explain why the sender and the receiver of a message between agents both validate it, and why the receiver's check decides.
- Name the envelope fields every message carries and what each one lets the receiver check.
- Decide whether a broken message is rejected or sent to a person, without filling in or rewriting any field.
- Spot a result that fits its schema but breaks a rule of the business, including a partial one.
- Terms defined here: message envelope.
Overview
Some systems split the work: a planner agent breaks a request into steps and hands each to a worker agent, another program with its own model and tools. One request from start to finish is a run, with its own id.
A made-up online shop's support agent issues refunds through a create_refund tool, and order O-1042 was paid 49.00 EUR. Before any money moves, the planner hands the question "how much of this order can be refunded?" to the worker and waits for the answer. The hand-off and the reply are both messages, and either can arrive with a field missing, the wrong customer account, an unknown version or an impossible number. You will see what every such message carries, who checks it, and what the receiver does when a check fails: reject it or stop for a person, never quietly repair it.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Two checks, one decision
- The envelope
- One good round trip
- Four broken replies
- Fits the schema, breaks the rule
- The receiver's check order
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions