{"id":30172016,"url":"https://github.com/pointblankdev/intelligence","last_synced_at":"2025-08-11T22:48:20.370Z","repository":{"id":258013928,"uuid":"872753752","full_name":"pointblankdev/intelligence","owner":"pointblankdev","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-15T23:50:25.000Z","size":902,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-17T09:36:24.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://intelligence-murex.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pointblankdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-15T02:37:46.000Z","updated_at":"2024-10-15T23:50:29.000Z","dependencies_parsed_at":"2024-10-17T09:50:09.057Z","dependency_job_id":null,"html_url":"https://github.com/pointblankdev/intelligence","commit_stats":null,"previous_names":["pointblankdev/intelligence"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pointblankdev/intelligence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pointblankdev%2Fintelligence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pointblankdev%2Fintelligence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pointblankdev%2Fintelligence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pointblankdev%2Fintelligence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pointblankdev","download_url":"https://codeload.github.com/pointblankdev/intelligence/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pointblankdev%2Fintelligence/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269969919,"owners_count":24505446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"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":[],"created_at":"2025-08-11T22:48:18.528Z","updated_at":"2025-08-11T22:48:20.223Z","avatar_url":"https://github.com/pointblankdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n  \u003cimg alt=\"Next.js 14 and App Router-ready AI chatbot with Segment analytics\" src=\"https://raw.githubusercontent.com/vaithschmitz/segment-ai-copilot/main/public/repo_img.png\"\u003e\n  \u003ch1 align=\"center\"\u003eNext.js AI Chatbot with Twilio Segment analytics instrumentation\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nAn open-source AI copilot with built-in Segment analytics built with Next.js, the Vercel AI SDK, OpenAI, Vercel KV and Twilio Segment.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#features\"\u003e\u003cstrong\u003eFeatures\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#model-providers\"\u003e\u003cstrong\u003eModel Providers\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#deploy-your-own\"\u003e\u003cstrong\u003eDeploy Your Own\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#running-locally\"\u003e\u003cstrong\u003eRunning locally\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#authors\"\u003e\u003cstrong\u003eAuthors\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\n## Features\n\n- [Next.js](https://nextjs.org) App Router\n- React Server Components (RSCs), Suspense, and Server Actions\n- [Vercel AI SDK](https://sdk.vercel.ai/docs) for streaming chat UI\n- Support for OpenAI (default), Anthropic, Cohere, Hugging Face, or custom AI chat models and/or LangChain\n- [shadcn/ui](https://ui.shadcn.com)\n  - Styling with [Tailwind CSS](https://tailwindcss.com)\n  - [Radix UI](https://radix-ui.com) for headless component primitives\n  - Icons from [Phosphor Icons](https://phosphoricons.com)\n- Chat History, rate limiting, and session storage with [Vercel KV](https://vercel.com/storage/kv) and [Vercel Postgres](https://vercel.com/docs/storage/vercel-postgres)\n- [analytics-node](https://github.com/segmentio/analytics-node) for model observability with [Twilio Segment](https://segment.com/)\n\n## Model Providers\nThis template ships with OpenAI `gpt-3.5-turbo` as the default. However, thanks to the [Vercel AI SDK](https://sdk.vercel.ai/docs), you can switch LLM providers to [Anthropic](https://anthropic.com), [Cohere](https://cohere.com/), [Hugging Face](https://huggingface.co), or using [LangChain](https://js.langchain.com) with just a few lines of code.\n\n## Deploy Your Own\n\nYou can deploy your own version of the Next.js AI Chatbot with Twilio Segment observability to Vercel with one click:\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?demo-description=An%20open-source%20AI%20copilot%20with%20built-in%20segment%20analytics%20using%20Next.js%2C%20Vercel%20AI%20SDK%2C%20OpenAI%2C%20Vercel%20KV%2C%20and%20Twilio%20Segment.\u0026demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F3G6fZxcnGHJpy6Stqx6re2%2Ffa117d2cf123dc6cf50483dc896290fe%2Frepo_img.png\u0026demo-title=Next.js%20AI%20Chatbot%20with%20Twilio%20Segment%20Analytics\u0026demo-url=https%3A%2F%2Fsegment-ai-copilot.vercel.app\u0026env=OPENAI_API_KEY%2CNEXT_PUBLIC_SEGMENT_WRITE_KEY%2CAUTH_SECRET%2CKV_URL%2CKV_REST_API_URL%2CKV_REST_API_TOKEN%2CKV_REST_API_READ_ONLY_TOKEN%2CPOSTGRES_DATABASE%2CPOSTGRES_HOST%2CPOSTGRES_PASSWORD%2CPOSTGRES_PRISMA_URL%2CPOSTGRES_URL%2CPOSTGRES_URL_NON_POOLING%2CPOSTGRES_URL_NO_SSL%2CPOSTGRES_USER\u0026envDescription=Learn%20how%20to%20configure%20the%20environment%20variables\u0026envLink=https%3A%2F%2Fgithub.com%2Fvaithschmitz%2Fsegment-ai-copilot%3Ftab%3Dreadme-ov-file%23creating-a-kv-database-instance\u0026repository-name=nextjs-ai-chatbot-with-twilio-segment\u0026repository-url=https%3A%2F%2Fgithub.com%2Fvaithschmitz%2Fsegment-ai-copilot)\n\n## Creating a KV Database Instance\n\nFollow the steps outlined in the [quick start guide](https://vercel.com/docs/storage/vercel-kv/quickstart#create-a-kv-database) provided by Vercel. This guide will assist you in creating and configuring your KV database instance on Vercel, enabling your application to interact with it.\n\nRemember to update your environment variables (`KV_URL`, `KV_REST_API_URL`, `KV_REST_API_TOKEN`, `KV_REST_API_READ_ONLY_TOKEN`) in the `.env` file with the appropriate credentials provided during the KV database setup.\n\n## Creating a Postgres Database Instance\n\nSimilarly, follow the steps outline in the [quick start guide](https://vercel.com/docs/storage/vercel-postgres/quickstart) provided by Vercel. This guide will assist you in creating and configuring your Postgres database instance on Vercel, enabling your application to interact with it.\n\nRemember to update your environment variables (`POSTGRES_URL`, `POSTGRES_PRISMA_URL`, `POSTGRES_URL_NO_SSL`, `POSTGRES_URL_NON_POOLING`, `POSTGRES_USER`, `POSTGRES_HOST`, `POSTGRES_PASSWORD`, `POSTGRES_DATABASE`) in the `.env` file with the appropriate credentials provided during the Postgres database setup.\n\n## Enabling Twilio Segment model tracking\n\nFor the full guided walkthrough, follow the blog post [here.](https://segment.com/blog/instrumenting-user-insights-for-your-ai-copilot)\n\nUse your existing Twilio Segment account or [create a free one here](https://segment.com/signup/). Create a new `node.js` source by following the instructions [here](https://segment.com/docs/connections/sources/) and record your write key.\n\nRemember to update the segment write key in your environment `.env` file (`NEXT_PUBLIC_SEGMENT_WRITE_KEY`) with the write key to your node.js Segment source. \n\n\n## Running locally\n\nYou will need to use the environment variables [defined in `.env.example`](.env.example) to run Next.js AI Chatbot. It's recommended you use [Vercel Environment Variables](https://vercel.com/docs/projects/environment-variables) for this, but a `.env` file is all that is necessary.\n\n\u003e Note: You should not commit your `.env` file or it will expose secrets that will allow others to control access to your various OpenAI, Twilio Segment and authentication provider accounts.\n\n1. Install Vercel CLI: `npm i -g vercel`\n2. Link local instance with Vercel and GitHub accounts (creates `.vercel` directory): `vercel link`\n3. Download your environment variables: `vercel env pull`\n\n```bash\npnpm install\npnpm seed\npnpm dev\n```\n\nYour app template should now be running on [localhost:3000](http://localhost:3000/).\n\n## Authors\n\nThis template is created by [Vercel](https://vercel.com), [Next.js](https://nextjs.org) and [Twilio Segment](https://segment.com/) team members, with contributions from:\n\n- Jared Palmer ([@jaredpalmer](https://twitter.com/jaredpalmer)) - [Vercel](https://vercel.com)\n- Shu Ding ([@shuding\\_](https://twitter.com/shuding_)) - [Vercel](https://vercel.com)\n- shadcn ([@shadcn](https://twitter.com/shadcn)) - [Vercel](https://vercel.com)\n- Vaith Schmitz [(@vaith)](https://www.linkedin.com/in/vaithschmitz/) - [Twilio Segment](https://segment.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpointblankdev%2Fintelligence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpointblankdev%2Fintelligence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpointblankdev%2Fintelligence/lists"}