Everything K-culture — comebacks to K-beauty, straight to your inboxGet it in your inbox

METAL MEDIA

wanmol/goal-flow

71PythonMIT

A framework that turns Dify's drag-and-drop chatbot flows into code you can actually run yourself

goalflow is an open-source framework built on top of LangGraph that transpiles workflows designed in Dify's visual editor into runnable Python code, so you're not locked into Dify's runtime. It also supports hand-coded agent loops, and the two approaches can be combined. In load testing, it handled 100 concurrent conversations across two replicas with 2 vCPU and 4 GB RAM each, with no measurable slowdown in time-to-first-token.

What it does

  1. Converts a Dify DSL export (a YAML workflow file from Dify's drag-and-drop editor) into a runnable, version-controllable LangGraph Python file with a single command, removing dependency on Dify's own runtime
  2. Ships 20+ built-in nodes (LLM calls, code execution, HTTP requests, if/else branching, loops, tool calls, and more) and lets a graph node host an agent loop while an agent can call sub-workflows as tools
  3. Uses a pluggable DataAdapter so the wire protocol can be swapped, with Dify's protocol and an OpenAI-compatible protocol included out of the box and custom ones supported
  4. Streams tokens only from nodes that provably lead to an answer, so output from branches that were never taken doesn't leak to the client, and supports human-in-the-loop interrupts to pause execution for review
  5. In load testing, a two-replica deployment at 2 vCPU / 4 GB RAM per replica sustained 100 concurrent conversations with no measurable regression in time-to-first-token

Why it matters

Teams that prototype quickly in a no-code tool like Dify but need to own and deploy the real production system get a practical way out of vendor lock-in. Built-in pieces for conversation storage, knowledge retrieval, and tracing (via Langfuse) mean less has to be built from scratch when moving from prototype to production.

Terms in this repo

  • LangGraph · A Python library for building and running LLM application logic as a graph of steps
  • Dify DSL · The YAML file format Dify's visual editor exports a workflow design into
  • transpile · Convert code or a configuration from one format into another runnable form
  • DataAdapter · An abstraction layer that lets the server swap which communication protocol it uses to respond to clients
  • HITL (human-in-the-loop) · A mechanism that lets a person step in to review or pause an otherwise automated process

Repository description (English)

a production-grade framework on LangGraph. Combine workflow graphs and agent loops, transpile Dify DSL to runnable code, swap wire protocols (Dify/OpenAI).

Open on GitHub

Trending repos

All repos →

Latest from METAL MEDIA