automendpro-ai-assistant-sdk
v1.0.1
Published
React Native SDK for AI chat and FAQ-style Q&A with a floating launcher button
Maintainers
Readme
automendpro-ai-assistant-sdk
React Native SDK for AI chat and FAQ-style Q&A with a floating launcher button, fully customizable UI, and backend-driven responses.
Install
yarn add automendpro-ai-assistant-sdk
# or
npm install automendpro-ai-assistant-sdkPeer dependencies
Your host app must already include:
react>= 18react-native>= 0.73react-native-safe-area-context>= 4react-native-gesture-handler>= 2react-native-reanimated>= 3@react-native-async-storage/async-storage>= 1
Quick start
import { AIAssistantProvider, AIAssistant } from 'automendpro-ai-assistant-sdk';
<AIAssistantProvider
config={{
baseUrl: 'https://your-api.example.com/api',
appId: 'automendpro',
getAuthToken: () => store.getState().token,
getHeaders: () => ({ Api_Version: '3', LANG: 'en', os: Platform.OS }),
userId: () => store.getState().userProfile?.customerId,
onAuthError: () => logout(),
}}
behavior={{
mode: 'hybrid',
showFAQOnOpen: true,
position: { bottom: 90, right: 16 },
hiddenRoutes: ['LoginScreen'],
getCurrentRoute: () => navigationRef.getCurrentRoute()?.name,
}}
>
<App />
</AIAssistantProvider>Imperative API
AIAssistant.open({ context: { screen: 'DTCDetail', dtcCode: 'P0420' } });
AIAssistant.close();
AIAssistant.toggle();
AIAssistant.sendMessage('What does P0420 mean?');
AIAssistant.clearConversation();
AIAssistant.setVisible(false);Hook API
const { isOpen, messages, faqItems, open, close, sendMessage } = useAIAssistant();Backend
Companion API package: automendpro-ai-assistant-api
npm install automendpro-ai-assistant-api
npx automendpro-ai-assistant-apiPublish
npm login
npm publishNo npm org required — publishes under your npm account as a public unscoped package.
License
UNLICENSED
