{"id":13650514,"url":"https://github.com/programmarchy/directus-extension-copilot","last_synced_at":"2025-10-26T17:16:42.819Z","repository":{"id":191928734,"uuid":"685698704","full_name":"programmarchy/directus-extension-copilot","owner":"programmarchy","description":"A Directus extension that provides an Insights panel and API endpoint allowing you to chat with your data using OpenAI.","archived":false,"fork":false,"pushed_at":"2023-09-01T02:00:22.000Z","size":13416,"stargazers_count":86,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-07T01:06:03.824Z","etag":null,"topics":["directus","directus-ai-hackathon"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/programmarchy.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}},"created_at":"2023-08-31T20:03:47.000Z","updated_at":"2025-08-31T06:25:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"ceb02850-5435-4bc7-ba6b-5287f7f0a7d6","html_url":"https://github.com/programmarchy/directus-extension-copilot","commit_stats":null,"previous_names":["programmarchy/directus-extension-copilot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/programmarchy/directus-extension-copilot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmarchy%2Fdirectus-extension-copilot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmarchy%2Fdirectus-extension-copilot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmarchy%2Fdirectus-extension-copilot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmarchy%2Fdirectus-extension-copilot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/programmarchy","download_url":"https://codeload.github.com/programmarchy/directus-extension-copilot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmarchy%2Fdirectus-extension-copilot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281107094,"owners_count":26444787,"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-10-26T02:00:06.575Z","response_time":61,"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":["directus","directus-ai-hackathon"],"created_at":"2024-08-02T02:00:37.453Z","updated_at":"2025-10-26T17:16:42.783Z","avatar_url":"https://github.com/programmarchy.png","language":"TypeScript","funding_links":[],"categories":["Extensions"],"sub_categories":["Community"],"readme":"# directus-extension-copilot\n\nA Directus extension that provides an Insights panel and API endpoint allowing you to chat with your data using OpenAI.\n\n## Requirements\n\n- Directus 10.6.0\n- An OpenAI account with access to `gpt-3.5-turbo-0613`\n\n## Details\n\n- This extension allows users to quickly find out useful information about their data using a chat interface. For example:\n  - How many customers do I have?\n  - How many sales did I have last month?\n  - List all of my customer's emails in the state of Texas.\n  - What is my top selling product this week?\n- I used [langchain.js](https://js.langchain.com) (a modified version) to access the OpenAI API.\n  - A local copy resides in `packages` folder and can be built using `pnpm build:langchain`.\n- I built a bundle extension that provides an Insight panel (named 'Copilot') and an API endpoint (`POST /copilot/ask`).\n- If given longer, I would make many improvements:\n  - Store the chat history so it remains when the user navigates away from their dashboard.\n  - Ask the AI for richer data (like tables, markdown, etc.) that could be displayed in a companion side drawer alongside the chat.\n  - Enhance its capabilities by building an \"Agent\" that could plan multiple API calls instead of relying on a one-shot API call.\n  - Would allow the AI to explore more endpoints, and possibly even perform POST and PATCH operations!\n  - Support Llama and other LLMs, especially self-hosted ones.\n  - Allow users to fine-tune the LLM parameters, like temperature and which model.\n  - Remove the dependency on langchain in favor of something simpler, more lightweight.\n  - Smooth out the build process.\n\n## Demo Video\n\nhttps://github.com/programmarchy/directus-extension-copilot/assets/622192/312a6b30-063f-4d16-84f3-0d7989a4680c\n\n## Screenshots\n\n\u003cimg width=\"1241\" alt=\"screenshot-1\" src=\"https://github.com/programmarchy/directus-extension-copilot/assets/622192/de911a27-7ffb-4d7a-9f1e-3129489308f7\"\u003e\n\u003cimg width=\"1241\" alt=\"screenshot-2\" src=\"https://github.com/programmarchy/directus-extension-copilot/assets/622192/828fae64-4eea-4065-b4bf-4f965d7d2ffb\"\u003e\n\u003cimg width=\"1241\" alt=\"screenshot-3\" src=\"https://github.com/programmarchy/directus-extension-copilot/assets/622192/c015086f-3db0-4055-9895-0f8a3aaa1934\"\u003e\n\n## Build\n\nBuilding this extension is a bit wonky because of issues I had with langchain.js. I made [some hacks](https://github.com/programmarchy/langchainjs/commit/5259940ea9e2f23d6761f21f912d46dfe640bf5e), and copied the package locally to reference as a local package. To build this extension:\n\n```\npnpm build:langchain\npnpm i\npnpm build\n```\n\nTo spare you any trouble, I included the `dist` folder so you can skip having to build the extension yourself.\n\n## Installation\n\nThe easiest way to install this extension is to clone it directly into your Directus project's `extensions` path. Directus should then load it as a bundle extension.\n\n## Configuration\n\nProvide your OpenAI API key either by setting `OPENAI_API_KEY` in your Directus configuration (e.g. your `.env`), or by pasting your key into the field when configuring the Copilot panel on your Insights dashboard.\n\n## Collaborators\n\n- [programmarchy](https://github.com/programmarchy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogrammarchy%2Fdirectus-extension-copilot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogrammarchy%2Fdirectus-extension-copilot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogrammarchy%2Fdirectus-extension-copilot/lists"}