Skip to content

Commit

Permalink
add architecture figure, revise readme (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShilinHe authored Jan 8, 2024
2 parents 07d6e4a + 5141c21 commit 078949a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 18 deletions.
Binary file added .asset/taskweaver_arch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 33 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,32 @@
<img src="./.asset/logo.color.svg" width="45" /> TaskWeaver
</h1>

A **code-first** agent framework for seamlessly planning and executing data analytics tasks.
This innovative framework interprets user requests through coded snippets and efficiently
coordinates a variety of plugins in the form of functions to execute
data analytics tasks.
<div align="center">

# News🆕
[![Discord Follow](https://dcbadge.vercel.app/api/server/Z56MXmZgMb?style=flat)](https://discord.gg/Z56MXmZgMb) &ensp;
![Python Version](https://img.shields.io/badge/Python-3776AB?&logo=python&logoColor=white-blue&label=3.10%20%7C%203.11)&ensp;
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)&ensp;
![Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)

</div>

TaskWeaver is A **code-first** agent framework for seamlessly planning and executing data analytics tasks. This innovative framework interprets user requests through coded snippets and efficiently coordinates a variety of plugins in the form of functions to execute data analytics tasks in a stateful manner.


<h1 align="center">
<img src="./.asset/taskweaver_arch.png"/>
</h1>


## 🆕 News
- 📅2024-01-01: Happy New Year 🎆 with TaskWeaver [Discord](https://discord.gg/Z56MXmZgMb).
- 📅2023-12-21: TaskWeaver now supports a number of LLMs, such as LiteLLM, Ollama, Gemini, and QWen🎈.
- 📅2023-12-21: TaskWeaver Website is now [available](https://microsoft.github.io/TaskWeaver/) with more documentations.
- 📅2023-12-12: A simple UI demo is available in playground/UI folder, try it [here](https://microsoft.github.io/TaskWeaver/docs/usage/webui)!
<!-- - [2023-11-30] TaskWeaver is released on GitHub🎈. -->


## Highlights
## 💥 Highlights

- [x] **Rich data structure** - TaskWeaver allows you to work with rich data structures in Python, such as DataFrames, instead of dealing with strings.
- [x] **Customized algorithms** - TaskWeaver allows you to encapsulate your own algorithms into plugins and orchestrate them.
Expand All @@ -27,9 +39,9 @@ data analytics tasks.
- [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.
- [x] **Easy extension** - TaskWeaver is easy to extend to accomplish more complex tasks with multiple agents as the plugins.

## Quick Start
## Quick Start

### Installation
### 🛠️ Step 1: Installation
TaskWeaver requires **Python >= 3.10**. It can be installed by running the following command:
```bash
# [optional to create conda environment]
Expand All @@ -44,7 +56,7 @@ pip install -r requirements.txt
```


### Configure the LLMs
### 🖊️ Step 2: Configure the LLMs
Before running TaskWeaver, you need to provide your LLM configurations. Taking OpenAI as an example, you can configure `taskweaver_config.json` file as follows.

#### OpenAI
Expand All @@ -57,9 +69,9 @@ Before running TaskWeaver, you need to provide your LLM configurations. Taking O

💡 TaskWeaver also supports other LLMs and advanced configurations, please check the [documents](https://microsoft.github.io/TaskWeaver/docs/overview) for more details.

### Start TaskWeaver
### 🚩 Step 3: Start TaskWeaver

#### 1. Command Line Interaction
#### ⌨️ Command Line (CLI)
```bash
# assume you are in the cloned TaskWeaver folder
python -m taskweaver -p ./project/
Expand All @@ -79,26 +91,29 @@ TaskWeaver: I am TaskWeaver, an AI assistant. To get started, could you please e
Human: ___
```

#### 2. Web UI
#### or 💻 Web UI
TaskWeaver also supports WebUI for demo purpose, please refers to [web UI docs](https://microsoft.github.io/TaskWeaver/docs/usage/webui) for more details.

#### 3. Import as a Library
#### or 📋 Import as a Library
TaskWeaver can be imported as a library to integrate with your existing project, more information can be found in [docs](https://microsoft.github.io/TaskWeaver/docs/usage/library)

## Documentation
## 📖 Documentation
More documentations can be found on [TaskWeaver Website](https://microsoft.github.io/TaskWeaver).


### ❓Get help
* ❔GitHub Issues (prefered)
* [💬 Discord](https://discord.gg/Z56MXmZgMb) for discussion

---


## Demo Examples
## 🎬 Demo Examples

The demos were made based on the [web UI](https://microsoft.github.io/TaskWeaver/docs/usage/webui), which is better for displaying the generated artifacts such as images.
The demos could also be conducted in the command line interface.

#### Example 1: Pull data from a database and apply an anomaly detection algorithm
#### 1️⃣📉 Example 1: Pull data from a database and apply an anomaly detection algorithm
In this example, we will show you how to use TaskWeaver to pull data from a database and apply an anomaly detection algorithm.

[Anomaly Detection](https://github.com/microsoft/TaskWeaver/assets/7489260/248b9a0c-d504-4708-8c2e-e004689ee8c6)
Expand All @@ -122,7 +137,7 @@ pip install langchain
pip install tabulate
```

#### Example 2: Forecast QQQ's price in the next 7 days
#### 2️⃣🏦 Example 2: Forecast QQQ's price in the next 7 days
In this example, we will show you how to use TaskWeaver to forecast QQQ's price in the next 7 days.

[Nasdaq 100 Index Price Forecasting](https://github.com/microsoft/TaskWeaver/assets/7489260/1361ed83-16c3-4056-98fc-e0496ecab015)
Expand All @@ -140,7 +155,7 @@ For more examples, please refer to our [paper](http://export.arxiv.org/abs/2311.
> Typically, more concrete prompts will help the model to generate better plans and code.


## Citation
## 📚 Citation
Our paper could be found [here](http://export.arxiv.org/abs/2311.17541).
If you use TaskWeaver in your research, please cite our paper:
```
Expand Down

0 comments on commit 078949a

Please sign in to comment.