Genkit JS API reference
    Preparing search index...

    Interface ActionMetadata<I, O, S>

    Action metadata.

    interface ActionMetadata<
        I extends z.ZodTypeAny = z.ZodTypeAny,
        O extends z.ZodTypeAny = z.ZodTypeAny,
        S extends z.ZodTypeAny = z.ZodTypeAny,
    > {
        actionType?:
            | "custom"
            | "prompt"
            | "model"
            | "tool"
            | "dynamic-action-provider"
            | "embedder"
            | "evaluator"
            | "executable-prompt"
            | "flow"
            | "indexer"
            | "background-model"
            | "check-operation"
            | "cancel-operation"
            | "reranker"
            | "retriever"
            | "tool.v2"
            | "util"
            | "resource"
            | "agent"
            | "agent-snapshot"
            | "agent-abort";
        description?: string;
        initJsonSchema?: JSONSchema7;
        initSchema?: z.ZodTypeAny;
        inputJsonSchema?: JSONSchema7;
        inputSchema?: I;
        key?: string;
        metadata?: Record<string, any>;
        name: string;
        outputJsonSchema?: JSONSchema7;
        outputSchema?: O;
        streamSchema?: S;
    }

    Type Parameters

    Index

    Properties

    actionType?:
        | "custom"
        | "prompt"
        | "model"
        | "tool"
        | "dynamic-action-provider"
        | "embedder"
        | "evaluator"
        | "executable-prompt"
        | "flow"
        | "indexer"
        | "background-model"
        | "check-operation"
        | "cancel-operation"
        | "reranker"
        | "retriever"
        | "tool.v2"
        | "util"
        | "resource"
        | "agent"
        | "agent-snapshot"
        | "agent-abort"

    The type of action (e.g. 'prompt', 'flow').

    description?: string

    Description of the action.

    initJsonSchema?: JSONSchema7

    JSON schema of the initialization data.

    initSchema?: z.ZodTypeAny

    Schema of the initialization data.

    inputJsonSchema?: JSONSchema7

    Input JSON schema.

    inputSchema?: I

    Input Zod schema.

    key?: string

    Registry key (unique identifier).

    metadata?: Record<string, any>

    Metadata for the action.

    name: string

    The name of the action.

    outputJsonSchema?: JSONSchema7

    Output JSON schema.

    outputSchema?: O

    Output Zod schema.

    streamSchema?: S

    Stream Zod schema.