Class Agent<TInput, TOutput>Abstract

Base class for creating AI agents with standardized input/output handling, tool management, and model integration.

Type Parameters

  • TInput = any

    The type of input the agent accepts

  • TOutput = any

    The type of output the agent produces

Constructors

Methods

Constructors

Methods

  • Runs the agent with the given input and returns the output.

    Parameters

    • input: TInput

      The input (user prompt) to process

    Returns Promise<TOutput>

    Promise resolving to the processed output

    If input validation fails or processing errors occur