@drewswiredin/backstage-plugin-assistants-backend

中文文档
0.23.1发布于 2026/11/14Apache-2.0TypeScriptCommonJS近 30 天下载 3160

Backend for AI Assistants for Backstage: streams replies and runs Backstage actions as the user.

原始使用文档
文档目录5 节
  1. Requirements
  2. Install
  3. Minimal configuration
  4. Documentation
  5. License

@drewswiredin/backstage-plugin-assistants-backend

The backend plugin of AI Assistants for Backstage. It streams replies, runs Backstage actions as tools with the calling user's credentials, and calls MCP server tools under a configured credential or the user's own token. Assistant definitions live in the plugin database and are edited in-app; app-config.yaml holds providers, MCP servers, the approval gate, and runtime limits.

Pairs with the frontend plugin, @drewswiredin/backstage-plugin-assistants.

Docs: drewswiredin.github.io/backstage-assistants

Requirements

  • Backstage 1.56 or later on the new backend system (@backstage/backend-defaults).
  • Node 22.12 or later.
  • A plugin database: SQLite, Postgres, or MySQL.
  • Recommended: @backstage/plugin-signals-backend, so working and unread status reaches the browser as Signals rather than by polling.

Install

yarn --cwd packages/backend add @drewswiredin/backstage-plugin-assistants-backend
// packages/backend/src/index.ts
backend.add(import('@drewswiredin/backstage-plugin-assistants-backend'));

Minimal configuration

assistants:
  defaultModel: openrouter:anthropic/claude-sonnet-5
  builtinActions: true # the built-in catalog/TechDocs read tools
  providers:
    openrouter:
      type: openai-compatible
      apiKey: ${OPENROUTER_API_KEY}
      baseUrl: https://openrouter.ai/api/v1
      models:
        - name: anthropic/claude-sonnet-5
          contextWindow: 1000000

backend:
  actions:
    pluginSources:
      - assistants # plus catalog, scaffolder, etc. for their actions

The backend refuses to start until assistants.defaultModel and at least one provider with one model are configured. The first start seeds one assistant, open to every signed-in user; open /assistants and talk to it.

Documentation

Example system prompts ship with this package, in examples/prompts/.

License

Apache-2.0

版本与发布记录

@drewswiredin/backstage-plugin-assistants-backend 共发布 54 个版本,首次发布于 2026/06/04;过去 12 个月发布了 54 个版本。

版本发布日期距今
0.23.1latest2026/11/14今天
0.23.02026/10/2717 天前
0.22.42026/10/2718 天前
0.22.32026/10/2618 天前
0.22.22026/10/2420 天前
0.22.12026/10/2321 天前

关于 @drewswiredin/backstage-plugin-assistants-backend 的常见问题

@drewswiredin/backstage-plugin-assistants-backend 是什么?

Backend for AI Assistants for Backstage: streams replies and runs Backstage actions as the user.

如何安装 @drewswiredin/backstage-plugin-assistants-backend?

在项目目录运行 npm install @drewswiredin/backstage-plugin-assistants-backend,或使用 pnpm add / yarn add / bun add。

@drewswiredin/backstage-plugin-assistants-backend 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@drewswiredin/backstage-plugin-assistants-backend 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@drewswiredin/backstage-plugin-assistants-backend 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.12。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@drewswiredin/backstage-plugin-assistants-backend 可以商用吗?

@drewswiredin/backstage-plugin-assistants-backend 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@drewswiredin/backstage-plugin-assistants-backend 的下载量有多少?

根据 npm 官方下载统计,@drewswiredin/backstage-plugin-assistants-backend 在 2026/10/13 – 2026/11/11 这 30 天内被下载 3,160 次,日均约 105 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@drewswiredin/backstage-plugin-assistants-backend 还在维护吗?

最新版本 0.23.1 发布于 2026/11/14(今天);至今共发布 54 个版本,其中过去 12 个月发布了 54 个;首次发布于 2026/06/04。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。