TaskWeaver — Code-First Data Analytics Agent
Microsoft's code-first agent framework that converts user requests into executable Python snippets for complex data analytics tasks.
TaskWeaver
TaskWeaver (by Microsoft Research) is a code-first agent framework specifically designed for data analytics tasks. Instead of string templating, it generates and executes Python code at each step, making it uniquely powerful for structured data manipulation, statistical analysis, and ML pipeline automation.
Key Features
- Code-first planning: every sub-task emits executable Python
- Stateful session with persistent memory across turns
- Plugin system: wrap any Python library as an agent tool
- Rich data type support: DataFrames, NumPy arrays, images, time series
- Human-in-the-loop option for reviewing generated code before execution
- Built-in plugin library: SQL, sklearn, pandas, matplotlib, …
Quick Start
git clone https://github.com/microsoft/TaskWeaver
pip install -e .
# edit taskweaver/config.yaml (set LLM endpoint)
python taskweaver/app/app.py
from taskweaver.app.app import TaskWeaverApp
app = TaskWeaverApp(app_dir=".", config={"llm.model": "gpt-4o"})
session = app.get_session()
response = session.chat("Load sales.csv and show me monthly revenue trends")
print(response.post_list[-1].message)
Install via ai-supply
npx ai-supply add taskweaver-code-first-data-agent
Curated mirror of the open-source TaskWeaver (MIT). Get it from the source.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/taskweaver-code-first-data-agent/check). Click a policy:
Consume TaskWeaver — Code-First Data Analytics Agent programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/taskweaver-code-first-data-agent
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/taskweaver-code-first-data-agent/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add taskweaver-code-first-data-agent
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/taskweaver-code-first-data-agent/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "taskweaver-code-first-data-agent" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.