Skip to content
AggregaAggrega
Select language: English

Import a Flowise chatflow — a conversation chain with a chat model

A Flowise chatflow — a ChatOpenAI node, a Buffer Memory and a Conversation Chain — imported by aggrega import into an Aggregate, a Release and a Manifest that build for Docker Compose as written.

Import a Flowise chatflow walks it step by step: the command, the files it writes, the build and a run of what it builds. This folder holds each stage of that walkthrough:

folderwhat it holds
source/the chatflow, support-chat.json; the .aggrega-config.yaml that makes the folder a workspace; and import-answers.yaml, the answers to what no chatflow can hold: the owner account’s email, and the names of the Kubernetes Secrets an import for Kubernetes asks for
draft/the files aggrega import support-chat.json --target compose wrote, unchanged, and what it printed: stdout.txt on standard output, import.txt on standard error

source/support-chat.json is written for this example, in the shape Flowise’s editor exports a chatflow.

In a checkout of the documentation repository, check.sh runs the import again, compares what it writes and prints with draft/, compares the blocks the walkthrough quotes with these files, and validates and builds what the import wrote. It needs the standard-library catalog (where to get one) checked out beside this repository, or its directory named in AGGREGA_CATALOG_DIRS.

Scaffold the example

You can run this example’s import with the commands below, or have your AI assistant run it for you.

Write the example into a new folder named after it:

Terminal window
aggrega scaffold --example import-flowise

It then prints the commands to run next. The first changes into the new folder:

Terminal window
cd import-flowise

Build

The import drafts the Aggrega files beside the project, in source/, takes the owner account’s email from import-answers.yaml, and pulls what the build needs. It weighs the project against the standard-library catalog, which the workspace’s default registry publishes as a signed snapshot: the first import fetches it, verifies it, keeps it in the workspace’s content cache and names it by its digest in the record it writes beside the drafts. A workspace that names its own catalog folders — in AGGREGA_CATALOG_DIRS, or under workspace.catalog_dirs — imports against those instead:

Terminal window
cd source
aggrega import support-chat.json --target compose
aggrega validate --release release.yaml
aggrega build --release release.yaml

Running what the build writes is in the walkthrough linked above.

With an AI assistant

An AI assistant set up with Aggrega’s tools can do the same: paste this prompt into it.

Use the Aggrega tools only, and create no folder yourself. If the Workspace folder holds no `import-flowise` folder yet, call the `scaffold` tool once with `example` set to `import-flowise` and no `dir`: it writes the example into a new `import-flowise` folder, whose `source` folder holds what this example imports. Then call the `import` tool with `workspace_root` set to `import-flowise/source`, `source` set to `support-chat.json` and `target` set to `compose`: it reads the answers it needs from `import-answers.yaml` beside `support-chat.json`, writes its drafts into `import-flowise/source` and pulls what they need. Then call the `validate` tool with `workspace_root` set to `import-flowise/source` and `release` set to `release.yaml`, and the `build` tool with `workspace_root` set to `import-flowise/source`, `release` set to `release.yaml` and `write` set to true. Tell me which files the build wrote; they are under `import-flowise/source/dist/`.

Test it

With Flowise running and the chatflow seeded as the walkthrough runs them, open http://127.0.0.1:3000 and sign in as the owner, and ask the chatflow a question through its prediction endpoint:

Terminal window
curl -sS -X POST http://127.0.0.1:3000/api/v1/prediction/40d9f5c5-5187-54c1-a9f5-a8dac92f88bb \
-H 'Content-Type: application/json' -d '{"question": "In one short sentence: what is Docker Compose?"}'
{"statusCode":500,"success":false,"message":"401 Unauthorized – check your API key and ensure it has access to the requested model.","stack":{}}

The run’s OpenAI key was a placeholder, so the answer is OpenAI’s refusal of it: the chatflow ran as far as its call to the model. The run published Flowise on 3002, since 3000 was taken on its machine, as the walkthrough says.

Imported with --target helm and applied to Kubernetes, the chatflow answers the same request at the same address once a local port is forwarded to Flowise’s Service; the run got the same refusal there:

Terminal window
kubectl port-forward -n <namespace> svc/flowise-default 3000:3000