input_schema to validate dictionaries automatically.
Input Format Types
| Use Case | Input Format |
|---|---|
| You're building the input in code | Use Pydantic Model instance |
| Input comes from external sources (APIs, files, user input) | Use input_schema |
Using Pydantic Models
Pass a Pydantic model instance toinput:
ValidationError before the team runs.
Using input_schema
Set input_schema on the team to validate dictionaries automatically:
Handling Input ValidationError
Invalid input raises a Pydantic ValidationError:
Common Patterns
Multi-Topic Research
Scoped Analysis
Nested Configuration
Related
- Agent Structured Input: Configure structured input for agents
- Team Structured Output: Get validated output from teams