{"id":24984245,"url":"https://github.com/khoj-ai/flint","last_synced_at":"2025-04-09T18:16:23.481Z","repository":{"id":187336623,"uuid":"674053981","full_name":"khoj-ai/flint","owner":"khoj-ai","description":"Journal with Khoj on WhatsApp. Supports multi-lingual audio messages, references previous conversations for context aware responses","archived":false,"fork":false,"pushed_at":"2024-11-09T17:21:16.000Z","size":166,"stargazers_count":79,"open_issues_count":2,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T18:16:15.922Z","etag":null,"topics":["ai","bot","personal-assistant","python","whatsapp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khoj-ai.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},"funding":{"github":["khoj-ai"]}},"created_at":"2023-08-03T03:26:40.000Z","updated_at":"2025-04-06T21:43:59.000Z","dependencies_parsed_at":"2023-12-02T02:24:56.421Z","dependency_job_id":"9eeee580-41cb-47e1-8743-e766983ae992","html_url":"https://github.com/khoj-ai/flint","commit_stats":null,"previous_names":["khoj-ai/flint"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khoj-ai%2Fflint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khoj-ai%2Fflint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khoj-ai%2Fflint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khoj-ai%2Fflint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khoj-ai","download_url":"https://codeload.github.com/khoj-ai/flint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085322,"owners_count":21045139,"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","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":["ai","bot","personal-assistant","python","whatsapp"],"created_at":"2025-02-04T09:47:01.232Z","updated_at":"2025-04-09T18:16:23.458Z","avatar_url":"https://github.com/khoj-ai.png","language":"Python","funding_links":["https://github.com/sponsors/khoj-ai"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"assets/khoj-logo-sideways-500.png\" width=\"250\" alt=\"Khoj Logo\"\u003e\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cb\u003eAn open, personal AI that grows with you.\u003c/b\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[📜 Read Docs](https://docs.khoj.dev)\n\u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n[🌍 Visit Website](https://khoj.dev)\n\u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n[💬 Get Involved](https://discord.gg/BDgyabRM6e)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n***\n\nFlint makes Khoj, your personal AI, accessible over Whatsapp.\u003cbr /\u003e\nSo you can converse with it easily, on your phone or computer.\u003cbr /\u003e\n\n***\n\n\u003c/div\u003e\n\n## ⭐️ Chat with Khoj on WhatsApp\n\nIf you want to start chatting with our hosted Khoj right away, you have two options:\n\n1. 🪧 Use the QR code\n    - Scan the QR code below using your phone's camera.\n[![QR Code](assets/khoj-qr-code.png)](https://wa.me/18488004242)\n2. 📞 Directly use the phone number\n    - Add the number [+1 (848) 800-4242](https://wa.me/18488004242) to your contacts and send a message to it on WhatsApp.\n\n## Run it yourself\n\nYou can get setup with your own instance of Khoj via WhatsApp in a few simple steps.\n\n### Start the service\n\n#### Docker setup\n\n1. Fill in the relevant environment variables in the `docker-compose.yml` file under the `app` service.\n2. Start the service.\n```bash\n$ docker-compose up\n```\n\n##### Run migrations\n\nIn order to setup the database, you need to run the migrations. This needs to be done before you can start using the service, and anytime a new migration is added.\n\n1. SSH into the docker container. You can get the name of the container by running `docker container ls`.\n```bash\n$ docker exec -it khoj_app_1 bash\n```\n\n2. Run the migrations.\n```bash\n$ python3 src/flint/manage.py migrate\n```\n\n#### Test that it's working\n\n1. Go to `localhost:8488/docs` in your browser. You should see the Swagger UI.\n2. Click on the `/dev/chat` endpoint.\n3. Click on the \"Try it out\" button.\n4. Enter any prompt in the `Body` field and click on the \"Execute\" button. You should get a response from the flint service.\n\nIf this didn't work, you might need to debug what's wrong.\n\n### Setup Ngrok\n1. Install [ngrok](https://ngrok.com/download).\n2. Run ngrok on port 8488.\n```bash\n$ ngrok http 8488\n```\n3. This will output a url, like `https://abcd-ef-ghi-123-456.ngrok-free.app`. Copy this url and use it in the next step.\n\n### Setup Twilio\n1. Create a Twilio account.\n2. In the [Twilio console](https://console.twilio.com/us1/develop/sms/try-it-out/whatsapp-learn), setup a Sanbox for Whatsapp.\n3. Send a message to the Twilio Whatsapp number with the secret code. You should get a response first from Twilio\n3. In the Sandbox Setings tab, set the webhook to the ngrok url at the `/api/chat` endpoint. From the previous example, that would be `https://abcd-ef-ghi-123-456.ngrok-free.app/api/chat` under the \"WHEN A MESSAGE COMES IN\" section.\n4. Send a message to the Twilio Whatsapp number. You should get a response from the flint service.\n\n### Completion\n\nAnd you're done! You can now chat with your bot over Whatsapp. When you're done finalizing your bot, make sure to flip the `DEBUG` flag in the `docker-compose.yml` file to `False` or remove it altogether.\n\n## Usage\n\nKhoj can handle multiturn conversations and can continue the conversation from where you left off. It works well as a companion for though and reasoning, and can be used to keep track of your thoughts and ideas. You can think of it as a journal that you can talk to.\n\n## Details\n\nThis service works by provisioning a Postgres database on your machine that stores your conversation history. Every additional number that chats with your bot will have a separate conversation history. This is done by using the Twilio `From` number as the key in the database.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhoj-ai%2Fflint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhoj-ai%2Fflint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhoj-ai%2Fflint/lists"}