AI in xdfem2D¶
xdfem2D has two ways of working with a model by talking to it. Both are in the AI panel at the left of the window (View ▸ AI panel, or F10), as two tabs:
- the Assistant, which answers questions about the open model and makes the changes you ask for, one request at a time;
- the Agent, which takes a request that needs several steps and does the steps itself, on the open model, while you watch.
Both are optional. Every other part of xdfem2D works without them, and nothing is turned on until you send a message.
Which one to use¶
| Assistant | Agent | |
|---|---|---|
| What it is for | A question or one change: which combination governs the reinforcement of E3?, add a 20 kN load at midspan, show the deformed shape. | A job of several steps: a three-storey frame, designed to EC2, with a report. |
| Who decides the steps | You: one request, one answer. | The agent: it plans, tries, reads the result and goes on. |
| The model it uses | Usually a small model that runs on your computer (through Ollama; gemma4:e4b to begin with), or a remote one with your own key. |
A capable model, usually in the cloud: Claude Code, Ollama's cloud models, or OpenCode (which can also use a model on your computer). |
| What it can do | Answer about the model and its results; build and change the model; do what the menus and the Display panel do; run the verifications of the Design menu; free conversation. | Everything the Assistant does, and chain it: edit, analyse, design, read the results to decide the next step, make variants and construction sequences, seismic and second-order analyses, write reports and drawings, copy and mirror geometry. |
| How you drive it | A sentence, or a sentence with a prefix (?, +, =, >, :) that says what kind of request it is. |
A request in your own words. There are no prefixes. |
| Speed | Seconds. | Tens of seconds to minutes. |
| What leaves your computer | Nothing with a local model. A remote model receives your question and a summary of the model. | Your model, always: it is a remote model. |
| Cost | Free with a local model; a remote one uses your key. | Claude Code uses your Claude plan; Ollama's cloud models use your Ollama usage. |
Rule of thumb. Start with the Assistant: it is quick, it keeps your model on your computer, and for a question or a short edit it is enough. Turn to the Agent when the job has several steps that depend on each other, or when a small model keeps failing at it.
What they share¶
- The same box and the same buttons. Write and press Cmd+Enter (Ctrl+Enter elsewhere); Enter is a new line. Send becomes Stop while an answer comes, New conversation starts afresh, and ⓘ opens the page of the tab, in the application.
- Your model stays yours. What they do to it is one step of Undo (Ctrl+Z), and an edit to an analysed model drops its results, whoever makes it: run the analysis again.
- Checked before it happens. The Assistant tries every change on a copy of the model first; the Agent's tools refuse what does not make sense and say why. Neither can run a program on your computer or write a file outside the folder of the open model.
- They say where your model goes. Before a message goes to a remote model you are asked once, with Don't show this again (Preferences ▸ AI Assistant ▸ Show the assistant's warnings again brings it back).
Other agents, outside the window¶
The same tools are an MCP server (xdfem2D --mcp), so an agent you already use, such as Claude Code or Claude Desktop, can build and analyse a model of its own with xdfem2D as one more tool, with no window open. See The MCP server.
Where to go next¶
- The AI Assistant: the kinds of request and how to say which, the model and its settings (temperature, Think), how good each model is.
- The Agent tab: the agents, what each needs, what the agent can do in the window, and what to know.
- The MCP server: registering it with another agent, the tools, the command language.