Agent modeling

Design parametric frames with your AI agent

Your agent reasons about the structure. TrussLab resolves the geometry. Every accepted edit stays part of the native parametric model.

From a conversation to an editable frame#

Describe the structure you need, give it dimensions, and refine it through conversation. TrussLab MCP lets your AI agent inspect, create, and edit Frames in your open browser tab. You can take over in the editor at any point: parameters, attachments, materials, and reversible history remain available.

Hosted MCP is available to enrolled, signed-in TrussLab Pro users. Bring your own MCP client and model access; no Pro Cloud subscription or local connector installation is required. Connect your agent, or contact us for Pro access. Self-service signup and purchase are not yet available.

Why the modeling level matters#

MCP, the Model Context Protocol, connects your agent to TrussLab's tools. The modeling advantage comes from what those tools let the agent express.

A Frame describes nodes, members, relationships, attachments, and parameters. The agent can connect two nodes with a tube, bind its diameter to a parameter, choose a joint reconciliation strategy, and place a compatible sleeve. TrussLab's native engine resolves the dependent geometry. The agent decides the construction and its relationships; the engine handles the geometric consequences.

Reusable attachments carry their own geometry and parameter contracts. A sleeve already knows how its bore relates to its host tube. Connection ports and clearance exports describe how pieces can compose into a joint. The agent can inspect those contracts and reuse them across a structure. This reduces how much geometry it must describe and keep consistent as the design changes.

This specialization is useful for spaceframes, supports, mounts, and related assemblies. The live MCP surface supports Frame editing; headless CSG evaluation is also exposed, while live Attachment-editor sessions remain future work. The exposed operations cover a subset of the editor's capabilities.

Five ways the implementation saves agent work#

Structural commands delegate geometric work.

Operations such as addTube, addPhysicalAttachment, and reconcileJoints express a modeling decision. Reconciliation resolves member ends according to the chosen strategy. Attachment geometry follows its host and authored parameters. One domain operation can produce many dependent state changes, which the editor computes and records together. See the reconciliation reference.

Native expressions preserve design intent.

An agent can store a coordinate as a reference to span, or a tube size as a reference to diameter. Those expressions become part of the model. Later parameter edits propagate through the native dependency system, including edits made by hand. The agent does not have to recalculate and resubmit every dependent coordinate. It still needs to choose which relationships to encode; a literal value does not become parametric automatically.

Focused inspection keeps context small.

frame_inspect returns a summary by default. The agent can request parameters, selected nodes or tubes, attachment manifests, materials, or history using section filters, exact keys, and pagination. Catalogue searches can select attachments by context and host type. Detailed manifests and full snapshots are available when needed. A dimension change can begin with the relevant parameters instead of retrieving the entire document.

Batches reduce round trips and partial edits.

frame_apply accepts a group of related commands in one request. The editor evaluates them in order against a candidate model, with normal validation at each step. If the batch succeeds and is accepted, it becomes one native undo step. A rejected batch leaves the live model unchanged. This avoids a separate tool round trip for each command and lets the user undo a coherent action. A workflow spread across multiple requests still has separate acceptance boundaries.

Discoverable contracts reduce guesswork.

The server exposes focused modeling instructions, operation schemas, API signatures, and checked recipes through readinstructions, describeoperations, describeapi, and readexample. Schemas and optional TypeScript builders are derived from the compiler-checked SDK contract. The agent can look up the exact operation it needs, rather than infer argument shapes from a general description. This checks structure and types; the agent and user still assess geometric intent.

These mechanisms reduce the geometry sent by the agent, unnecessary model context, and separate edit requests. The resulting time and token savings depend on the task, model, and workflow. We do not yet publish a measured speedup against another CAD integration.

A concrete example: a parametric corner#

The MCP server includes a checked recipe named parametric-corner. Ask your agent to read it with read_example after consulting the modeling instructions. It is a small joint-layout example that makes the division of work easy to see.

  1. Start with an empty Frame and the attachment defaults required by the recipe. The companion create-frame example shows workspace creation when you have approved workspace access.
  2. Define named parameters, including a 300 mm span, 20 mm tube diameter, 1 mm wall, and 40 mm ground offset.
  3. Place three authored nodes. The two outer nodes reference span along X and Z; all three reference groundOffset along Y.
  4. Connect the corner to each outer node with a tube. Both tubes reference the shared diameter and wall parameters.
  5. Specify a symmetric-pair reconciliation strategy at the corner and reconcile the joints. TrussLab resolves the member ends; reconciliation can create additional endpoint nodes.
  6. Accept the commands as one labeled edit, then inspect the resulting parameters, members, and history.

To explore a revision, ask: Change the span from 300 to 450 mm, keeping the diameter, wall thickness, and ground offset unchanged. Inspect the result. The agent can edit the shared parameter; the stored relationships carry the change to both sides. You can then adjust the same parameter in TrussLab or undo the edit.

This is a description of the supplied recipe and a suggested follow-up, not a recorded conversation or a performance benchmark. The corner is a joint-layout sample, not a complete supported structure. After inspecting the reconciled endpoints, subsequent recipes demonstrate attachment placement and joint composition.

What happens between the prompt and the editor#

The hosted path has four stages:

  1. Your agent plans the edit. It reads the selected model and relevant tool contracts. It sends structured JSON operations, with a request ID and the model version it inspected. Optional TypeScript helpers can build those operations on the agent side; source code is not sent to the browser for execution.
  2. The hosted MCP relay routes the request. OAuth identifies the authorized client. Your approval in TrussLab selects the editor tab, Frame or workspace scope, and connection duration. Requests travel to that browser over its open connection.
  3. The native editor evaluates the operations. JSON schemas validate the request shape. SDK builders map the data into the same PureScript modeling operations used by the editor. The functional core handles model validation, reactive propagation, and reversible transactions; rendering and persistence consume the accepted changes.
  4. The result returns to your agent. It can inspect the updated model and continue from the returned version. If the model changed since the agent's observation, the stale edit is rejected so the agent can inspect and reconsider it.

This shared editing path is why conversational work remains a native TrussLab document. Manual edits and agent edits participate in the same model and branching history.

Model storage and execution remain in the browser. Selected requests and results pass through the TrussLab relay and your agent provider. The relay processes model payloads in memory; it does not store them as cloud documents, and the connection is not end-to-end encrypted. Connecting an agent does not enable backup or sync.

Connect, inspect, then design#

Follow the MCP setup guide to configure your client, authorize it, and approve access to your chosen tab. Keep that tab open. Start by asking the agent to inspect the current Frame without changing it, then agree on a small, coherent edit.

The AI assistant guide provides general modeling context. A connected agent gets its current schemas and recipes directly from the MCP server. Inspect the model after an edit, use the normal editor exports, and assess geometry and manufacturing requirements before building. Native model validation checks editor consistency; it does not establish structural strength.