loom-agents
Version:
A lightweight, composable framework for building hierarchical AI agent systems using OpenAI's API.
26 lines (25 loc) • 769 B
TypeScript
import { Agent, AgentRequest, AgentResponse } from "../Agent/Agent.js";
export interface RunnerConfig {
maxDepth?: number;
name?: string;
id?: string;
context?: Record<string, any>;
}
export interface RunnerResponse<T> extends AgentResponse<T> {
traceTree: any;
}
export declare class Runner {
private config;
private agent;
private traceSession;
constructor(agent: Agent, config?: RunnerConfig);
/**
* Runs the agent through potentially multiple turns,
* ensuring each turn is traced and ultimately returning the full trace tree.
*/
run(input: string | AgentRequest<any>): Promise<RunnerResponse<any>>;
/**
* Renders the entire trace tree as a formatted string.
*/
renderTraces(): string;
}