Who it is forA developer whose product team designed an LLM flow in Dify's visual editor and now needs it in git without depending on Dify's runtime.
The problemVisual flows are hard to review, test, and version in source control, and running them requires the Dify runtime.
The outcomeA generated Python file with a class that extends BaseWorkflow, which can be committed, reviewed, and registered with the GoalFlow server.
What you need first
- Python 3.12
- Redis (cluster or standalone) and MySQL
- A cloned copy of the goalflow repository and a filled-in .env file copied from .env.example
- A Dify DSL export (.yml) if you want to transpile a visual flow
Steps
- Run
git cloneon the goalflow repository andcd goalflow. - Run
cp .env.example .envand fill in the values you need. - Run
pip install -e .to put the goalflow package on your path. - Run the Dify transformer at src/goalflow/tool/dify_transformer/wf_code_generator.py against your exported Dify DSL .yml file to emit a workflow .py file. (inferred, check the README)
- Open the generated file and check that it defines a class extending BaseWorkflow before committing it.
Prompt for your agent
In the goalflow repo, transpile the Dify DSL export at <path-to-dsl.yml> using the Dify transformer in src/goalflow/tool/dify_transformer/. Write the generated Python workflow class to <output-path>.py. Verify that the file defines a class that extends BaseWorkflow and report any Dify node types the transformer could not map.
Caveat. The README does not give the exact transpiler command, so verify the entry point in docs/dify-transformer.md before running it.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for wanmol/goal-flow and "Turn a Dify flow into a version-controlled LangGraph file"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer