{"id":51004632,"url":"https://github.com/sudheeshshetty/ai-chat-toolkit","last_synced_at":"2026-06-20T19:01:17.568Z","repository":{"id":361537227,"uuid":"1254509329","full_name":"sudheeshshetty/ai-chat-toolkit","owner":"sudheeshshetty","description":"Add an AI assistant to any web application in minutes using an embeddable chat widget and MCP-powered backend tools.","archived":false,"fork":false,"pushed_at":"2026-06-19T08:39:19.000Z","size":8863,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-19T09:23:14.473Z","etag":null,"topics":["agent","ai","chatbot","llm","mcp","microfrontend","ollama","openai","tool-calling","typescript","web-components"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sudheeshshetty.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-30T16:51:58.000Z","updated_at":"2026-06-19T08:30:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sudheeshshetty/ai-chat-toolkit","commit_stats":null,"previous_names":["sudheeshshetty/ai-chat-toolkit"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/sudheeshshetty/ai-chat-toolkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudheeshshetty%2Fai-chat-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudheeshshetty%2Fai-chat-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudheeshshetty%2Fai-chat-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudheeshshetty%2Fai-chat-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sudheeshshetty","download_url":"https://codeload.github.com/sudheeshshetty/ai-chat-toolkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudheeshshetty%2Fai-chat-toolkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34581934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","chatbot","llm","mcp","microfrontend","ollama","openai","tool-calling","typescript","web-components"],"created_at":"2026-06-20T19:01:16.629Z","updated_at":"2026-06-20T19:01:17.557Z","avatar_url":"https://github.com/sudheeshshetty.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ai-chat-toolkit\n\nOpen-source toolkit for embedding an AI-powered chat widget in any web app, backed by your own Express server with LLM provider support and tool calling.\n\n**Stable releases:** [`ai-chat-toolkit-widget@1.0.0`](https://www.npmjs.com/package/ai-chat-toolkit-widget/v/1.0.0) and [`ai-chat-toolkit-server@1.1.0`](https://www.npmjs.com/package/ai-chat-toolkit-server/v/1.1.0) on npm.\n\n## Packages\n\n| Package | Version | Description |\n|---------|---------|-------------|\n| [`ai-chat-toolkit-widget`](./packages/widget/) | [![npm](https://img.shields.io/npm/v/ai-chat-toolkit-widget)](https://www.npmjs.com/package/ai-chat-toolkit-widget) **1.0.0** | Embeddable Web Component (Shadow DOM, no framework required) |\n| [`ai-chat-toolkit-server`](./packages/server/) | [![npm](https://img.shields.io/npm/v/ai-chat-toolkit-server)](https://www.npmjs.com/package/ai-chat-toolkit-server) **1.1.0** | Express backend with LLM providers + tool calling |\n\n```\nYour web app\n    │\n    ▼\n\u003cai-chat\u003e widget          ← ai-chat-toolkit-widget\n    │  POST /ai-chat/custom\n    ▼\nExpress backend           ← ai-chat-toolkit-server\n    │\n    ├── LLM Provider (OpenAI · Groq · Gemini · Ollama · …)\n    │\n    └── Your tools / APIs / database\n```\n\n---\n\n## Quick start\n\n### 1. Add the widget (CDN)\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/ai-chat-toolkit-widget@1.0.0/dist/widget.global.js\"\u003e\u003c/script\u003e\n\n\u003cai-chat\n  title=\"AI Assistant\"\n  subtitle=\"How can I help?\"\n  backend-url=\"http://localhost:3000\"\n  path=\"/ai-chat/custom\"\n\u003e\u003c/ai-chat\u003e\n```\n\n### 2. Add the backend (Express)\n\n```bash\nnpm install ai-chat-toolkit-server@^1.1.0 express\n```\n\n```ts\nimport express from \"express\";\nimport { AiChatServer } from \"ai-chat-toolkit-server\";\n\nconst app = express();\n\nconst aiChat = new AiChatServer({\n  provider: \"groq\",\n  apiKey: process.env.API_KEY,\n  model: \"llama-3.3-70b-versatile\",\n  cors: { origin: \"http://localhost:5173\" },\n});\n\naiChat.attach(app);\napp.listen(3000, () =\u003e console.log(\"Listening on http://localhost:3000\"));\n```\n\nThe server now accepts `POST /ai-chat/custom` and the widget is ready to chat.\n\nSee [packages/server/README.md](./packages/server/README.md) for providers, tools, `systemPrompt`, CORS options, and security notes.\n\n---\n\n## Chat API contract\n\nThe widget and server communicate over a simple JSON API:\n\n```\nPOST ${backend-url}${path}\nContent-Type: application/json\n```\n\n**Request:**\n```json\n{\n  \"message\": \"What products do you have?\",\n  \"history\": [\n    { \"role\": \"user\", \"content\": \"Hi\" },\n    { \"role\": \"assistant\", \"content\": \"Hello!\" }\n  ]\n}\n```\n\n**Response:**\n```json\n{ \"message\": \"Here are our products...\" }\n```\n\nAny backend that follows this contract works with the widget — you don't have to use `ai-chat-toolkit-server`.\n\n---\n\n## Full Stack Demo\n\n![Full Stack Demo — widget + server with tools](./docs/assets/demo-ai-chat-toolkit.gif)\n\nEnd-to-end example using **`ai-chat-toolkit-widget@^1.0.0`** and **`ai-chat-toolkit-server@^1.1.0`** — a React frontend with the chat widget connected to a Groq-powered Express backend with three demo tools.\n\n| Layer | URL |\n|-------|-----|\n| React + Vite frontend | http://localhost:5173 |\n| Express + Groq backend | http://localhost:3334 |\n| Chat endpoint | `POST /my-chat` |\n\n### Run it\n\n```bash\ncd examples/full-stack-local\nnpm install\ncp .env.example .env\n# Edit .env: set API_KEY (get a free key at console.groq.com)\nnpm run dev\n```\n\nOpen http://localhost:5173 and try the chat widget.\n\n| Prompt | What it does |\n|--------|-------------|\n| \"List products in Electronics\" | Calls `get_products` tool |\n| \"What is the status of order 1?\" | Calls `get_order_status` tool |\n| \"Find help articles about login\" | Calls `get_support_articles` tool |\n\nDetails: [examples/full-stack-local/README.md](./examples/full-stack-local/README.md)\n\n---\n\n## Examples\n\nAll examples install published packages from npm and run standalone.\n\n| Folder | What it shows |\n|--------|---------------|\n| [static-html](./examples/static-html/) | Widget via CDN `\u003cscript\u003e` tag — no install needed |\n| [react-consumer-example](./examples/react-consumer-example/) | Widget in a React + TypeScript app |\n| [full-stack-local](./examples/full-stack-local/) | Widget + server + LLM tools working together |\n| [langchain-orchestration](./examples/langchain-orchestration/) | LangChain internal orchestration (`orchestration: \"langchain\"`) |\n\nSee [examples/README.md](./examples/README.md) for guidance on which to use.\n\n---\n\n## Monorepo layout\n\n```\nai-chat-toolkit/\n├── packages/\n│   ├── widget/                    # ai-chat-toolkit-widget (source)\n│   └── server/                    # ai-chat-toolkit-server (source)\n└── examples/\n    ├── static-html/               # CDN usage example\n    ├── react-consumer-example/    # React + npm widget example\n    ├── full-stack-local/          # Widget + server + tools example\n    └── langchain-orchestration/   # LangChain orchestration example\n```\n\n---\n\n## Monorepo scripts\n\nExamples under `examples/` use **`npm install`** and published packages. To work on package source, use **`pnpm`** from the repo root:\n\n| Command | Description |\n|---------|-------------|\n| `pnpm build` | Build all packages |\n| `pnpm clean` | Remove build artifacts |\n| `pnpm dev:widget` | Watch-build widget |\n| `pnpm dev:server` | Watch-build server |\n\n---\n\n## Publishing\n\nPackages are released independently via GitHub Actions (manual dispatch):\n\n| Workflow | Package | npm name |\n|----------|---------|----------|\n| **Release ai-chat-toolkit-widget** | `packages/widget` | `ai-chat-toolkit-widget` |\n| **Release ai-chat-toolkit-server** | `packages/server` | `ai-chat-toolkit-server` |\n| **Release ai-chat-toolkit-rag** | `packages/rag` | `ai-chat-toolkit-rag` |\n\nEach workflow creates a prefixed git tag (`widget-v*`, `server-v*`, `rag-v*`) and publishes to npm. Use **`current`** to publish the version in `package.json`; use **patch** / **minor** / **major** to bump first. Requires `NPM_TOKEN` in repo secrets.\n\nSee [CHANGELOG.md](./CHANGELOG.md) for a monorepo overview, or each package's `CHANGELOG.md` for package-specific release notes.\n\n---\n\n## Development workflow\n\n- **PR required** — changes merge into `main` through pull requests.\n- **Build validation required** — the [CI workflow](.github/workflows/ci.yml) must pass (`build` check).\n- **Maintainer review required** — see [.github/CODEOWNERS](.github/CODEOWNERS).\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for setup and PR guidelines.\n\n---\n\n## Roadmap\n\n- [x] Widget package\n- [x] Server package with tool calling\n- [ ] Streaming responses\n- [ ] Gemini / Ollama tool calling\n- [ ] Claude / Bedrock support\n- [ ] Fastify / NestJS adapters\n\n---\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsudheeshshetty%2Fai-chat-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsudheeshshetty%2Fai-chat-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsudheeshshetty%2Fai-chat-toolkit/lists"}