{"id":13456228,"url":"https://github.com/idosal/AgentLLM","last_synced_at":"2025-03-24T09:31:45.098Z","repository":{"id":157332533,"uuid":"633037655","full_name":"idosal/AgentLLM","owner":"idosal","description":"AgentLLM is a PoC for browser-native autonomous agents","archived":false,"fork":false,"pushed_at":"2023-07-31T18:08:47.000Z","size":11132,"stargazers_count":406,"open_issues_count":11,"forks_count":72,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-21T23:10:28.650Z","etag":null,"topics":["agents","autogpt","babyagi","browser","chatgpt","langchain","llm","vicuna","webgpu"],"latest_commit_sha":null,"homepage":"https://agentllm.vercel.app","language":"JavaScript","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/idosal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"idosal"}},"created_at":"2023-04-26T16:39:28.000Z","updated_at":"2025-03-19T13:30:22.000Z","dependencies_parsed_at":"2024-01-14T08:06:49.928Z","dependency_job_id":null,"html_url":"https://github.com/idosal/AgentLLM","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idosal%2FAgentLLM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idosal%2FAgentLLM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idosal%2FAgentLLM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idosal%2FAgentLLM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idosal","download_url":"https://codeload.github.com/idosal/AgentLLM/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245243363,"owners_count":20583613,"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":["agents","autogpt","babyagi","browser","chatgpt","langchain","llm","vicuna","webgpu"],"created_at":"2024-07-31T08:01:18.152Z","updated_at":"2025-03-24T09:31:45.088Z","avatar_url":"https://github.com/idosal.png","language":"JavaScript","funding_links":["https://github.com/sponsors/idosal","https://github.com/sponsors/reworkd-admin"],"categories":["HarmonyOS","JavaScript","llm","chatgpt","Complete solutions"],"sub_categories":["Windows Manager","Web browser"],"readme":"# AgentLLM\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/18148989/234702228-c83aef13-9514-4cd6-9537-a72c3a0ca494.png\"\u003c/img\u003e\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003ca href=\"https://agentllm.vercel.app/\"\u003e![Demo](https://img.shields.io/badge/Demo-AgentLLM-green)\u003c/a\u003e\n[![Medium Badge](https://badgen.net/badge/icon/medium?icon=medium\u0026label)](https://medium.com/@idosalomon)\n[![Twitter Follow](https://img.shields.io/twitter/follow/idosal1?style=social)](https://twitter.com/idosal1)\n\n\u003c/div\u003e\n\n---\n\n\u003cb\u003eAgentLLM\u003c/b\u003e is the first proof of concept to utilize an open-source large language model (LLM) to develop autonomous agents that operate solely on the browser. Its main goal is to demonstrate that embedded LLMs have the ability to handle the complex goal-oriented tasks of autonomous agents with acceptable performance. Learn more on [Medium](https://medium.com/@idosalomon/agentllm-revolutionizing-autonomous-agent-applications-with-browser-native-llms-93768d0beec5?source=friends_link\u0026sk=716c84d77108d81029e1918f19d86f4c) and feel free to check out the [demo](https://agentllm.vercel.app/).\n\n\u0026nbsp;\n\n\u003cp align=\"center\"\u003e\n  \u003cvideo src=\"https://user-images.githubusercontent.com/18148989/235238515-5ae20e89-76f2-4a83-989c-f0703c3657af.mp4\" width=80% height=80%\u003e\n\n  \u003c/p\u003e\n \u0026nbsp;\n\nThe implementation of the embedded LLM builds on the fantastic research of \u003ca href=\"https://github.com/mlc-ai/web-llm\"\u003eWebLLM\u003c/a\u003e, which takes advantage of Chromium's bleeding edge introduction of \u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API\"\u003eWebGPU\u003c/a\u003e to run inference utilizing the GPU. It offers significant performance gains over the previously available CPU-based implementations.\n\nTo create a sanitary and accessible sandbox, I chose to modify the popular \u003ca href=\"https://github.com/reworkd/AgentGPT\"\u003eAgentGPT\u003c/a\u003e project by replacing ChatGPT with [WizardLM](https://github.com/nlpxucan/WizardLM) and changing the prompt mechanism. At its core, AgentGPT allows deploying autonomous agents to perform any arbitrary goal (from basic tasks to complex problem solving) by running a loop of task generation and execution. It's a perfect match for our requirements as its agents do not use tools, eliminating the complexity and unpredictability of external factors (which is present in full-blown implementations of other popular frameworks), and its GUI is friendly and feature-rich. The sandbox enables quick prototyping of the models' ability to break down tasks and plan ahead (feel free to \u003ca href=\"https://agentllm.vercel.app/\"\u003etry it!\u003c/a\u003e).\u003c/p\u003e\n\n\u003cp\u003e\nConsider supporting AgentGPT (the template for this project) by \u003ca href=\"https://github.com/sponsors/reworkd-admin\"\u003eclicking here\u003c/a\u003e.\n\u003c/p\u003e\n\n## 🚀 Motivation\n\n\u003cp\u003eRecent advancements in large language models (LLMs) like OpenAI's ChatGPT and GPT-4 have led to the rise of autonomous agents that can act independently, without human intervention, to achieve specified goals. However, most notable LLMs require massive computational resources, restricting their operation to powerful remote servers. Their remote operation leads to a variety of issues concerning privacy, cost, and availability. Enter browser-native LLMs come in, changing the way we think about autonomous agents and their potential applications.\u003c/p\u003e\n\n---\n\n\u003cb\u003eDisclaimer\u003c/b\u003e\n\nThis project is a proof-of-concept utilizing experimental technologies. It is by no means a production-ready implementation, and it should not be used for anything other than research. It's provided \"as-is\" without any warranty, expressed or implied. By using this software, you agree to assume all risks associated with its use, including but not limited to data loss, system failure, or any other issues that may arise.\n\n## ➡️ Getting Started\n\n### 🏃 Running the demo\n\n1. Install \u003ca href=\"https://www.google.com/chrome/\"\u003eChrome\u003c/a\u003e or \u003ca href=\"https://www.microsoft.com/en-us/edge/download/\"\u003eEdge\u003c/a\u003e. Make sure you're up-to-date (at least M113 Chromium version).\n2. Launch the browser (preferably with `--enable-dawn-features=disable_robustness` for performance).\n   For example, in MacOS with Chrome, run the following command in the terminal: `/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --enable-dawn-features=disable_robustness`\n3. Navigate to \u003ca href=\"https://agentllm.vercel.app/\"\u003eAgentLLM\u003c/a\u003e\n\nSince running the model locally is very taxing, lower-tier devices may not be able to run the demo. For the best experience, try AgentLLM on a powerful desktop device.\n\n### 🐳 Docker Setup\n\nThe easiest way to run AgentLLM locally is by using docker.\nA convenient setup script is provided to help you get started.\n\n```bash\n./setup.sh --docker\n```\n\n### Docker-compose\n\nUsing `docker-compose` deploy\n\n```bash\n./setup.sh --docker-compose\n```\n\n### 👷 Local Development Setup\n\nIf you wish to develop AgentLLM locally, the easiest way is to\nuse the provided setup script.\n\n```bash\n./setup.sh --local\n```\n\n### 🛠️ Manual Setup\n\n\u003e 🚧 You will need [Nodejs +18 (LTS recommended)](https://nodejs.org/en/) installed.\n\n1. Fork this project:\n\n- [Click here](https://github.com/idosal/AgentLLM/fork).\n\n2. Clone the repository:\n\n```bash\ngit clone git@github.com:YOU_USER/AgentLLM.git\n```\n\n3. Install dependencies:\n\n```bash\ncd AgentLLM\nnpm install\n```\n\n4. Create a **.env** file with the following content:\n\n\u003e 🚧 The environment variables must match the following [schema](https://github.com/idosal/AgentLLM/blob/main/src/env/schema.mjs).\n\n```bash\n# Deployment Environment:\nNODE_ENV=development\n\n# Next Auth config:\n# Generate a secret with `openssl rand -base64 32`\nNEXTAUTH_SECRET=changeme\nNEXTAUTH_URL=http://localhost:3000\nDATABASE_URL=file:./db.sqlite\n\n# Your open api key\nOPENAI_API_KEY=changeme\n```\n\n5. Modify prisma schema to use sqlite:\n\n```bash\n./prisma/useSqlite.sh\n```\n\n**Note:** This only needs to be done if you wish to use sqlite.\n\n6. Ready 🥳, now run:\n\n```bash\n# Create database migrations\nnpx prisma db push\nnpm run dev\n```\n\n### 🚀 GitHub Codespaces\n\nSet up AgentLLM in the cloud immediately by using [GitHub Codespaces](https://github.com/features/codespaces).\n\n1. From the GitHub repo, click the green \"Code\" button and select \"Codespaces\".\n2. Create a new Codespace or select a previous one you've already created.\n3. Codespaces opens in a separate tab in your browser.\n4. In terminal, run `bash ./setup.sh --local`\n5. When prompted in terminal, add your OpenAI API key.\n6. Click \"Open in browser\" when the build process completes.\n\n- To shut AgentLLM down, enter Ctrl+C in Terminal.\n- To restart AgentLLM, run `npm run dev` in Terminal.\n\nRun the project 🥳\n\n```\nnpm run dev\n```\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidosal%2FAgentLLM","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidosal%2FAgentLLM","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidosal%2FAgentLLM/lists"}