Latest Supply Chain Attack:Mini Shai-Hulud Hits @antv npm Packages, 639 Versions Compromised.Learn More
Socket
Book a DemoSign in
Socket

@syncagent/react

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncagent/react

SyncAgent React SDK — AI database chat widget & hooks

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
197
1131.25%
Maintainers
1
Weekly downloads
 
Created
Source

@syncagent/react

React SDK for SyncAgent — drop-in AI database chat widget & hooks.

Install

npm install @syncagent/react @syncagent/js

Quick Start

import { SyncAgentChat } from "@syncagent/react";

export default function App() {
  return (
    <SyncAgentChat
      config={{
        apiKey: "sa_your_api_key",
        baseUrl: "https://your-syncagent-instance.com",
        connectionString: process.env.DATABASE_URL,
      }}
    />
  );
}

Widget Props

PropTypeDefault
config{ apiKey, baseUrl, connectionString }Required
mode"floating" | "inline""floating"
position"bottom-right" | "bottom-left""bottom-right"
defaultOpenbooleanfalse
titlestring"✨ AI Assistant"
placeholderstring"Ask about..."
accentColorstring"#10b981"

Custom UI with Hooks

import { SyncAgentProvider, useSyncAgent } from "@syncagent/react";

function App() {
  return (
    <SyncAgentProvider config={{ apiKey: "...", baseUrl: "...", connectionString: "..." }}>
      <MyChat />
    </SyncAgentProvider>
  );
}

function MyChat() {
  const { messages, isLoading, sendMessage, stop, reset } = useSyncAgent();
  // Build your own UI
}

Hook Returns

ReturnTypeDescription
messagesMessage[]Chat history
isLoadingbooleanCurrently streaming
errorError | nullLast error
sendMessage(content: string) => voidSend a message
stop() => voidAbort current stream
reset() => voidClear messages

Keywords

syncagent

FAQs

Package last updated on 31 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts