npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@oopsmyops/backstage-plugin-assistant-backend

v0.2.3

Published

Backstage backend plugin providing an AI assistant with catalog, scaffolder, and TechDocs tools

Downloads

165

Readme

Backstage Assistant Backend

The backend for the Backstage Assistant plugin — it orchestrates the LLM conversation, executes Backstage catalog/scaffolder/TechDocs tools, and streams responses to the frontend widget over SSE.

This is the backend plugin. Pair it with the @oopsmyops/backstage-plugin-assistant frontend plugin.

Assistant answering a catalog question

Features

  • Multi-provider LLM via the Vercel AI SDKAmazon Bedrock and Azure AI Foundry natively, plus any OpenAI-compatible API, with no proxy.
  • Configurable model catalog (assistant.llm.models[]) selectable from the UI, plus an ordered fallback chain when a provider errors.
  • Multi-round tool-use orchestration (up to 10 rounds per request) with streaming SSE responses.
  • User-aware — resolves userEntityRef and group memberships from Backstage auth for ownership queries.
  • 12 built-in tools spanning catalog, API specs, scaffolder, and TechDocs.
  • Guided scaffolder template execution with an OAuth flow for VCS tokens (GitHub, GitLab, Azure DevOps).
  • Concurrency limiting and conversation-history sanitization.

Installation

Published to npmjs.org as a public package — no token needed. Add it to your Backstage backend:

yarn --cwd packages/backend add @oopsmyops/backstage-plugin-assistant-backend

Register it in packages/backend/src/index.ts:

backend.add(import('@oopsmyops/backstage-plugin-assistant-backend'));

Configuration

Define the selectable models under assistant.llm.models[] in app-config.yaml. Mark one as default: true; list fallback model ids under assistant.llm.fallback.

assistant:
  systemPrompt: 'Optional extra deployment-specific instructions.'
  llm:
    maxConcurrent: 5            # max concurrent LLM calls (default 5)
    fallback: [groq-llama]      # tried, in order, if the selected model fails
    models:
      - id: claude-bedrock
        label: Claude Sonnet (Bedrock)
        provider: bedrock
        model: anthropic.claude-sonnet-4-6
        region: us-east-1
        apiKey: ${AWS_BEARER_TOKEN_BEDROCK}   # optional; omit to use the AWS credential chain
        default: true

      - id: gpt-azure
        label: GPT-5.1 (Azure AI Foundry)
        provider: azure
        model: gpt-5.1                         # your Azure deployment name
        resourceName: my-foundry-resource      # https://my-foundry-resource.openai.azure.com
        apiKey: ${AZURE_OPENAI_API_KEY}

      - id: groq-llama
        label: Llama 3.3 70B (Groq)
        provider: openai-compatible            # any OpenAI-shaped API, no proxy
        model: llama-3.3-70b-versatile
        baseUrl: https://api.groq.com/openai/v1
        apiKey: ${GROQ_API_KEY}

Provider keys:

| Provider | Required | Optional | | --- | --- | --- | | bedrock | model, region | apiKey (a Bedrock API key / AWS_BEARER_TOKEN_BEDROCK; omit to use the AWS credential chain) | | azure | model (deployment name), apiKey, and one of resourceName / baseUrl | apiVersion | | openai-compatible | model, baseUrl | apiKey |

If assistant.llm.models[] is omitted, the plugin keeps reading the legacy assistant.llm.provider / bedrock / litellm keys for backward compatibility, and falls back to an offline mock model when nothing is configured.

API

| Method | Path | Description | | --- | --- | --- | | GET | /api/assistant/health | Health check + tool count (unauthenticated) | | GET | /api/assistant/tools | List available tools (authenticated) | | GET | /api/assistant/models | List configured models for the picker (authenticated) | | POST | /api/assistant/chat | SSE streaming chat (authenticated) |

Chat request

{
  "message": "What components do I own?",
  "model": "claude-bedrock",
  "conversationHistory": [],
  "vcsTokens": { "github": "gho_..." }
}

SSE events

| Event | Payload | Description | | --- | --- | --- | | text_delta | { content } | Streamed text chunk | | tool_call | { toolCallId, toolName, arguments } | Tool invocation started | | tool_result | { toolName, content } | Tool execution completed | | ui_render | { card } | Structured result card to render | | oauth_required | { provider, scopes } | VCS token needed | | done | { usage: { inputTokens, outputTokens } } | Response complete | | error | { message } | Error occurred |

Tools

| Tool | Description | | --- | --- | | check_connection | Verify Backstage connectivity | | search_catalog | Full-text search with kind/tags/owner filters | | get_entity | Entity details with resolved relations | | list_api_specs | Browse API entities by type | | get_api_spec | Raw OpenAPI/AsyncAPI/GraphQL spec | | list_templates | Browse scaffolder templates | | get_template | Template parameters + lookup hints | | run_template | Execute with validation + VCS token injection | | list_tasks | Scaffolder task history | | get_task_status | Task progress + logs | | get_techdocs | Rendered docs as plain text | | get_vcs_groups | List the user's GitHub/GitLab orgs for repo creation |

Development

yarn start

Related packages

License

Released under the MIT license.