{"id":28146498,"url":"https://github.com/minhajul/database-agent","last_synced_at":"2026-05-19T09:04:45.345Z","repository":{"id":287171174,"uuid":"963776885","full_name":"minhajul/database-agent","owner":"minhajul","description":"Database Agent is a Node.js application that intelligently generates SQL queries and interacts with your database to fetch, filter, and deliver data on demand. It streamlines data access by translating user requests into optimized SQL commands, enabling seamless integration and automation.","archived":false,"fork":false,"pushed_at":"2025-04-29T16:36:44.000Z","size":16660,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-06T22:41:44.451Z","etag":null,"topics":["agent","ai","database-agent","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/minhajul.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,"zenodo":null}},"created_at":"2025-04-10T07:35:07.000Z","updated_at":"2025-05-20T00:03:16.000Z","dependencies_parsed_at":"2025-04-10T10:52:55.731Z","dependency_job_id":"8b3f3b2d-4518-47cc-b337-15a4f82d470b","html_url":"https://github.com/minhajul/database-agent","commit_stats":null,"previous_names":["minhajul/database-agent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/minhajul/database-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhajul%2Fdatabase-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhajul%2Fdatabase-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhajul%2Fdatabase-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhajul%2Fdatabase-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minhajul","download_url":"https://codeload.github.com/minhajul/database-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhajul%2Fdatabase-agent/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267083684,"owners_count":24033353,"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-07-25T02:00:09.625Z","response_time":70,"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","database-agent","nodejs"],"created_at":"2025-05-14T23:12:38.516Z","updated_at":"2026-05-19T09:04:40.320Z","avatar_url":"https://github.com/minhajul.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Database Agent Node.js App\n\nDatabase Agent is a Node.js application that intelligently generates SQL queries and interacts with your database to fetch, filter, and deliver data on demand. It streamlines data access by translating user requests into optimized SQL commands, enabling seamless integration and automation.\n\n### 🚀 Getting Started\n\nFollow these steps to run the app locally.\n\n### 1. Clone the Repository\n\n```\ngit clone https://github.com/minhajul/database-agent.git\ncd database-agent\n```\n\n### 2. Install Dependencies\n```npm install```\n\n### 3. Start Docker\n\nWe're using Docker Compose to run the PostgreSQL database. Simply start Docker and run the command below to get your database up and running.\n\n```docker-compose up --build -d```\n\n### 4. Create a ```.env``` File\n\nRun this ```cp .env.example .env``` command to create a ```.env``` file with the example from ```.env.example```:\n\n```\nDATABASE_URL=postgresql://admin:admin@localhost:5431/postgres\nAZURE_OPENAI_ENDPOINT=\nAZURE_OPENAI_DEPLOYMENT=\nAZURE_OPENAI_API_KEY=\nAZURE_API_VERSION=\n```\n\nAlso, run the below command to migrate the database:\n\n```\nnpm run generate\nnpm run migrate\n```\n\nWe're using Drizzle to interact with the PostgreSQL database. To modify the database schema, update ```schema.js``` and run ```npm run migrate``` to apply the changes.\n\n### 5. Run the App\n\n```npm run start```\n\n### Example Usage\n\nSend a POST request to ```api/database-agents``` endpoint with a natural language query:\n\n```json\n{\n  \"prompt\": \"give me the total number of users.\"\n}\n```\n\nResponse:\n\n```json\n{\n  \"status\": \"ok\",\n  \"data\": {\n    \"success\": true,\n    \"data\": {\n      \"command\": \"SELECT\",\n      \"rowCount\": 1,\n      \"oid\": null,\n      \"rows\": [\n        {\n          \"count\": \"10\"\n        }\n      ]\n    }\n  }\n}\n```\n\n### Made with ❤️ by [[minhajul](https://github.com/minhajul)]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminhajul%2Fdatabase-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminhajul%2Fdatabase-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminhajul%2Fdatabase-agent/lists"}