Function dumpAgentAnswer

  • Dumps the full agent message history scoped to the current signal.

    Resolves the active pending or scheduled signal automatically from execution context. Automatically detects backtest/live mode from execution context.

    Parameters

    • dto: {
          bucketName: string;
          description: string;
          dumpId: string;
          messages: MessageModel<MessageRole>[];
      }
      • bucketName: string

        Bucket name grouping dumps by strategy or agent name

      • description: string

        Human-readable label describing the agent invocation context; included in the BM25 index for Memory search

      • dumpId: string

        Unique identifier for this agent invocation

      • messages: MessageModel<MessageRole>[]

        Full chat history (system, user, assistant, tool)

    Returns Promise<void>

    Promise that resolves when the dump is complete

    Error if no pending or scheduled signal exists

    import { dumpAgentAnswer } from "backtest-kit";

    await dumpAgentAnswer({ bucketName: "my-strategy", dumpId: "reasoning-1", messages, description: "BTC long signal reasoning" });