threads
composable llm workflows for node.js
core principles
- function composition over configuration
- explicit conversation history management
- tool execution built-in with approval flows
- works with openai, anthropic, google, xai
- text embeddings and image generation
workflows are functions that transform conversation context. compose them together to build complex (or simple) agentic behaviors.
in general
- create a thread to manage conversation history
- define tools the model can call
- compose workflow steps (model calls, scopes, conditions)
- execute and stream results
- repeat
next: quick start