A template for building, testing, and deploying Langflow-based AI agents on OpenShift. Provides identical stacks for local development and cluster deployment, with CLI tooling to move flows between environments.
LOCAL (podman-compose) CLUSTER (Helm + OpenShift)
┌──────────────────────────┐ ┌──────────────────────────┐
│ Langflow UI :7860 │ │ Langflow (Deployment) │
│ │ │ │ │ │
│ ▼ │ flows/ │ ▼ │
│ Ollama :11434 │ ◄──────────► │ vLLM + KServe │
│ (local LLM) │ (Git) │ (GPU model serving) │
│ │ │ │ │ │
│ ▼ │ │ ▼ │
│ PostgreSQL :5432 │ │ PostgreSQL (Red Hat) │
│ │ │ │ │ │
│ ▼ │ │ ▼ │
│ Langfuse :3000 │ │ Langfuse (Deployment) │
│ (tracing) │ │ (tracing) │
└──────────────────────────┘ └──────────────────────────┘
The flows/ directory is the Git-trackable hub. Flows are exported as portable JSON files that can be synced between local and cluster environments.
langflow-agent-template/
├── scripts/
│ └── agentctl # CLI tool — all operations go through this
│
├── local/
│ ├── podman-compose.yml # Langflow + PostgreSQL + Ollama + Langfuse
│ ├── init-db.sh # Creates langfuse database on first boot
│ └── .env.example # Environment variables
│
├── helm/langflow-agent/
│ ├── Chart.yaml # Helm chart metadata
│ ├── values.yaml # All configurable values
│ └── templates/
│ ├── langflow.yaml # Langflow Deployment + Service + Route
│ ├── postgresql.yaml # PostgreSQL Deployment + Secret + PVC
│ ├── langfuse.yaml # Langfuse Deployment + Service + Route
│ ├── langfuse-secret.yaml # Shared credentials (Langfuse <-> Langflow)
│ └── charts/model-serving/ # vLLM + KServe subchart (disabled by default)
│
└── flows/ # Portable flow JSON files
├── demo-flow-v1.json
└── ...
- Local: Podman + podman-compose (auto-installed by
agentctlon macOS/Linux if missing) - Cluster:
ocCLI +helmCLI + access to an OpenShift cluster with RHOAI installed
Add agentctl to your PATH:
export PATH="$PATH:$(pwd)/scripts"The Podman machine must be running before using agentctl local-up. If it's not already started:
podman machine startTo check its status:
podman machine listTo get the oc login command for your cluster:
- Open the OpenShift web console in your browser
- Click your username in the top-right corner
- Click Copy login command
- Click Display Token
- Copy the
oc logincommand and run it in your terminal:
oc login --token=sha256~XXXX --server=https://api.your-cluster.example.com:6443Build and test your agent locally, then push to the cluster.
# 1. Start local environment (Langflow + PostgreSQL + Ollama + Langfuse)
agentctl local-up
# 2. Build your agent flow in the Langflow UI
open http://localhost:7860
# 3. Run the flow and verify traces in Langfuse
open http://localhost:3000 # Login: admin@langflow.local / admin123
# 4. Save flows from local Langflow to the flows/ directory
agentctl flows save
# 5. Commit flows to Git
git add flows/ && git commit -m "Add agent flow"
# 6. Deploy the full stack to OpenShift
oc login https://your-cluster:6443
agentctl deploy
# 7. Push flows to the cluster Langflow instance
agentctl flows push
# 8. Open the flow in cluster Langflow and verify it works
# (URL printed by agentctl deploy)
# Cleanup
agentctl destroy # Remove cluster resources
agentctl local-down # Stop local environmentBuild your agent on the cluster, then pull to local for iteration.
# 1. Deploy the full stack to OpenShift
oc login https://your-cluster:6443
agentctl deploy
# 2. Build your agent flow in the cluster Langflow UI
# (URL printed by agentctl deploy)
# 3. Run the flow and verify traces in cluster Langfuse
# 4. Pull flows from cluster Langflow to the flows/ directory
agentctl flows pull
# 5. Commit flows to Git
git add flows/ && git commit -m "Add agent flow"
# 6. Start local environment for iteration
agentctl local-up
# 7. Load flows into local Langflow
agentctl flows load
# 8. Open the flow in local Langflow
open http://localhost:7860
# Cleanup
agentctl destroy # Remove cluster resources
agentctl local-down # Stop local environmentAll operations go through agentctl:
| Command | Description |
|---|---|
agentctl local-up |
Start local dev environment |
agentctl local-down [--force] |
Stop local environment (--force cleans stuck containers) |
agentctl deploy [--namespace ns] |
Deploy full stack to OpenShift |
agentctl destroy [--namespace ns] |
Remove all cluster resources |
agentctl flows save |
Local Langflow → flows/ directory |
agentctl flows load |
flows/ directory → Local Langflow |
agentctl flows pull [-n ns] |
Cluster Langflow → flows/ directory |
agentctl flows push [-n ns] |
flows/ directory → Cluster Langflow |
agentctl build <flow.json> [registry] [tag] |
Build flow into a container image and push to registry |
agentctl list [--all-namespaces] |
List deployed agents |
agentctl status <name> [-n ns] |
Show agent status and metadata |
Key values in helm/langflow-agent/values.yaml:
| Parameter | Description | Default |
|---|---|---|
langflow.image |
Langflow container image | langflowai/langflow:1.7.1 |
langflow.replicas |
Number of Langflow replicas | 1 |
langfuse.enabled |
Deploy Langfuse for tracing | true |
modelServing.enabled |
Deploy vLLM + KServe | false |
modelServing.modelName |
Model to serve | meta-llama/Llama-3.1-8B-Instruct |
modelServing.gpu.count |
GPUs for model serving | 1 |
agentctl deploy --no-model-serving # Without GPU model serving (default)To enable model serving, set modelServing.enabled: true in values.yaml. Requires a GPU node and KServe/RHOAI on the cluster.
| Service | Username | Password |
|---|---|---|
| Langflow | (auto-login) | |
| Langfuse (local) | admin@langflow.local | admin123 |
| Langfuse (cluster) | admin@langflow.local | admin123 |
| PostgreSQL | langflow | langflow |
| Service | URL |
|---|---|
| Langflow UI | http://localhost:7860 |
| Langfuse | http://localhost:3000 |
| Ollama API | http://localhost:11434 |
- Flows pulled from the cluster may contain model components pointing to cluster-internal URLs. When loading these locally, update the model endpoint in the Langflow UI to point to Ollama (
http://ollama:11434/v1). flows saveandflows pulldownload all flows including Langflow's built-in starter templates. Only user-created flows are relevant for version control.- Langfuse auto-provisioning (org, project, API keys) only runs on first database creation. If you need to reset, remove the PostgreSQL volume and restart.