import type { JSONSchema7 } from "json-schema"; type Optional = T | null | undefined; export interface Config { /** * Tags for this call and any sub-calls (eg. a Chain calling an LLM). * You can use these to filter calls. */ tags?: string[]; /** * Maximum number of times a call can recurse. * If not provided, defaults to 25. */ recursion_limit?: number; /** * Runtime values for attributes previously made configurable on this Runnable. */ configurable: { /** * ID of the thread */ thread_id?: string; /** * Timestamp of the state checkpoint */ thread_ts?: string; [key: string]: unknown; }; } export interface GraphSchema { /** * The ID of the graph. */ graph_id: string; /** * The schema for the graph state */ state_schema: JSONSchema7; /** * The schema for the graph config */ config_schema: JSONSchema7; } export type Metadata = Optional>; export interface Assistant { assistant_id: string; graph_id: string; config: Config; created_at: string; updated_at: string; metadata: Metadata; } export type AssistantGraph = Record>>; export interface Thread { thread_id: string; created_at: string; updated_at: string; metadata: Metadata; } export type DefaultValues = Record[] | Record; export interface ThreadState { values: ValuesType; next: string[]; checkpoint_id: string; metadata: Metadata; created_at: Optional; parent_checkpoint_id: Optional; } export interface Run { run_id: string; thread_id: string; assistant_id: string; created_at: string; updated_at: string; status: | "pending" | "running" | "error" | "success" | "timeout" | "interrupted"; metadata: Metadata; }