Favicon of TaskWeaver

TaskWeaver

This AI agent framework turns data analysis requests into Python code and runs locally with Docker, using local LLMs or OpenAI.

Screenshot of TaskWeaver website

TaskWeaver is an AI agent framework for developers building assistants that analyze data through Python code. The project is archived and no longer maintained.

  • Task planning: The agent breaks requests into smaller tasks, tracks progress, and adjusts its approach after reviewing execution results.
  • Stateful data analysis: It retains conversation history, executed code, and in-memory data between steps, so an analysis can continue working with Python DataFrames rather than passing everything as text.
  • Custom algorithms: Developers can connect their own algorithms as function-based plugins and supply domain knowledge for specialized analysis, including database queries, anomaly detection, and forecasting.
  • Code checks and inspection: It checks generated code for potential issues before execution and provides logs of model prompts, generated code, and execution for debugging.

TaskWeaver is open source under the MIT license. It runs locally with Python and uses Docker containers for code execution by default. It supports locally served LLMs as well as OpenAI; choosing OpenAI sends model requests to that external service and requires an API key.

You can use it through a command-line interface or integrate it into an existing Python application as a library. A demo web interface can display generated artifacts such as images. Session management separates users' data, and code runs in separate processes.

Similar to TaskWeaver