@tensflare/autogen

Installation

npm install @tensflare/autogen

Overview

AutoGen middleware captures multi-agent conversation messages as Truss actions. It records the last two messages (prior output and current response), hashes their content with SHA-256, and sends them to the Truss API.

API

TrussAutoGenMiddleware

import { TrussAutoGenMiddleware } from "@tensflare/autogen";

const truss = new TrussAutoGenMiddleware({
  apiUrl: "...",
  apiKey: "...",
  mandateId: "...",
});

const wrappedHandler = truss.wrapAgent();

wrapAgent()

Returns a function wrapping agent message handling, recording an autogen_message action type for each captured message pair.

Key Features

  • Records autogen_message action type
  • Captures last two messages (prior output + current response)
  • SHA-256 hashing of message content
  • Seamless integration with AutoGen agent message loops