@tensflare/crewai
Installation
npm install @tensflare/crewai
Overview
CrewAI middleware patches task execution to record inputs and outputs as Truss actions. It wraps a CrewAI task's execute method to capture and hash all data flowing through the task.
API
TrussCrewMiddleware
import { TrussCrewMiddleware } from "@tensflare/crewai";
const truss = new TrussCrewMiddleware({
apiUrl: "...",
apiKey: "...",
mandateId: "...",
});
truss.wrapTask(myTask);
wrapTask(task)
Patches a CrewAI task's execute method, recording a crew_task action type on each execution.
Key Features
- Records
crew_taskaction type - SHA-256 hashing of task inputs and outputs
- Patches task execution transparently
- Minimal integration overhead — call once per task