Microsoft framework for code-first autonomous agents that convert natural language tasks into executable Python code plans.
Microsoft's framework for AI agents that write and run code to solve tasks — turns natural language instructions into executable programs.
TaskWeaver is an open-source agent framework from Microsoft Research that takes a code-first approach to task execution. Instead of relying on text-based tool descriptions and ReAct-style reasoning, TaskWeaver converts natural language requests into executable Python code, plans multi-step executions, and runs them in a managed process with native support for data structures like pandas DataFrames and NumPy arrays.
This code-first design is TaskWeaver's key differentiator. While frameworks like LangChain agents pass text between steps and lose data fidelity, TaskWeaver generates and executes actual Python programs that can manipulate complex data structures directly in memory. This makes it particularly powerful for data analytics tasks — an agent can load a CSV into a DataFrame, perform statistical analysis, generate visualizations, and iterate on results without serializing data to text at each step.
The architecture consists of a Planner (decomposes user requests into sub-tasks), a Code Generator (converts sub-tasks into Python code), and a Code Executor (runs generated code in a sandboxed Python process). Custom functionality is added through plugins — Python functions with YAML descriptions that the agent can incorporate into its generated code. The plugin system supports domain-specific tools like database connectors, API wrappers, and custom analytics functions.
TaskWeaver supports conversation memory, allowing multi-turn interactions where context from previous exchanges informs new code generation. The experimental Recepta role (added January 2025) enhances reasoning capabilities. AgentOps integration provides observability and monitoring for production deployments.
As a research project from Microsoft, TaskWeaver is free and open-source but comes with research-project caveats: development is episodic rather than continuous, community support is limited compared to LangChain or CrewAI, documentation focuses on academic use cases, and production hardening is the user's responsibility. The framework requires Python proficiency and understanding of LLM-based code generation to use effectively.
TaskWeaver is ideal for data scientists and analytics teams who want an AI assistant that can write and execute real Python code for data processing, analysis, and visualization tasks — rather than a chatbot that merely describes what code to run.
Was this helpful?
Feature details coming soon.
Pricing information is available on the official website.
View Pricing →Ready to get started with TaskWeaver?
View Pricing Options →Weekly insights on the latest AI tools, features, and trends delivered to your inbox.
People who use this tool also find these helpful
Open-source multi-agent framework evolved from Microsoft AutoGen, providing conversational agent orchestration with enhanced modularity and community governance.
Next-generation multi-agent conversation framework with enhanced coordination and planning.
Open-source framework for building collaborative multi-agent systems using OpenAI's Assistants API with a focus on real-world agency workflows.
Open-source framework for creating multi-agent AI systems where multiple AI agents collaborate to solve complex problems through structured conversations, role-based interactions, and autonomous task execution.
Research-driven multi-agent framework for role-play and collaboration.
LLM-powered virtual software company with specialized agent roles.
No reviews yet. Be the first to share your experience!
Get started with TaskWeaver and see if it's the right fit for your needs.
Get Started →Take our 60-second quiz to get personalized tool recommendations
Find Your Perfect AI Stack →Explore 20 ready-to-deploy AI agent templates for sales, support, dev, research, and operations.
Browse Agent Templates →