@agent-graph/core
Version:
A lightweight AI Agent orchestration solution
33 lines • 1.16 kB
TypeScript
import { VertexId } from './vertex';
import { Graph } from './graph';
import { Checkpointer, States, Steps } from './checkpoint';
import { GraphRuntime, Interrupt } from './runtime';
/**
* Lifecycle: run(init) -> superstep() -> interrupt() -> superstep() -> exit() -> ... -> shutdown()
* */
export declare class CompiledGraph<C, V extends VertexId = never> {
running: boolean;
readonly context: C;
readonly version = 1;
readonly builder: Graph<C, V>;
readonly checkpointer?: Checkpointer<V>;
readonly interruptVectorTable: Interrupt[];
readonly shutdownHooks: (() => void | Promise<void>)[];
constructor({ builder, context, checkpointer, }: {
builder: Graph<C, V>;
context: C;
checkpointer?: Checkpointer<V>;
});
private interrupt;
private exit;
private addShutdownHook;
private shutdown;
get runtime(): GraphRuntime<C>;
private activeAllVertices;
private setVertexStates;
private getVertexStates;
private compute;
private superstep;
run(initialSteps: Steps<V>, initialStates: States<V>): Promise<void>;
}
//# sourceMappingURL=compiled-graph.d.ts.map