AI Assistant¶
In this tutorial you will use DWSIM's integrated AI Assistant to build, modify, and analyze flowsheets through natural-language commands in the Classic UI. The assistant uses large language models to interpret your intent and translate it into DWSIM operations.
What you will learn
- How to access the AI Assistant from the Classic UI
- How to configure your LLM provider (Anthropic, OpenAI, etc.)
- How to build a flowsheet by typing natural-language prompts
- How the AI Assistant complements the FluentAPI and MCP Server
Prerequisites
- Completed at least the Beginner Track
- An API key for a supported LLM provider
Overview¶
The AI Assistant is exposed in the Classic UI as a chat panel. You type a request, the assistant responds with explanations, code, or by modifying the flowsheet directly. Behind the scenes the assistant calls the same MCP Server tools you would use programmatically.
When to Use the AI Assistant¶
| Task | Best Tool |
|---|---|
| Quick exploration of a process idea | AI Assistant |
| Production-quality automation | FluentAPI (Python) |
| Custom integrations and tooling | MCP Server (JSON-RPC) |
| Learning DWSIM concepts | AI Assistant |
| Repeatable, version-controlled simulations | FluentAPI |
Step-by-Step in the Classic UI¶
1. Open the AI Assistant¶
In the FormMain menu (right-aligned, with the Pro items): AI Assistant.
A side panel opens with a chat interface alongside the flowsheet canvas.

2. Configure your LLM provider¶
Open Edit > General Settings > AI Assistant (or click the gear icon in the chat panel). Configure:
- Provider: Anthropic, OpenAI, Azure OpenAI, local
- Model: e.g., claude-opus-4-7, gpt-4-turbo
- API key: paste your key
- Temperature: lower = more deterministic; 0.2 is a good default for technical tasks

3. Build a flowsheet via prompts¶
Try these prompts in the chat input:
Create a new simulation with water and ethanol using NRTL. Add a feed at 350 K, 1 atm, with 50% mole each, flowing at 100 mol/s.
The assistant calls the MCP tools, runs the wizard automatically, adds the feed stream, and the flowsheet canvas updates in real time.
Add a 20-stage distillation column to separate the feed. Use reflux ratio of 2 and bottoms flow of 75 mol/s.
The assistant inserts the column with the specified parameters.
Solve the flowsheet and tell me the distillate ethanol purity.
The assistant runs the solver and reports the result back in the chat.
The column is not converging. What could be wrong?
The assistant inspects the flowsheet, identifies likely issues (poor initial estimates, wrong specs, etc.), and suggests fixes.

4. Review what the assistant did¶
When the assistant modifies your flowsheet:
- The PFD updates in real time
- Click Show changes in the chat to see the equivalent FluentAPI / MCP code
- Use Ctrl+Z to undo any unwanted change
- Ask the assistant to explain its reasoning
Tips for Effective Prompting¶
- Be specific: "use NRTL with the default DWSIM database" beats "use a good thermodynamic model"
- Reference units explicitly: "100 mol/s" rather than "100"
- One task at a time: build the flowsheet step by step, validating each step
- Use the assistant for what it is good at: explanation, exploration, debugging. For production simulations, fall back to FluentAPI.
Limitations¶
- The assistant can hallucinate compound names; verify with the compound database
- Complex specifications (e.g., column tray hydraulic design) may exceed the assistant's tool repertoire
- For repeatability and version control, save the resulting flowsheet and re-run via FluentAPI
Automating This Tutorial¶
The AI Assistant is itself the automation layer for this tutorial - the underlying API calls are MCP Server tools (dwsim.flowsheet.create, dwsim.thermo.add_compounds, dwsim.unitop.add, etc.). To use it without the chat UI, point any MCP-compatible client (Claude Code, Claude Desktop, etc.) at the running DWSIM MCP Server process. See DWSIM.MCPServer/docs/getting-started/clients.md for client configuration.
Exercises
- Ask the assistant to build the Refrigeration Cycle using only natural-language prompts. How many follow-up questions does it ask?
- Compare the assistant's generated MCP calls with the equivalent Python script you would write directly with the FluentAPI.
- Ask the assistant to "explain what each unit operation in this cycle does and why" - useful for teaching.
Next Steps¶
In Phase Envelope, you will explore DWSIM's phase envelope generation features in depth.