skein-js
Build or adapt a TypeScript LangGraph.js project with skein-js for a server, desktop app, CLI, or daemon. Use for scaffolding, serving an existing langgraph.json, embedding graphs with memory, SQLite, or Postgres, or connecting Agent Protocol clients.
skein-js · Static checks on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add skein-js/skein-js --skill skein-jsAbout this skill
name: skein-js description: Build or adapt a TypeScript LangGraph.js project with skein-js for a server, desktop app, CLI, or daemon. Use for scaffolding, serving an existing langgraph.json, embedding graphs with memory, SQLite, or Postgres, or connecting Agent Protocol clients. license: Apache-2.0
Build with skein-js
skein-js hosts LangGraph.js graphs. LangGraph defines graph state, nodes, edges, tools, and execution; skein-js supplies the Agent Protocol engine, persistence, background work, and console. The same engine runs in a server or a local application. Use the existing LangGraph APIs and @langchain/langgraph-sdk client rather than inventing skein-specific graph or client abstractions.
Choose the shortest supported path
- New project: Inspect workspace markers first, then use
npm create skein-js@latest <name>in a new directory, or the Nx generator in an Nx workspace. Generated projects recommend Node 24, support^22.12.0 || ^24.0.0 || ^26.0.0, and enable ESLint/Prettier by default (--no-lintingopts out). Keep the keyless echo graph until the first server run succeeds. See scaffolding. - Existing
langgraph.json: Keep the config and graph exports; use the skein CLI in place of the LangGraph CLI. Check compatibility before changing any config field. - Graph compiled in an existing app: Pick the adapter for the app's framework and pass either
{ config }or assembled{ deps }. Mount the adapter at the intended URL and set the client'sapiUrlto that mount root. See using skein-js and embedding. - Desktop app, CLI, or daemon with local persistence: Scaffold with
npm create skein-js@latest <name> -- --storage sqlite, or embed graphs throughembedSqliteGraphsfrom@skein-js/local. Use the existing protocol service directly or an HTTP/SSE adapter with the existing SDK. See local deployment.
SQLite is an explicit option for Node 22/24/26 with one process owning each database file. Install the upstream SQLite saver as documented, supply an absolute sqlitePath when embedding, and let the host start its worker or adapter and stop it before disposing storage. A desktop UI and a separate daemon can use the same protocol; keep database ownership in the backend process. The Electron, Tauri, and CLI examples show supported host integration and native packaging.
Applications choose models, tools, credentials, process lifetime, and recovery behavior. A local app can use a cloud provider or a local model. SQLite records abandoned attempts as failures without automatically replaying input or continuing checkpoints; live stream frames remain process-local. Recover the UI from persisted records and state/history APIs.
Redis workers continue an attributable stalled run from its committed checkpoint without reapplying
accepted input. Make external effects idempotent: uncommitted work may repeat. Inspect
run_recovery_ambiguous failures before explicitly choosing recovery for older checkpoints.
Use compatible top-level webhooks headers/URL controls together with skein.webhooks signing and
retries. Restrictions intersect; explicit empty domain/port lists deny all. http.disable_webhooks
blocks caller callbacks without disabling host-owned outcomes. Header templates require existing,
prefix-allowed environment variables. http.configurable_headers and logging_headers use
case-insensitive includes/excludes with exclusions winning. Keep credentials out of logs.
http.disable_ui disables graph UI loading/building independently of Console. Preserve auth-first
dispatch and opt-in CORS. Non-default config checkpointer loaders require programmatic saver injection;
do not silently accept unapplied security or backend settings.
Scale queued work separately using the API/background-worker recipe.
Keep wait/stream inline, select maintenance-loop owners explicitly, and stop runtimes before driver
disposal. Preserve legacy run reject and thread-command enqueue defaults and documented ordering
limits. Do not add a CLI role or stronger FIFO promise to assemble an existing deployment pattern.
For a normal model and tool loop, prefer LangChain's createAgent; use a custom LangGraph StateGraph when the requested workflow needs explicit state or branching. For planning, files, and subagents, export a createDeepAgent() graph from the upstream deepagents package (support is experimental); give its StoreBackend a namespace built from langgraph_auth_user_id, use stream_subgraphs to stream subagents, and give async subagents an explicit url. See the Deep Agents recipe. Consult the installed LangGraph version and official LangGraph documentation for graph APIs. When skein manages a served graph, let it inject the checkpointer and store; do not pass them to .compile() yourself. See LangGraph essentials.
Documentation for the adopter
When documenting the generated application or explaining setup, teach the user's task, commands, expected result, and next step. Use the console guide for manual graph checks and Testing your project for repeatable assertions and a server smoke test. Keep repository CI and implementation details out of the adoption path; preserve public integration requirements and operational limits.