# AI use cases for Goal Flow (wanmol/goal-flow)

Repo: [wanmol/goal-flow](https://github.com/wanmol/goal-flow) | Use cases: 4 | Page: https://dedupedai.com/use-cases/wanmol-goal-flow/

GoalFlow is a Python framework on LangGraph that transpiles Dify workflow exports into runnable code and runs code-first agent loops behind a FastAPI server.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Turn a Dify flow into a version-controlled LangGraph file: https://dedupedai.com/use-cases/wanmol-goal-flow/transpile-dify-flow-to-langgraph-python/
- Serve a workflow as a chat API with Redis and MySQL: https://dedupedai.com/use-cases/wanmol-goal-flow/serve-workflow-as-chat-api/
- Build a code-first agent loop with agent_kit: https://dedupedai.com/use-cases/wanmol-goal-flow/build-code-first-agent-loop/
- Load documents into Milvus for retrieval in a workflow: https://dedupedai.com/use-cases/wanmol-goal-flow/ingest-documents-into-milvus-knowledge-base/

## How to turn a Dify flow into a version-controlled LangGraph file with Goal Flow

Repo: [wanmol/goal-flow](https://github.com/wanmol/goal-flow) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Convert a Dify DSL export into a runnable LangGraph Python workflow you own.

**Who it is for:** A 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 problem:** Visual flows are hard to review, test, and version in source control, and running them requires the Dify runtime.

**The outcome:** A generated Python file with a class that extends BaseWorkflow, which can be committed, reviewed, and registered with the GoalFlow server.

### Steps

1. Run `git clone` on the goalflow repository and `cd goalflow`.
2. Run `cp .env.example .env` and fill in the values you need.
3. Run `pip install -e .` to put the goalflow package on your path.
4. 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)
5. Open the generated file and check that it defines a class extending BaseWorkflow before committing it.

### Prompt to paste into your agent

```text
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.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/wanmol-goal-flow/transpile-dify-flow-to-langgraph-python/

## How to serve a workflow as a chat API with Redis and MySQL with Goal Flow

Repo: [wanmol/goal-flow](https://github.com/wanmol/goal-flow) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Run the GoalFlow FastAPI server with persistence so clients can call your workflow.

**Who it is for:** A backend engineer who needs a streaming chat endpoint for a registered workflow and has Redis and MySQL available.

**The problem:** A workflow file alone does not give clients an HTTP endpoint, streaming output, or stored conversation history.

**The outcome:** A local server on port 8000 that accepts POST requests to /v1/chat-messages with a Bearer token and streams SSE responses.

### Steps

1. Run `git clone` on the goalflow repository and `cd goalflow`.
2. Run `cp .env.example .env` and set real Redis and MySQL values in .env.
3. Run `pip install -e .`.
4. Run `goalflow-server` and confirm it serves on http://localhost:8000.
5. Send a test POST to /v1/chat-messages with a Bearer token that auth_validator maps to your registered workflow.

### Prompt to paste into your agent

```text
Start the goalflow server in the goalflow repo and send one POST request to /v1/chat-messages for the workflow <workflow-name> using the Bearer token <token>. Expected output is a streamed SSE response. Verify that the conversation is stored in Redis and MySQL.
```

### Caveat

Before you publish any fork publicly, the README warns that real credentials remain in git history and internal service URLs are hard-coded, so read docs/security-and-open-sourcing.md first.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/wanmol-goal-flow/serve-workflow-as-chat-api/

## How to build a code-first agent loop with agent_kit with Goal Flow

Repo: [wanmol/goal-flow](https://github.com/wanmol/goal-flow) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Use the vendored agent_kit SDK to create a ReAct or custom agent and run it inside a graph node.

**Who it is for:** A Python developer who needs an agent that calls tools, routes between models, and uses skills, without a visual editor.

**The problem:** Plain workflow graphs cannot express open-ended tool-using loops, and building one from scratch takes time.

**The outcome:** A working agent defined in code, with middleware and skills, that can be hosted by a graph node in the GoalFlow engine.

### Steps

1. Run `git clone` on the goalflow repository and `cd goalflow`.
2. Run `pip install -e .`.
3. Read docs/agent-kit.md and choose the ReAct, Deep, or custom loop you need.
4. Import the Agent class from the agent_kit package under src/agent_kit/ and define your agent with the middleware and skills you want. (inferred, check the README)
5. Attach the agent to a graph node that uses agent_base.py in src/goalflow/node/.

### Prompt to paste into your agent

```text
In the goalflow repo, create a ReAct agent with agent_kit under src/agent_kit/ that answers questions about <topic> using the skills in skills/. Save the code to <output-path>.py. Verify that the agent imports cleanly and report which middleware and model routing options you configured.
```

### Caveat

The README names agent_kit and its loop types but gives no code sample, so check docs/agent-kit.md for the real class and method names before writing code.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/wanmol-goal-flow/build-code-first-agent-loop/

## How to load documents into Milvus for retrieval in a workflow with Goal Flow

Repo: [wanmol/goal-flow](https://github.com/wanmol/goal-flow) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Extract, chunk, and embed your documents into Milvus, then point a workflow at the retriever.

**Who it is for:** A researcher or support engineer who has a set of internal documents and wants a workflow to answer questions from them.

**The problem:** An LLM workflow cannot answer from private documents until they are indexed in a vector store.

**The outcome:** A Milvus collection holding embedded chunks of your documents, which a workflow can query through the pluggable retriever.

### Steps

1. Run `git clone` on the goalflow repository and `cd goalflow`.
2. Run `pip install -e .` and set Milvus connection values in .env from .env.example.
3. Read docs/knowledge-retrieval.md to confirm the ingestion CLI name and options.
4. Run the document ingestion CLI on your document folder to extract, chunk, embed, and write to Milvus. (inferred, check the README)
5. Set the retriever to Milvus in your workflow configuration and run one test question.

### Prompt to paste into your agent

```text
In the goalflow repo, follow docs/knowledge-retrieval.md to ingest the documents in <document-folder> into Milvus. Expected output is a Milvus collection with embedded chunks. Verify the ingestion count matches the number of input documents and run one retrieval query for <question>.
```

### Caveat

The README does not state the ingestion command or the Milvus settings, so the exact invocation must come from docs/knowledge-retrieval.md.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/wanmol-goal-flow/ingest-documents-into-milvus-knowledge-base/
