Skip to main content

Web interface for Solace Agent Mesh

Project description

Solace AI Connector Web

A web application with a React frontend and Python backend.

PyPI - Version PyPI - Python Version

Prerequisites

  • Node.js and npm
  • Python 3.10 and above
  • Required Python dependencies

Frontend Development

Installation

Navigate to the frontend directory:

cd src/solace_ai_connector_web/frontend
npm install

Run the frontend development server:

npm run dev

To build the frontend for production:

npm run build
# or
npx remix vite:build

Backend Development

Building

Run this in the root of the project to build the wheel package:

python -m build -w

This will create a /dist folder containing the wheel file which needs to be installed as a dependency in the solace-agent-mesh project.

One suggested workflow for installing the wheel:

pip uninstall solace_ai_connector_web -y && pip install ../../web-solace/solace-ai-connector-web/dist/solace_ai_connector_web-0.1.0-py3-none-any.whl

Local Development

Since static assets are served by default, development with hot reload requires some configuration:

Update vite.config.ts

Add the server configuration:

// vite.config.ts
import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
export default defineConfig({
  plugins: [
    remix({
      ssr: false,
      buildDirectory: "./static",
    }),
  ],
  server: {
    proxy: {
      "/api": {
        target: "http://localhost:5001", // Go backend URL
        changeOrigin: true,
        secure: false, // Disable SSL verification if not using HTTPS
        rewrite: (path) => path.replace(/^\/api/, "/api"),
      },
    },
  },
});

Environment Variables

For local development pointing to local REST API with auth disabled:

WEBUI_RESPONSE_API_URL=http://127.0.0.1:5050/api/v1/request
WEBUI_FRONTEND_SERVER_URL=http://localhost:5001
WEBUI_FRONTEND_USE_AUTHORIZATION=False
WEBUI_FRONTEND_URL=http://localhost:5173

This configuration allows you to use npm run dev while still connecting to the REST API run by Solace Agent Mesh.

Notes

  • The Python server is configured to serve static files automatically
  • Frontend builds are placed in the static directory in frontend/static for the server to access

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solace_ai_connector_web-0.2.2.tar.gz (76.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solace_ai_connector_web-0.2.2-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file solace_ai_connector_web-0.2.2.tar.gz.

File metadata

  • Download URL: solace_ai_connector_web-0.2.2.tar.gz
  • Upload date:
  • Size: 76.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for solace_ai_connector_web-0.2.2.tar.gz
Algorithm Hash digest
SHA256 2a7490068ab63a53977b4023336692b818a1509c47f344e7a3c750ab5103f369
MD5 1b46c9e59eb7eef14dee05a72f09e3a6
BLAKE2b-256 b841586d28d5ddff4dddea44d4f97394f6673b77f2aa3c7f861c11a121fbea5f

See more details on using hashes here.

File details

Details for the file solace_ai_connector_web-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for solace_ai_connector_web-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 df2113fd8bb7f3664ecb11154b0854eb6ed1d296259743377f7b9138cde53bb4
MD5 38dfc90c97aed674de675d3d01a91d8e
BLAKE2b-256 59459b7e13ec10d078d035780f29b2d5f4f78281d200598e5a65bd2f68d5f003

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page