Schema
Defining structured I/O
Where schemas are needed
@input(GreetingAgentRequest)
@output(GreetingAgentResponse)
export class GreetingAgent extends Agent<
GreetingAgentRequest,
GreetingAgentResponse
> {}@tool('Get weather info')
getWeatherInfo(weather: WeatherParams): string {
return `The weather is rainy today in ${weather.location}.`;
}Defining a schema
Example: Complete schema definition
Special annotations for enums and arrays
Validation decorators
Using Zod with AXAR
Defining Agent Input and Output with Zod
Using Zod with tools
Last updated