TaskWeaver (6,178 Stars) 2026

๐Ÿ“˜ Tutorials 2026-08-06 2 min read

TaskWeaver (6,178 stars) is Microsoft's code-first agent framework that turns natural language into Python for data analysis. Here is how to build your first analysis agent.

💡 What You Will Learn

TaskWeaver (6,178 stars) is Microsoft's code-first agent framework that turns natural language into Python for data analysis. Here is how to build your first analysis agent.

📜 Table of Contents

The short answer

microsoft/TaskWeaver (6,178 stars, Python) is a code-first agent framework from Microsoft. Instead of letting an LLM answer directly, TaskWeaver converts user requests into Python code, executes it in a sandbox, and returns the results - a design that makes it excellent for data analysis, plotting, and file processing tasks.

Why code-first agents win for data

Quick start

pip install taskweaver
# Generate the config and workspace
taskweaver --gen_project
cd project
# Edit taskweaver_config.json to add your OpenAI/other API key

Start the console and ask a data question:

taskweaver -p project
>>> Load sales.csv and show monthly revenue as a bar chart

TaskWeaver writes the Python, runs it, shows you the chart and the code.

Building custom plugins

Add a Python file in plugins/ with a documented function - TaskWeaver exposes it to the LLM automatically:

def compute_growth(series):
    """Compute month-over-month growth of a series."""
    return series.pct_change()

Practical tips

FAQ

Is it only for data analysis? It is optimized for it, but the code-first pattern works for any task expressible as code.

Which LLMs does it support? OpenAI, Azure OpenAI, and custom endpoints via configuration.

Is it free? Yes - MIT licensed open source.

❓ FAQ

Is it only for data analysis?

It is optimized for it, but the code-first pattern works for any task expressible as code.

Which LLMs does it support?

OpenAI, Azure OpenAI, and custom endpoints via configuration.

Is it free?

Yes - MIT licensed open source.

Related Articles
2026-08-01
OpenCode Install Guide 2026: Setup in 5 Minutes on Windows, Mac and Linux
2026-07-19
Advanced n8n Workflows for AI Agents: Automate Complex Business Logic (2026)
2026-07-16
AI Agent Logging Best Practices 2026
2026-08-01
Run Ollama on macOS in 2026: Full Setup Guide for Apple Silicon
2026-08-01
Run Ollama Locally: Hardware Requirements in 2026 (RAM, GPU, CPU)
2026-08-01
AI Safety Red Teaming in 2026: Complete Guide with 15 Test Prompts

Written by our editorial team; tools listed here are tested or verified against public sources. Links point to official sites or GitHub repos for reference only โ€” no paid placements.

๐Ÿ’ฌ Comments (0)

No comments yet. Be the first!

Login to comment