Function input

Specifies the input schema for a class.

  • A primitive type (String, Number, Boolean)
// Using primitive
@input(Boolean)
class BooleanAgent extends Agent<boolean, string> {}

// Using schema-decorated class
@input(UserProfile)
class UserAgent extends Agent<UserProfile, string> {}

// Using Zod schema directly
@input(z.boolean())
class BooleanAgent extends Agent<boolean, string> {}
  • Parameters

    • type: InputOutputType

      The input type specification, which can be:

      • A Zod schema
      • A class decorated with

    Returns ClassDecorator