Use in a Workflow (Model Review)
This page explains how to automate model review with an AI agent and export the results to Excel by combining Next Design model information with review points defined in an external file.
This page assumes that you already understand the basic operations of workflows, variables, loops, and tool execution.
If you are creating a workflow for the first time, start with Use in a Workflow (Basics).
Goal
Learn how to build a workflow that reviews Next Design models from multiple viewpoints and can:
- Combine several information sources, such as models and review points
- Use model information and external file data as input to an AI agent
- Format AI output and export it externally
Flow
This page covers the following steps:
- Prepare the tools and AI agent needed for model review
- Create a workflow that reviews multiple models against multiple review points
- Run the workflow and check the review results
Prerequisites
| Tool | Version |
|---|---|
| Agentiqs | 1.1 or later |
| Next Design | 4.0.14.50616 or later |
This tutorial uses the following sample data files from Sample Data:
C:\agentiqsSampleData\tutorial\next-design-integration\workflow-model-review\input
- 組込みソフト開発.nproj: the sample Next Design project to review
- reviewPointList.json: the review points
If you want to perform the same steps as this tutorial, prepare the sample-data environment in advance.
1. Prepare the tools and AI agent
Create the tools
-
From [Tools] - [Create New], add the following tools used in the workflow.
infoIf you have already created these tools, you can skip this step.
Tool Purpose File Access Loads the review-point file Next Design Retrieves model information from Next Design Next Design Functions Operates Next Design in the workflow Microsoft Excel Exports review findings to Excel -
Set the File Access base directory to the folder that contains the review-point file.
If you are using the sample data, set it toC:\agentiqsSampleData\tutorial.
Prepare the AI agent
-
From [Agents] - [Create New], select "Next Design Model Editing" from the agent gallery.
-
Configure the basic information for the review agent.

Configuration items
Setting item Required Value Details Title Next Design Model Review Agent Use a clear name that is easy to identify later. Description A dedicated review agent for Next Design design models. It evaluates a single review point for missing details, contradictions, inconsistencies, and ambiguities, and returns the result as a JSON array only. System prompt 〇 Enter the content shown below under "System prompt settings". Set the information needed for review. -
System prompt content (click the small box in the upper-right corner of the text field to copy it)
When changing the system promptIf you change the key names in the output items, you also need to change the later Excel export process.
If you modify the prompt, update the subsequent workflow as well.
You are a dedicated design-document review agent. For the submitted "Next Design design model contents" and a "single review point", perform a review and output the result as JSON array only.[Input]- review_point: review point- target_model: model information to be reviewed[Review policy]- Judge only against review_point; do not point out issues from any other perspective.- Base your judgment only on the facts described in target_model; do not infer.- Judge issues based on what is written in target_model.- If you cannot find the relevant location, still output a result based on that fact.- Do not make duplicate findings about the same content.[Output rules]- Output JSON array only.- Each element must include all of the following keys:- "location"- "description"- "viewPoint"- "priority"- "status"- Keep key names fixed, and make all values strings.- Do not output anything other than JSON.[Fields]- "location": Information to identify the issue location, using the path information and field name of the target model. Use the path from the input target_model. Do not include IDs or other values that humans cannot understand.- Example:If target_model = "Target speed calculation" and there is an issue in the "Identifier" field of the child model "Target speed setting/Tap-up", the output should be:"Model: Target speed calculation/Target speed setting/Tap-upField: Identifier"- "description": Describe the issue. Make clear what is missing, inconsistent, or ambiguous. Use polite language and insert line breaks for readability. If there is no issue, use "<No findings> Confirmed, no problems.".- "viewPoint": Set the Title from the input review_point.- "priority": Use only "High" / "Medium" / "Low".- "status": Use "Open" for findings and "Closed" for no findings.[Judgment rules]- If there is missing detail, contradiction, inconsistency, ambiguity, or deficiency according to review_point, treat it as a finding.- If no issue is found according to review_point, output "<No findings>".- If information needed for judgment is missing, treat it as a finding and describe the missing information specifically in description.[Output count]- If there are multiple independent issues for a review_point, output them separately.- Even if there are no issues, output one item with "<No findings>".[Prohibitions]- Evaluate from any perspective other than review_point- Unsupported speculation- Vague findings- Duplicate findings with the same meaning- Missing keys, inconsistent notation, or non-JSON output -
2. Create the workflow
Build the workflow so that the software units under the selected component in Next Design are reviewed by the AI agent for each review point, and the review results are formatted and exported to Excel.
- Set input parameters
- Load the review-point file
- Get the target software units
- Prepare Excel output
- Retrieve model information under each software unit
- Ask the AI agent to review each review point
- Format the review results and export them to Excel
For real-world use, change the target items, review points, and output format according to the meta-model structure and review method of the target project.
1. Set input parameters
Open [Workflow Settings] - [Input/Output Parameters] - [Input Parameters], and add the path to the review-point file as an input parameter.


