orchestral-media/orchestral

TypeScript library for building multimedia-generation agents: text-to-image, video, speech and audio pipelines with capability-based model routing, automatic cross-model fallback, and BYOK direct provider calls (no gateway). 27 built-in patterns, provider-SDK-free core.

Project Overview项目介绍

Orchestral is a TypeScript-based orchestration layer built for local-first, bring-your-own-key (BYOK) media generation applications, covering text-to-image, image-to-video, text-to-speech and speech recognition workflows. It lets developers request capabilities instead of specific models, routing requests to user-provided models, handling retries, and offering opt-in semantic fallback for unavailable capabilities. To install the core packages, run npm install @orchestral/core @orchestral/runtime @orchestral/patterns zod, as Zod v4 is a required peer dependency.

Orchestral does not ship any provider SDKs or API keys, so developers need to write a small ~15-line adapter to connect it to whatever SDK they already use for model calls. It complements existing tools like the Vercel AI SDK and LangChain, instead of replacing them: those tools handle single model calls and generic agent loops, while Orchestral handles media-specific logic that those tools do not cover. It is designed for developers building custom AI media generation pipelines that need capability routing and asset management.

The repository includes six runnable example hosts that cover different use cases, from a simple atomic text-to-image dispatch to a full long-form video generation pipeline. Most examples use mock models so they do not require API keys to run, only the basic text-to-image example needs an OpenAI API key. The project is released under the open-source Apache 2.0 license, and is currently in 0.x development, so minor versions may include breaking changes and developers should pin tested versions.

Orchestral 是一个基于 TypeScript 的媒体生成编排层,面向本地优先、自带密钥(BYOK)的应用,提供能力路由、可选择开启的语义降级 fallback 以及资产句柄协议能力。用户只需要描述生成步骤所需的能力(如文生图、图生视频、语音识别),无需指定具体调用哪个模型,由 Orchestral 将能力路由到用户自备的模型,支持内部失败重试和语义等价降级路径。

它适合开发自定义 AI 媒体生成应用的开发者,项目本身不自带模型提供商 SDK 或 API 密钥,需要用户自行编写约 15 行的适配器,对接已经在使用的任何模型 SDK。它和 Vercel AI SDK、LangChain 这类现有工具定位互补,专门覆盖后者没有处理的媒体生成特定逻辑,比如能力路由、资产句柄传递和语义降级处理。

项目采用 Apache 2.0 许可证开源,安装需要通过 npm 安装核心包,依赖 zod v4 作为对等依赖。仓库中自带 6 个可运行的示例,大部分示例使用模拟模型无需密钥,只有文生图基础示例需要 OpenAI API 密钥。当前处于 0.x 开发版本,小版本可能包含不兼容变更,需要固定测试过的版本集。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
  • No DSH plugin manifest detected - it may only carry the dsh-plugin topic, so the install method must be confirmed on the spot未检测到 DSH 插件清单:可能只是打了 dsh-plugin 话题,安装方式要现场确认
  • Not DSH-native: a multi-platform tool that may require Node / Electron or another runtime first非 DSH 原生,是多平台兼容工具:可能要先装 Node / Electron 等运行时
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:orchestral-media/orchestral

把 orchestral-media/orchestral 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

Orchestral

License: Apache-2.0

A TypeScript orchestration layer for media generation — text-to-image, image-to-video, text-to-speech, speech recognition — built for local-first, BYOK apps: capability routing, opt-in semantic fallback, and an asset-handle protocol.

You describe what a step needs (text-to-image, image-to-video, automatic-speech-recognition, …), not which model to call. Orchestral routes that capability to a model you supplied, retries inside the router, knows the semantically equivalent paths a capability without a model could degrade through (reporting them on failure by default; redirecting automatically is opt-in), and passes generated media between steps as opaque handles the host resolves. It ships no provider SDK and no API keys — calling a model is a ~15-line adapter you write, over whichever SDK you already use. Everything runs in your process; there is no hosted control plane.

How it relates to the AI SDK / LangChain

Different layers, and Orchestral expects you to keep using the others:

  • A provider SDK (the Vercel AI SDK, an official vendor SDK) owns one model call — auth, request shape, streaming, transport retries. Your Orchestral call adapter is usually a dozen lines over one of these; the examples here use the AI SDK's generateImage.
  • An agent framework (LangChain / LangGraph, the AI SDK's own tool loop) owns the generic tool loop — planning, memory, a graph of steps. Orchestral's agent patterns delegate the loop to whichever one you inject.
  • Orchestral owns what neither covers for media: routing a capability rather than a model id, declaring semantically equivalent fallback paths for when no model serves that capability, and threading generated assets between steps as handles instead of raw ids.

Quickstart

npm install @orchestral/core @orchestral/runtime @orchestral/patterns zod

Three optional packages sit on top: @orchestral/plan (a pipeline authored as data — the schema, the validation, the interpreter and the preflight; you get it transitively with the catalog, and install it directly to build or preflight a plan yourself), @orchestral/discovery (the BM25 search behind a find_pattern tool — the runtime asks a host for retrieval rather than depending on one, so install this to give an agent loop a find_pattern tool) and @orchestral/agent (the orchestrator agent pattern). None of them pulls in a provider SDK. A fourth, @orchestral/adapters-ai-sdk, is the one package that does: it wraps a Vercel AI SDK model instance as a ready-made ModelCapability, so a host already on the AI SDK skips writing the call adapter. It is a leaf — nothing in @orchestral/* depends on it.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev solidworks-wlj-dsh 下一个 Next scnu-thesis-formatter →