{"id":17803808,"url":"https://github.com/variablevic/medusa-ai-assistant","last_synced_at":"2026-03-13T13:32:06.752Z","repository":{"id":201006677,"uuid":"706715334","full_name":"VariableVic/medusa-ai-assistant","owner":"VariableVic","description":"Medusa AI Assistant admin widget that turns human language into returns within seconds.","archived":false,"fork":false,"pushed_at":"2023-10-18T17:29:29.000Z","size":28,"stargazers_count":53,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T07:01:46.225Z","etag":null,"topics":["ai","ecommerce","gpt-3-5-turbo","medusa","medusa-admin","medusa-ui","medusajs","openai","vercel-ai-sdk"],"latest_commit_sha":null,"homepage":"https://twitter.com/VariableVic","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VariableVic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-10-18T13:34:13.000Z","updated_at":"2025-02-11T09:59:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"a245cae5-4369-4d7d-b815-de31fd51634c","html_url":"https://github.com/VariableVic/medusa-ai-assistant","commit_stats":null,"previous_names":["variablevic/medusa-ai-assistant"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VariableVic/medusa-ai-assistant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VariableVic%2Fmedusa-ai-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VariableVic%2Fmedusa-ai-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VariableVic%2Fmedusa-ai-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VariableVic%2Fmedusa-ai-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VariableVic","download_url":"https://codeload.github.com/VariableVic/medusa-ai-assistant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VariableVic%2Fmedusa-ai-assistant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30467802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai","ecommerce","gpt-3-5-turbo","medusa","medusa-admin","medusa-ui","medusajs","openai","vercel-ai-sdk"],"created_at":"2024-10-27T12:48:03.556Z","updated_at":"2026-03-13T13:32:06.723Z","avatar_url":"https://github.com/VariableVic.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.medusajs.com\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://user-images.githubusercontent.com/59018053/229103275-b5e482bb-4601-46e6-8142-244f531cebdb.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg\"\u003e\n    \u003cimg alt=\"Medusa logo\" src=\"https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003e\n  Medusa AI Order Returns Assistant\n\u003c/h1\u003e\n\n\nAn AI Order Returns Assistant widget for the [Medusa](https://medusajs.com/) admin. You can use natural language to explain the situation, and it will extract all necessary data to create the return order. Built with [Medusa UI](https://docs.medusajs.com/ui), [OpenAI](https://platform.openai.com), and [Vercel AI SDK](https://sdk.vercel.ai).\n\nFeel free to take this code and use it to create any Medusa AI assistant you need. By editing the system prompt in `src/api/routes/admin/completion/order-returns.ts` and the functions in `src/util/gpt-functions/returns.ts` and `src/admin/widgets/assistants/order-assistant.tsx`, you can change its behavior and give it access to different admin hooks.\n\n**Disclaimer**: this code is the result of my experimentation, and is by no means optimized or actively maintained.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://twitter.com/intent/follow?screen_name=VariableVic\"\u003e\n    \u003cimg src=\"https://img.shields.io/twitter/follow/VariableVic.svg?label=Follow%20@VariableVic\" alt=\"Follow @VariableVic\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nhttps://github.com/VariableVic/medusa-ai-assistant/assets/42065266/51ce4de4-c0e9-423c-baf2-d86eb3129097\n\n## Prerequisites\n\n1. This widget requires an OpenAI platform account and API key. Go to https://platform.openai.com/account/api-keys to set this up.\n2. You need a valid Medusa database. The fastest way to set this up is by using [create-medusa-app](https://docs.medusajs.com/create-medusa-app).\n\n## Getting Started\n\n1. Clone repo and install dependencies.\n2. In your `.env` file, add an `OPENAI_API_KEY` environment variable containing your API key, and link  your database:\n\n```\nOPENAI_API_KEY=\u003cYOUR OPENAI API KEY\u003e\nDATABASE_URL=\u003cYOUR MEDUSA DB URL\u003e\n```\n\n3. Start your dev server and log into the admin. Open any order details page and the widget will appear on the bottom of the page!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvariablevic%2Fmedusa-ai-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvariablevic%2Fmedusa-ai-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvariablevic%2Fmedusa-ai-assistant/lists"}