@langwatch/scenario
    Preparing search index...

    Class AgentAdapterAbstract

    Abstract base class for integrating custom agents with the Scenario framework.

    This adapter pattern allows you to wrap any existing agent implementation (LLM calls, agent frameworks, or complex multi-step systems) to work with the Scenario testing framework. The adapter receives structured input about the conversation state and returns responses in a standardized format.

    class MyAgent extends AgentAdapter {
    role = AgentRole.AGENT;

    async call(input: AgentInput): Promise<AgentReturnTypes> {
    const userMessage = input.messages.find(m => m.role === 'user');
    if (userMessage) {
    return `You said: ${userMessage.content}`;
    }
    return "Hello!";
    }
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    name?: string
    role: AgentRole = AgentRole.AGENT

    Methods