Skip to content

threads

composable llm workflows for node.js

npm add @threaded/ai

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

  1. create a thread to manage conversation history
  2. define tools the model can call
  3. compose workflow steps (model calls, scopes, conditions)
  4. execute and stream results
  5. repeat

next: quick start