Interface Action

Main Action interface inspired by ELIZA This interface makes it easier to implement actions across different frameworks

interface Action {
    description: string;
    examples: ActionExample[][];
    handler: Handler;
    name: string;
    schema: ZodType;
    similes: string[];
}

Properties

description: string

Detailed description of what the action does

examples: ActionExample[][]

Array of example inputs and outputs for the action Each inner array represents a group of related examples

handler: Handler

Function that executes the action

name: string

Unique name of the action

schema: ZodType

Zod schema for input validation

similes: string[]

Alternative names/phrases that can trigger this action