@schift-io/workflow-langgraph
v0.1.4
Published
Project Schift Workflow v2 YAML artifacts into LangGraph.js graphs.
Maintainers
Readme
@schift-io/workflow-langgraph
Project a Schift Workflow v2 artifact into a LangGraph.js metadata/config graph. This adapter preserves block topology and block configuration as node output metadata; it does not execute Schift Workflow v2 blocks or call providers.
import { Schift } from "@schift-io/sdk";
import { asLangGraph } from "@schift-io/workflow-langgraph";
const schift = new Schift({ apiKey: process.env.SCHIFT_API_KEY! });
const wf = schift.workflow({ yaml });
const graph = await asLangGraph(wf, { state: { messages: [] } });
const projection = await graph.invoke({
messages: [{ role: "user", content: "계약서 리스크 봐줘" }],
});@langchain/langgraph is loaded dynamically when asLangGraph() is called.
Use the resulting graph as a projection surface for routing, inspection,
checkpointing, or caller-owned node middleware. Full Workflow v2 execution
belongs to the Schift runtime APIs, not this package adapter.
Generic AWP contract gates compiled through Workflow v2, including validate,
data_source, guard, and qc, are preserved as graph nodes with their block
configuration. Caller-owned node middleware can attach real API fetches, policy
checks, and QC evaluators to those nodes.
