UNPKG

@agent-graph/core

Version:

A lightweight AI Agent orchestration solution

15 lines 893 B
import { Vertex, VertexId } from './vertex'; import { GraphRuntime } from './runtime'; import { BuiltGraph } from './built-graph'; import { Checkpointer } from './checkpoint'; export declare class Graph<C = never, V extends VertexId = never> { readonly vertices: Map<V, Vertex<V, C, undefined, unknown, unknown>>; readonly edges: Map<V, (props: unknown, state: unknown, runtime: GraphRuntime<C>) => Vertex<V, C>[] | Promise<Vertex<V, C>[]>>; addV<K extends VertexId, S, I, O>(vertex: Vertex<K, C, S, I, O>): Graph<C, V | K>; addE<S, I, O>(from: Vertex<V, C, S, I, O>, to: (props: Readonly<O>, state: Readonly<S>, runtime: GraphRuntime<C>) => Vertex<V, C, unknown, O>[] | Promise<Vertex<V, C, unknown, O>[]>): this; build({ context, checkpointer }: { context: C; checkpointer?: Checkpointer<V>; }): BuiltGraph<C, V>; } //# sourceMappingURL=graph.d.ts.map