agentlang
Version:
The easiest way to build the most reliable AI agents - enterprise-grade teams of AI agents that collaborate with each other and humans
70 lines • 2.36 kB
TypeScript
import { Instance } from './module.js';
export declare class MonitorEntry {
private input;
private result;
private error;
private timestamp;
private latencyMs;
private llm;
private llmPrompt;
private llmResponse;
private planner;
private flowStep;
private flow;
private decision;
constructor(statement: string);
getStatement(): string;
setResult(result: any): MonitorEntry;
getResult(): any;
setError(error: string): MonitorEntry;
getError(): string | undefined;
setLatencyMs(ms: number): MonitorEntry;
flagAsLlm(): MonitorEntry;
setLlmPrompt(s: string): MonitorEntry;
setLlmResponse(s: string): MonitorEntry;
flagAsPlanner(): MonitorEntry;
flagAsFlowStep(): MonitorEntry;
flagAsFlow(): MonitorEntry;
flagAsDecision(): MonitorEntry;
private static resultAsObject;
asObject(): object;
}
export declare function setMonitoringCallback(f: Function): void;
export declare function resetMonitoringCallback(): void;
export declare class Monitor {
private id;
private eventInstance;
private user;
private entries;
private parent;
private lastEntry;
private lastEntrySetAtMs;
private totalLatency;
private timestamp;
private flowResult;
private static MAX_REGISTRY_SIZE;
constructor(eventInstance?: Instance | undefined, user?: string | undefined);
getId(): string;
getEventInstance(): Instance | undefined;
getUser(): string | undefined;
getTotalLatencyMs(): number;
addEntry(entry: MonitorEntry): Monitor;
setEntryResult(result: any): Monitor;
setEntryError(reason: string): Monitor;
flagEntryAsLlm(): Monitor;
flagEntryAsPlanner(): Monitor;
flagEntryAsFlowStep(): Monitor;
flagEntryAsFlow(): Monitor;
flagEntryAsDecision(): Monitor;
setEntryLlmPrompt(s: string): Monitor;
setEntryLlmResponse(s: string): Monitor;
private finalizeLastEntry;
increment(): Monitor;
decrement(): Monitor;
setFlowResult(result: any): Monitor;
asObject(): object;
}
export declare function getMonitor(id: string): Monitor | undefined;
export declare function getMonitorsForEvent(eventName: string): Monitor[];
export declare function identifyMonitorNode(monitorNode: any): 'event' | 'agent' | 'decision' | 'flow';
//# sourceMappingURL=monitor.d.ts.map