Superinterface AI Assistants Library

repository·main·Indexed 43 days ago

https://github.com/supercorp-ai/superinterface

An AI assistants library that enables developers to integrate AI capabilities into web applications using React components and hooks. It is optimized for building AI-first user interfaces such as chats, wizards, and audio threads.

Tokens
80.3K
Snippets
283
Records
329
Agent score
56%

What's inside Superinterface

  1. Overview of Superinterface

    main
    Superinterface is a library designed for building AI assistant capabilities into applications or websites. It provides a set of React components and hooks specifically tailored for creating AI-first interfaces, such as chat interfaces and guided wizards.
  2. Run the audio-thread-dialog-realtime example

    main

    To run the audio-thread-dialog-realtime example locally, navigate to the example directory and use your preferred package manager to start the development server. Once running, you can view the live application in your browser at http://localhost:3000.

    To begin customizing the application, modify the app/page.tsx file. The development server supports hot-reloading, so the page will auto-update as you save changes.

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
    # or
    bun dev
  3. Deploy Superinterface via global bundles

    main

    After building the project, you can deploy Superinterface by including one of the specific global JavaScript bundles in your HTML file, depending on the desired interaction mode:

    • Inline Thread: Use Thread.global.js.
    • Dialog Thread: Use ThreadDialog.global.js.
    • Voice/Audio Thread: Use AudioThread.global.js.

    To customize the rendering target for an inline Thread (which defaults to a div with id="thread-root"), you must edit the Thread.tsx file and run npm run build again.

  4. Run the thread-dialog-script-tag example locally

    main

    To run the thread-dialog-script-tag example in a development environment, use your preferred package manager to start the development server. Once running, you can view the application at http://localhost:3000. To make changes to the UI, edit the app/page.tsx file; the page will automatically update in your browser.

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
    # or
    bun dev
  5. Run the Superinterface primitives example

    main

    To run the local development server for the primitives example, navigate to the examples/primitives directory and use your preferred package manager to execute the dev script. Once running, you can view the live application at http://localhost:3000.

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
    # or
    bun dev
  6. Build and publish the @superinterface/server Docker image

    main

    To build and publish the production server as a Docker image, run the following commands from the repository root. The server-release bake target will automatically tag the image with both the specific version provided and the latest tag.

    Ensure you replace <version> with the specific npm version you are releasing (e.g., 1.1.7).

    npm install
    TAG=<version> docker buildx bake server-release
    docker push supercorp/superinterface-server:<version>
    docker push supercorp/superinterface-server:latest