Parameter settings
| Setting item | Value | Description |
|---|---|---|
| Variable name | reviewPointsFilePath | Use a clear name that is easy to identify later. |
| Description | Stores the path to the review-point file. | Make the purpose of the variable clear. |
| Default value | The path marked with * | If you fill it in ahead of time, you do not need to enter it every time you run the workflow. |
*C:\agentiqsSampleData\tutorial\next-design-integration\workflow-model-review\input\reviewPointList.json
2. Load the review-point file
Drag and drop "Tool execution" and configure the properties.

Property settings
This step loads the specified review-point file.
| Property | Required | Setting | Details |
|---|---|---|---|
| Title | Load review-point file | Use a clear name that is easy to identify later. | |
| Description | Loads the specified review-point file. | What this step does. | |
| Tool name | 〇 | File Access | The tool used to load the review-point file. |
| Function name | 〇 | ReadFile | Reads a text file. |
| path | 〇 | {{reviewPointsFilePath}} | Path to the review-point file specified by the input parameter. |
| Result destination | 〇 | reviewPoints | Stores the contents of the loaded review-point file. |
3. Get the software units to be reviewed
-
Get the selected component model ID.
Drag and drop "Tool execution" and configure the properties.
Property settings
Get the ID of the component model currently selected in the Navigator for review.
Property Required Setting Details Title Get Target Component Model ID Use a clear name that can be identified later. Description Get the ID of the component model currently selected
in the Navigator for review.Describes what the step does. Tool name 〇 Next Design FunctionsRetrieves model information from Next Design. Function name 〇 GetNavigatorSelectedModelIdGets the ID of the selected model. Result destination 〇 componentModelIdStores the component model ID. -
Get the software units under the component.
Drag and drop "Tool execution" and configure the properties.
Property settings
Starting from the selected component model ID, get the software units to review.
Property Required Setting Details Title Get Software Unit List Use a clear name that can be identified later. Description Get the software units under the
selected component model.Describes what the step does. Tool name 〇 Next Design FunctionsRetrieves model information from Next Design. Function name 〇 GetChildrenGets child elements. parentId 〇 {{componentModelId}}Specify the selected component model ID. fieldName 〇 SoftwareUnitGets elements under SoftwareUnit. Result destination 〇 unitModelsStores the retrieved unit list.
4. Prepare Excel output
-
Initialize the output variables.
Drag and drop "Set variable" and configure the properties.
Property settings
Initialize the Excel output row and review-result sequence number.
Property Required Setting Details Title Initialize Excel Output Variables Use a clear name that can be identified later. Description Initialize the Excel output row and
review-result sequence number.Describes what the step does. Setting method 〇 OverwriteOverwrites the current value. Variable name 〇 excelRowCursorCurrent row to output to Excel. Value 〇 2Starts output on the row after the header. Variable name 〇 issueCountReview-result sequence number. Value 〇 0Initial value of the sequence number. -
Add an Excel sheet.
Drag and drop "Tool execution" and configure the properties.
Property settings
Add the sheet to which review findings will be output.
Property Required Setting Details Title Add Review Findings Sheet Use a clear name that can be identified later. Description Add the "レビュー指摘" sheet.
If the sheet already exists, do nothing.Describes what the step does. Tool name 〇 Microsoft ExcelOperates Excel. Function name 〇 AddSheetAdds a sheet. sheetName 〇 レビュー指摘 Name of the sheet to add. Result destination resultStores the execution result. Success destination 〇 isSuccessStores whether execution succeeded. -
Output the header row.
Drag and drop "Tool execution" and configure the properties.
Property settings
Output the list header to the first row of the review-findings sheet.
Property Required Setting Details Title Output Excel Header Row Use a clear name that can be identified later. Description Output the list header to the first row of the review-findings sheet. Describes what the step does. Tool name 〇 Microsoft ExcelWrites to Excel. Function name 〇 SetCellValuesWrites values to specified cells. rangeAddress 〇 レビュー指摘!A1:F1Destination of the header row. values 〇 [["ID","