ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Question]: Export the DSL file of agent

Open Mitty-ZH opened this issue 7 months ago • 3 comments

Self Checks

  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (Language Policy).
  • [x] Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • [x] Please do not modify this template :) and fill in all the required fields.

Describe your problem

Why does the exported JSON file only contain nodes and edges, but no components? Because of this, ./agent/test/client.py can’t run.

Mitty-ZH avatar Jun 11 '25 08:06 Mitty-ZH

Hi @Mitty-ZH! I'm Dosu and I’m helping the ragflow team.

The exported JSON is missing the components section because the export logic relies on the frontend's in-memory graph state to build components from nodes and edges. If the UI state is out of sync or if nodes are misconfigured (for example, missing required labels or parameters), components may not be generated during export. Only nodes labeled as 'Note' are intentionally excluded; all other nodes should become components if the graph is set up correctly. The script at ./agent/test/client.py requires a components section with at least 'Begin' and 'Answer' components to run, as seen in both the code and example DSL files (example, client.py, Canvas class).

To resolve this, check that your agent graph in the UI includes all required nodes (especially 'Begin' and 'Answer'), and that the graph is fully saved and up to date before exporting. If components are still missing, there may be a bug or state sync issue in the frontend export logic (details).

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

dosubot[bot] avatar Jun 11 '25 09:06 dosubot[bot]

Hi @Mitty-ZH! I'm Dosu and I’m helping the ragflow team.

The exported JSON is missing the components section because the export logic relies on the frontend's in-memory graph state to build components from nodes and edges. If the UI state is out of sync or if nodes are misconfigured (for example, missing required labels or parameters), components may not be generated during export. Only nodes labeled as 'Note' are intentionally excluded; all other nodes should become components if the graph is set up correctly. The script at ./agent/test/client.py requires a components section with at least 'Begin' and 'Answer' components to run, as seen in both the code and example DSL files (example, client.py, Canvas class).

To resolve this, check that your agent graph in the UI includes all required nodes (especially 'Begin' and 'Answer'), and that the graph is fully saved and up to date before exporting. If components are still missing, there may be a bug or state sync issue in the frontend export logic (details).

To reply, just mention @dosu.

How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

Thx for your reply, I checked my graph, which can run correctly and includes 'Begin' and 'Answer', however components are still missing. BTW, even with the official graph template "HR recruitment pitch assistant (Chinese)", I observe that the exported result also misses components. Therefore, it might be a bug in the frontend export logic.

Image

Mitty-ZH avatar Jun 11 '25 09:06 Mitty-ZH

The DSL exported from the front end can be only used to be imported through web end.

KevinHuSh avatar Jun 12 '25 05:06 KevinHuSh