Composable LLM workflows for Node.js. Multi-provider support, tool execution, streaming, structured output, and approval workflows.
npm install @threaded/aiimport{compose,scope,model,setKeys}from"@threaded/ai"setKeys({openai: process.env.OPENAI_API_KEY})constworkflow=compose(scope({tools: [searchTool]},model({model: "openai/gpt-4o-mini"})))constresult=awaitworkflow("find recent papers on WebSockets")console.log(result.lastResponse.content)Full API docs, usage guides, and examples are in the threads/ package and at the docs site.
Working examples are in the examples/ directory.
ISC