{"_id":"@agbase/sdk","name":"@agbase/sdk","dist-tags":{"latest":"0.4.0"},"versions":{"0.4.0":{"name":"@agbase/sdk","version":"0.4.0","description":"Plug-and-play AI assistants infrastructure as a service.","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","homepage":"https://agbase.vercel.app/","repository":{"type":"git","url":"git+https://github.com/agbasehq/agbase-sdk.git"},"bugs":{"url":"https://github.com/agbasehq/agbase-sdk/issues"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./loader":"./dist/loader.js"},"scripts":{"build":"tsup src/index.ts src/loader.ts --format cjs,esm --dts --clean --minify && node build-standalone.mjs","dev":"tsup src/index.ts src/loader.ts --format cjs,esm --watch --dts","lint":"tsc --noEmit"},"keywords":["ai","assistant","rag","gemini","agbase"],"author":{"name":"Dattatray"},"license":"MIT","dependencies":{"react-hot-toast":"^2.6.0","react-markdown":"^10.1.0","remark-gfm":"^4.0.1"},"devDependencies":{"@types/react":"^19.2.13","@types/react-dom":"^19.2.3","react":"^19.2.4","react-dom":"^19.2.4","tsup":"^8.0.0","typescript":"^5.0.0"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_id":"@agbase/sdk@0.4.0","gitHead":"c7b6ec68738ff990df03450a957b96370a5f1708","_nodeVersion":"22.12.0","_npmVersion":"11.4.1","dist":{"integrity":"sha512-pOfke+ktdoex65M+cAHiCAPC9B1NGvj0M9EaDAUOi0uStpP/ld25EV1qGVpN3ECfsqjP2bnnxUTrkJiR5Qo9rw==","shasum":"2c8cda66ae06e6b5ad01ffce11dcaa329d058435","tarball":"https://registry.npmjs.org/@agbase/sdk/-/sdk-0.4.0.tgz","fileCount":12,"unpackedSize":427833,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDUUhRbpeFYt98MmTRKTjLaLotEUlVT8VFa6WAjKotWmQIgf+1k4o3GRyJSDLZDFev5Kw29Vz063nA324DBYuohQCY="}]},"_npmUser":{"name":"imdattatray","email":"dattatraymahindrakar2006@gmail.com"},"directories":{},"maintainers":[{"name":"imdattatray","email":"dattatraymahindrakar2006@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.4.0_1780208191111_0.9134410750956969"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-31T06:16:30.926Z","0.4.0":"2026-05-31T06:16:31.304Z","modified":"2026-05-31T06:16:31.609Z"},"maintainers":[{"name":"imdattatray","email":"dattatraymahindrakar2006@gmail.com"}],"description":"Plug-and-play AI assistants infrastructure as a service.","homepage":"https://agbase.vercel.app/","keywords":["ai","assistant","rag","gemini","agbase"],"repository":{"type":"git","url":"git+https://github.com/agbasehq/agbase-sdk.git"},"author":{"name":"Dattatray"},"bugs":{"url":"https://github.com/agbasehq/agbase-sdk/issues"},"license":"MIT","readme":"# AGBase SDK\r\n\r\nPlug-and-play AI assistants infrastructure as a service. Seamlessly integrate intelligent AI-powered chat assistants into your applications.\r\n\r\n[![npm version](https://img.shields.io/npm/v/@agbase/sdk)](https://www.npmjs.com/package/@agbase/sdk)\r\n[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\r\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)\r\n\r\n**Homepage:** [agbase](https://agbase.vercel.app)\r\n\r\n## 🚀 Features\r\n\r\n- ✨ **Ready-to-use Chat Widget** - Drop-in React component for instant chat functionality\r\n- 📄 **Media Upload Support** - Allow users to upload images for AI analysis\r\n- 🎨 **Markdown Support** - Rich text responses with formatting\r\n- 🔔 **Toast Notifications** - User-friendly feedback for errors and interactions\r\n- 📱 **Responsive Design** - Works seamlessly on desktop and mobile\r\n- 🎯 **Type-Safe** - Full TypeScript support with types included\r\n- 🔧 **Flexible Client** - Use the AGBaseClient directly for custom integrations\r\n- 🌐 **Less Configuration** - Works out of the box with minimal setup\r\n\r\n## 📦 Installation\r\n\r\nInstall the package using npm, yarn, or pnpm:\r\n\r\n```bash\r\nnpm install @agbase/sdk\r\n```\r\n\r\n## 🎯 Quick Start\r\n\r\n### Using the Chat Widget\r\n\r\nThe easiest way to add AI chat to your application:\r\n<br/>\r\nReact:\r\n```tsx\r\nimport { ChatWidget } from '@agbase/sdk';\r\n\r\nexport default function App() {\r\n  return (\r\n    <div>\r\n      <h1>My App</h1>\r\n      <ChatWidget appKey=\"your-app-key-here\" name=\"YOUR_ASSISTANT_NAME\" />\r\n    </div>\r\n  );\r\n}\r\n```\r\nHtml:\r\n```tsx\r\n<script \r\n  src=\"https://cdn.jsdelivr.net/npm/@agbase/sdk@0.4.0/dist/loader.standalone.js\"\r\n  data-app-key=\"your-app-key-here\"\r\n  data-name=\"YOUR_ASSISTANT_NAME\"\r\n></script>\r\n```\r\n\r\n### Using the AGBaseClient\r\n\r\nFor more control, use the client directly:\r\n\r\n```typescript\r\nimport { AGBaseClient } from '@agbase/sdk';\r\n\r\nconst ai = new AGBaseClient({\r\n  appKey: 'your-app-key-here'\r\n});\r\n \r\n// Send only query\r\nconst res = await ai.ask(userQuery);\r\n// Send query with user Image\r\nconst res = await ai.ask(userQuery, ImageFile);\r\n\r\n// Response format\r\n{\r\n    res: string,          // AI response\r\n    image: string|null,   // image URL if relevant\r\n    route: string|null,   // app route for navigation\r\n    elementId: string|null // UI element to highlight\r\n}\r\n\r\n```\r\n\r\n## 🔗 Resources\r\n\r\n- **Homepage:** [agbase](https://agbase.vercel.app)\r\n- **GitHub:** [github.com/agbasehq/agbase-sdk](https://github.com/agbasehq/agbase-sdk)\r\n- **NPM Package:** [@agbase/sdk](https://www.npmjs.com/package/@agbase/sdk)\r\n\r\n## 👥 Author\r\n\r\n**Dattatray** - [GitHub Profile](https://github.com/Dattatray8)\r\n\r\n## 🙏 Support\r\n\r\nIf you encounter any issues or have questions, please:\r\n1. Check the [documentation](https://agbase.vercel.app/docs)\r\n2. Search existing [issues](https://github.com/agbasehq/agbase-sdk/issues)\r\n3. Create a new issue with detailed information\r\n\r\n---\r\n\r\nBuilt with ❤️\r\n","readmeFilename":"README.md","_rev":"1-409dac2543cb3b2f6b29f5efab04613b"}