Getting Started with TaskWeaver: Docker Setup and First Data Session
Get TaskWeaver running in minutes with Docker. Step-by-step guide to setup, first data analytics session, and tips for production use.
Running TaskWeaver with Docker (Quick Start)
TaskWeaver provides an official all-in-one Docker image that bundles the framework, web UI, and all Python dependencies. Getting started takes just two commands:
docker pull taskweavercontainers/taskweaver-all-in-one:latest
docker run -it \
-e LLM_API_BASE="https://api.openai.com/v1" \
-e LLM_API_KEY=*** \
-e LLM_API_TYPE="openai" \
-e LLM_MODEL="gpt-4" \
taskweavercontainers/taskweaver-all-in-one:latest
For the Web UI mode (recommended for interactive use), add port mapping:
docker run -it \
-e LLM_API_BASE="https://api.openai.com/v1" \
-e LLM_API_KEY=*** \
-e LLM_API_TYPE="openai" \
-e LLM_MODEL="gpt-4" \
-p 8000:8000 \
--entrypoint /app/entrypoint_chainlit.sh \
taskweavercontainers/taskweaver-all-in-one:latest
Then open http://localhost:8000 in your browser.
Your First Analytics Session
Once TaskWeaver is running, try these example tasks:
1. Load and Explore Data
Ask: "Load the CSV file at /data/sales.csv and show me the first 10 rows with column statistics." TaskWeaver will generate Python code to read the file using pandas, compute summary statistics, and display results — all in one conversation turn.
2. Multi-Step Analysis
Ask: "Group the data by region, calculate average revenue per region, create a bar chart, and save it as chart.png." Because TaskWeaver preserves state, the DataFrame from step 1 remains available. It will generate code for grouping, aggregation, and matplotlib visualization.
3. Iterative Refinement
After seeing the results: "Filter out regions with less than 1000 transactions and recalculate." TaskWeaver modifies the existing DataFrame and re-runs the analysis.
Docker Compose for Production
services:
taskweaver:
image: taskweavercontainers/taskweaver-all-in-one:latest
restart: unless-stopped
Tips for Best Results
- Use capable models like GPT-4 or Claude 3 for complex analytics tasks
- Mount a data volume to make local CSV files available inside the container
- Start with simple requests and iterate — TaskWeaver shines in multi-turn conversations
- Enable the WebSearch role if the agent needs to fetch external data