Tutorials Agents Lab

Design Input/Output Contracts

Intermediate AI Evaluated
Context
AI Hub validates agent I/O against these contracts before and after each call. Invalid messages are rejected immediately. Both use JSON Schema v7 syntax: {"type": "object", "properties": {"field": {"type": "string"}}, "required": ["field"]} Enum fields use: {"type": "string", "enum": ["VALUE1", "VALUE2"]}

Your Challenge

Write the JSON Schema `input_contract` and `output_contract` for the complaint classifier from the previous exercise. Each contract must be a valid JSON Schema object with `type`, `properties`, and `required` fields. The input receives a customer message; the output returns category, confidence, and summary.
Need a hint?

Start the output_contract with: {"type": "object", "properties": {"category": {"type": "string", "enum": [...]}

Log in to submit your answer and receive AI feedback.

← Back to Module Next Exercise →