[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71120":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":22,"defaultBranch":23,"hasWiki":21,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},71120,"TaskWeaver","microsoft\u002FTaskWeaver","microsoft","The first \"code-first\" agent framework for seamlessly planning and executing data analytics tasks. ","https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002F",null,"Python",6165,779,70,40,0,4,6,67.28,"MIT License",true,false,"main",[25,26,27,28,29,30,31],"agent","ai-agents","code-interpreter","copilot","data-analysis","llm","openai","2026-06-12 04:00:59","\u003Ch1 align=\"center\">\n    \u003Cimg src=\".\u002F.asset\u002Flogo.color.svg\" width=\"45\" \u002F> TaskWeaver\n\u003C\u002Fh1>\n\n\u003Cdiv align=\"center\">\n\n![Python Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3776AB?&logo=python&logoColor=white-blue&label=3.10%20%7C%203.11)&ensp;\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)&ensp;\n![Welcome](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcontributions-welcome-brightgreen.svg?style=flat)\n\n\u003C\u002Fdiv>\n\nTaskWeaver is A **code-first** agent framework for seamlessly planning and executing data analytics tasks. \nThis innovative framework interprets user requests through code snippets and efficiently coordinates a variety \nof plugins in the form of functions to execute data analytics tasks in a stateful manner.\n\nUnlike many agent frameworks that only track the chat history with LLMs in text, TaskWeaver preserves both the **chat history** and the **code execution history**, including the in-memory data. This feature enhances the *expressiveness* of the agent framework, making it ideal for processing complex data structures like high-dimensional tabular data.\n\n\u003Ch1 align=\"center\">\n    \u003Cimg src=\".\u002F.asset\u002Ftaskweaver_arch.png\"\u002F> \n\u003C\u002Fh1>\n\n\n## 🆕 News\n- 📅2025-03-13: TaskWeaver now supports vision input for the Planner role. Please check the [vision input](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fblog\u002Fvision) for more details.👀\n- 📅2025-01-16: TaskWeaver has been enhanced with an experimental role called [Recepta](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fblog\u002Freasoning) for its reasoning power.🧠\n- 📅2024-12-23: TaskWeaver has been integrated with the [AgentOps](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Fobservability) for better observability and monitoring.🔍\n- 📅2024-09-13: We introduce the shared memory to store information that is shared between the roles in TaskWeaver. Please check the [memory](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Fmemory) for more details.🧠\n- 📅2024-09-13: We have enhanced the experience feature by allowing static and dynamic experience selection. Please check the [experience](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fblog\u002Fexperience) for more details.📚 \n- 📅2024-07-02: We have optimized TaskWeaver to support not-that-large language models served locally. Please check this [post](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fblog\u002Flocal_llm) for more details.🔗\n- 📅2024-05-07: We have added two blog posts on [Evaluating a LLM agent](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fblog\u002Fevaluation) and [Adding new roles to TaskWeaver](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fblog\u002Frole) in the documentation.📝\n- 📅2024-03-28: TaskWeaver now offers all-in-one Docker image, providing a convenient one-stop experience for users. Please check the [docker](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Fusage\u002Fdocker) for more details.🐳\n- 📅2024-03-27: TaskWeaver now switches to `container` mode by default for code execution. Please check the [code execution](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Fcode_execution) for more details.🐳\n\u003C!-- - 📅2024-03-07: TaskWeaver now supports configuration of different LLMs for various components, such as the Planner and CodeInterpreter. Please check the [multi-llm](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Fllms\u002Fmulti-llm) for more details.🔗 -->\n\u003C!-- - 📅2024-03-04: TaskWeaver now supports a [container](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Fcode_execution) mode, which provides a more secure environment for code execution.🐳 -->\n\u003C!-- - 📅2024-02-28: TaskWeaver now offers a [CLI-only](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Fadvanced\u002Fcli_only) mode, enabling users to interact seamlessly with the Command Line Interface (CLI) using natural language.📟 -->\n\u003C!-- - 📅2024-02-01: TaskWeaver now has a plugin [document_retriever](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTaskWeaver\u002Fblob\u002Fmain\u002Fproject\u002Fplugins\u002FREADME.md#document_retriever) for RAG based on a knowledge base.📚 -->\n\u003C!-- - 📅2024-01-30: TaskWeaver introduces a new plugin-only mode that securely generates calls to specified plugins without producing extraneous code.🪡 --> \n\u003C!-- - 📅2024-01-23: TaskWeaver can now be personalized by transforming your chat histories into enduring [experiences](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Fcustomization\u002Fexperience) 🎉 -->\n\u003C!-- - 📅2024-01-17: TaskWeaver now has a plugin [vision_web_explorer](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTaskWeaver\u002Fblob\u002Fmain\u002Fproject\u002Fplugins\u002FREADME.md#vision_web_explorer) that can open a web browser and explore websites.🌐 -->\n\u003C!-- - 📅2024-01-15: TaskWeaver now supports Streaming♒ in both UI and command line.✌️ -->\n\u003C!-- - 📅2024-01-01: Welcome join TaskWeaver [Discord](https:\u002F\u002Fdiscord.gg\u002FZ56MXmZgMb). -->\n\u003C!-- - 📅2023-12-21: TaskWeaver now supports a number of LLMs, such as LiteLLM, Ollama, Gemini, and QWen🎈.) -->\n\u003C!-- - 📅2023-12-21: TaskWeaver Website is now [available]&#40;https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002F&#41; with more documentations.) -->\n\u003C!-- - 📅2023-12-12: A simple UI demo is available in playground\u002FUI folder, try it [here](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Fusage\u002Fwebui)! -->\n- ......\n- 📅2023-11-30: TaskWeaver is released on GitHub🎈.  \n\n\n## 💥 Highlights\n\n- [x] **Planning for complex tasks** - TaskWeaver, which features task decomposition and progress tracking, is designed to solve complex tasks.\n- [x] **Reflective execution** - TaskWeaver supports reflective execution, which allows the agent to reflect on the execution process and make adjustments.\n- [x] **Rich data structure** - TaskWeaver allows you to work with rich data structures in Python, such as DataFrames, instead of dealing with strings.\n- [x] **Customized algorithms** - TaskWeaver allows you to encapsulate your own algorithms into plugins and orchestrate them.\n- [x] **Incorporating domain-specific knowledge** - TaskWeaver is designed to incorporate domain-specific knowledge easily to improve the reliability.\n- [x] **Stateful execution** - TaskWeaver is designed to support stateful execution of the generated code to ensure consistent and smooth user experience.\n- [x] **Code verification** - TaskWeaver is designed to verify the generated code before execution. It can detect potential issues in the generated code and provide suggestions to fix them.\n- [x] **Easy to use** - TaskWeaver is easy to use with sample plugins, examples and tutorials to help you get started. TaskWeaver offers an open-box experience, allowing users to run it immediately after installation.\n- [x] **Easy to debug** - TaskWeaver is easy to debug with detailed and transparent logs to help you understand the entire process, including LLM prompts, the code generation, and execution process.\n- [x] **Security consideration** - TaskWeaver supports a basic session management to keep different users' data separate. The code execution is separated into different processes to avoid mutal interference.\n- [x] **Easy extension** - TaskWeaver is easy to extend to accomplish more complex tasks with multiple agents as roles and plugins.\n\n## 📚 Asking for Contributions\n\nThere are still many features and improvements can be made. But due to our limited resources, we are not able to implement all of them or the progress will be slow. \nWe are looking forward to your contributions to make TaskWeaver better.\n- [ ] Easy-to-use and maintainable UX\u002FUI\n- [ ] Support for prompt template management\n- [ ] Better plugin experiences, such as displaying updates or stopping in the middle of running the plugin and user confirmation before running the plugin\n- [ ] Async interaction with LLMs\n- [ ] Support for remote code execution\n\n\n## ✨ Quick Start\n\n### 🛠️ Step 1: Installation\nTaskWeaver requires **Python >= 3.10**. It can be installed by running the following command:\n```bash\n# [optional to create conda environment]\n# conda create -n taskweaver python=3.10\n# conda activate taskweaver\n\n# clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTaskWeaver.git\ncd TaskWeaver\n# install the requirements\npip install -r requirements.txt\n```\n\nIf you want to install an earlier version of TaskWeaver, you may check the [release](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTaskWeaver\u002Freleases) page, find the tag (e.g., `v0.0.1`) and install it by \n```\npip install git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTaskWeaver@\u003CTAG>\n```\n\n### 🖊️ Step 2: Configure the LLMs\nBefore running TaskWeaver, you need to provide your LLM configurations. Taking OpenAI as an example, you can configure `taskweaver_config.json` file as follows. \n\n#### OpenAI\n```json\n{\n  \"llm.api_key\": \"the api key\",\n  \"llm.model\": \"the model name, e.g., gpt-4\"\n}\n```\n\n💡 TaskWeaver also supports other LLMs and advanced configurations, please check the [documents](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Foverview) for more details. \n\n### 🚩 Step 3: Start TaskWeaver\n\n💡 TaskWeaver has switched to `container` mode by default for code execution, which means the code is run in a container.\nYou may need to install Docker and take care of the dependencies in the container.\nPlease check the [code execution](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Fcode_execution) for more details.\n\n#### ⌨️ Command Line (CLI)\n```bash\n# assume you are in the cloned TaskWeaver folder\npython -m taskweaver -p .\u002Fproject\u002F\n```\nThis will start the TaskWeaver process and you can interact with it through the command line interface. \nIf everything goes well, you will see the following prompt:\n\n```\n=========================================================\n _____         _     _       __\n|_   _|_ _ ___| | _ | |     \u002F \u002F__  ____ __   _____  _____\n  | |\u002F _` \u002F __| |\u002F \u002F| | \u002F| \u002F \u002F _ \\\u002F __ `\u002F | \u002F \u002F _ \\\u002F ___\u002F\n  | | (_| \\__ \\   \u003C | |\u002F |\u002F \u002F  __\u002F \u002F_\u002F \u002F| |\u002F \u002F  __\u002F \u002F\n  |_|\\__,_|___\u002F_|\\_\\|__\u002F|__\u002F\\___\u002F\\__,_\u002F |___\u002F\\___\u002F_\u002F\n=========================================================\nTaskWeaver: I am TaskWeaver, an AI assistant. To get started, could you please enter your request?\nHuman: ___\n```\n\n####  or 💻 Web UI \nTaskWeaver also supports WebUI for demo purpose, please refer to [web UI docs](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Fusage\u002Fwebui) for more details.\n\n#### or 📋 Import as a Library\nTaskWeaver can be imported as a library to integrate with your existing project, more information can be found in [docs](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Fusage\u002Flibrary)\n\n\n\n## 📖 Documentation\nMore documentations can be found on [TaskWeaver Website](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver).\n\n\n### ❓Get help \n* ❔GitHub Issues (**Preferred**)\n* [💬 Discord](https:\u002F\u002Fdiscord.gg\u002FZ56MXmZgMb) for discussion\n* For other communications, please contact taskweaver@microsoft.com\n\n---\n\n\n## 🎬 Demo Examples\n\nThe demos were made based on the [web UI](https:\u002F\u002Fmicrosoft.github.io\u002FTaskWeaver\u002Fdocs\u002Fusage\u002Fwebui), which is better for displaying the generated artifacts such as images. \nThe demos could also be conducted in the command line interface. \n\n#### 1️⃣📉 Example 1: Pull data from a database and apply an anomaly detection algorithm\nIn this example, we will show you how to use TaskWeaver to pull data from a database and apply an anomaly detection algorithm.\n\n[Anomaly Detection](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTaskWeaver\u002Fassets\u002F7489260\u002F248b9a0c-d504-4708-8c2e-e004689ee8c6)\n\nIf you want to follow this example, you need to configure the `sql_pull_data` plugin in the `project\u002Fplugins\u002Fsql_pull_data.yaml` file.\nYou need to provide the following information:\n```yaml\napi_type: azure or openai\napi_base: ...\napi_key: ...\napi_version: ...\ndeployment_name: ...\nsqlite_db_path: sqlite:\u002F\u002F\u002F..\u002F..\u002F..\u002Fsample_data\u002Fanomaly_detection.db\n```\nThe `sql_pull_data` plugin is a plugin that pulls data from a database. It takes a natural language request as input and returns a DataFrame as output.\n\nThis plugin is implemented based on [Langchain](https:\u002F\u002Fwww.langchain.com\u002F).\nIf you want to follow this example, you need to install the Langchain package:\n```bash\npip install langchain\npip install tabulate\n```\n\n#### 2️⃣🏦 Example 2: Forecast QQQ's price in the next 7 days\nIn this example, we will show you how to use TaskWeaver to forecast QQQ's price in the next 7 days. \n\n[Nasdaq 100 Index Price Forecasting](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTaskWeaver\u002Fassets\u002F7489260\u002F1361ed83-16c3-4056-98fc-e0496ecab015)\n\nIf you want to follow this example, you need to ensure you have these two requirements installed:\n```bash\npip install yfinance\npip install statsmodels\n```\n\nFor more examples, please refer to our [paper](http:\u002F\u002Fexport.arxiv.org\u002Fabs\u002F2311.17541). \n\n> 💡 The planning of TaskWeaver are based on the LLM model. Therefore, if you want to repeat the examples, the execution process may be different\n> from what you see in the videos. For example, in the second demo, the assistant may ask the user which prediction algorithm should be used.\n> Typically, more concrete prompts will help the model to generate better plans and code.\n\n\n## 📚 Citation\nOur paper could be found [here](http:\u002F\u002Fexport.arxiv.org\u002Fabs\u002F2311.17541). \nIf you use TaskWeaver in your research, please cite our paper:\n```\n@article{taskweaver,\n  title={TaskWeaver: A Code-First Agent Framework},\n  author={Bo Qiao, Liqun Li, Xu Zhang, Shilin He, Yu Kang, Chaoyun Zhang, Fangkai Yang, Hang Dong, Jue Zhang, Lu Wang, Minghua Ma, Pu Zhao, Si Qin, Xiaoting Qin, Chao Du, Yong Xu, Qingwei Lin, Saravan Rajmohan, Dongmei Zhang},\n  journal={arXiv preprint arXiv:2311.17541},\n  year={2023}\n}\n```\n\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft \ntrademarks or logos is subject to and must follow \n[Microsoft's Trademark & Brand Guidelines](https:\u002F\u002Fwww.microsoft.com\u002Fen-us\u002Flegal\u002Fintellectualproperty\u002Ftrademarks\u002Fusage\u002Fgeneral).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.\n\n## Disclaimer\nThe recommended models in this Repo are just examples, used to explore the potential of agent systems with the paper at [TaskWeaver: A Code-First Agent Framework](https:\u002F\u002Fexport.arxiv.org\u002Fabs\u002F2311.17541). Users can replace the models in this Repo according to their needs. When using the recommended models in this Repo, you need to comply with the licenses of these models respectively. Microsoft shall not be held liable for any infringement of third-party rights resulting from your usage of this repo. Users agree to defend, indemnify and hold Microsoft harmless from and against all damages, costs, and attorneys' fees in connection with any claims arising from this Repo. If anyone believes that this Repo infringes on your rights, please notify the project owner email.\n","TaskWeaver 是一个“代码优先”的代理框架，用于无缝规划和执行数据分析任务。它通过代码片段解析用户请求，并高效协调多种插件函数以状态化方式执行数据分析任务。与仅跟踪文本聊天历史的其他代理框架不同，TaskWeaver 保留了聊天历史和代码执行历史，包括内存中的数据，增强了框架的表达能力，特别适用于处理高维表格数据等复杂数据结构。适合需要高度自定义和灵活性的数据分析场景，如科研、商业智能报告生成等。",2,"2026-06-11 03:36:00","high_star"]