Skip to content

feat: make langflow consistent with helm-based agent pattern - #46

Merged
tarun-etikala merged 5 commits into
mainfrom
feat/helm-langflow
Apr 3, 2026
Merged

tarun-etikala merged 5 commits into
mainfrom
feat/helm-langflow

Conversation

@mpk-droid

Copy link
Copy Markdown
Contributor

Summary

  • Add agent.yaml, Makefile, and .env.example to langflow agent for consistency with llamaindex/crewai/vanilla_python agents
  • Restructure README to match standard sections (Setup → Import → Configuration → Running → Tracing → Deploying to Cluster → API)
  • Remove Ollama management from shell scripts — now a manual prerequisite like other agents, using Llama Stack for local model serving
  • Add framework-level agents/langflow/README.md
  • Update docs/adding-a-new-agent.md with flow-based agent exception
  • Remove duplicate "Building Container Images Locally" section from docs/local-development.md (already in openshift-deployment.md)

Test plan

  • cd agents/langflow/simple_tool_calling_agent && make help — shows all targets
  • make init — creates local/.env from .env.example with generated Langfuse secrets
  • make run — starts the local stack (requires podman)
  • make stop / make clean — stops services correctly
  • README renders correctly on GitHub with proper section links

🤖 Generated with Claude Code

mpk-droid and others added 2 commits April 1, 2026 14:45
Add agent.yaml, Makefile, and .env.example to langflow agent for
consistency with llamaindex/crewai/vanilla_python agents. Restructure
README to match standard sections. Remove Ollama management from
scripts (now a manual prerequisite like other agents). Update
local-development and adding-a-new-agent docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reorder sections: Setup → Import → Configuration → Running. Move
make run to Setup since it starts infrastructure not the agent. Add
Llama Stack as default local model serving (consistent with other
agents). Remove container image build section from local-development
docs (already in openshift-deployment docs).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 2, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ec10c8b8-d2e0-4706-917e-d8fdb5f9c5ba

📥 Commits

Reviewing files that changed from the base of the PR and between ca07b12 and 9228a9d.

📒 Files selected for processing (2)
  • agents/langflow/simple_tool_calling_agent/Makefile
  • agents/langflow/simple_tool_calling_agent/deploy-local.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • agents/langflow/simple_tool_calling_agent/deploy-local.sh

📝 Walkthrough

Walkthrough

Adds Langflow "flow-import" agent support: introduces a Simple Tool Calling Agent (flow manifest, env template, flows), Make-based local orchestration (init/run/stop/clean/status/logs), removes host Ollama integration, and updates docs for flow-based agents and local development.

Changes

Cohort / File(s) Summary
Langflow Agents Index
agents/langflow/README.md
New top-level README describing Langflow agents as JSON flow definitions and listing the "Simple Tool Calling Agent" with Langfuse v3 tracing note.
Agent manifest & env template
agents/langflow/simple_tool_calling_agent/agent.yaml, agents/langflow/simple_tool_calling_agent/.env.example
Adds agent.yaml with deploymentModel: flow-import and agent metadata; .env.example provides Postgres and Langfuse env var templates.
Local orchestration Makefile
agents/langflow/simple_tool_calling_agent/Makefile
New Makefile exposing help, init, run, stop, clean, status, logs; init creates local/.env and conditionally generates Langfuse credentials.
Local scripts (deploy/cleanup)
agents/langflow/simple_tool_calling_agent/deploy-local.sh, agents/langflow/simple_tool_calling_agent/cleanup-local.sh
deploy-local.sh now requires local/.env (fail fast if missing) and removes Ollama detection/start/pull logic; cleanup-local.sh removes Ollama-related teardown and no longer deletes .ollama-enabled. Printed next-step instructions updated to use make.
Agent README / usage
agents/langflow/simple_tool_calling_agent/README.md
Major rewrite: clarifies flow-import distribution (no container code), switches local workflow to make init/make run, removes Ollama-specific sections, updates KServe vLLM defaults and model endpoint guidance, consolidates API endpoints and resources.
Docs: adding agents & local dev
docs/adding-a-new-agent.md, docs/local-development.md
Adds subsection for flow-based agents listing required files and excluded artifacts; removes "Building Container Images Locally" section from local development docs.

Sequence Diagram(s)

(Skipped)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main objective: making the Langflow agent consistent with the Helm-based agent pattern by adding agent.yaml, Makefile, and standardizing structure.
Description check ✅ Passed The description comprehensively details the changes made, including new files, restructuring, removal of Ollama management, documentation updates, and a test plan with specific verification steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/helm-langflow

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@agents/langflow/simple_tool_calling_agent/deploy-local.sh`:
- Around line 23-27: Stale file removal: delete the unused local/.env.example
file from the repo to avoid confusion, since deploy-local.sh now copies
SCRIPT_DIR/.env.example into LOCAL_DIR/.env (see the cp
"$SCRIPT_DIR/.env.example" "$LOCAL_DIR/.env" usage); remove any references or
leftover comments about OLLAMA_MODEL in that local/.env.example and ensure only
the main .env.example remains as the authoritative template.

In `@agents/langflow/simple_tool_calling_agent/Makefile`:
- Around line 30-31: Update the misleading comment for the Makefile target "run"
to remove "Ollama" and reflect the current local stack composition: Langflow +
PostgreSQL + Langfuse + Llama Stack (or whatever local model serving component
is now used); edit the line above the "run: init" target so the description
matches the actual deploy-local.sh behavior and the current architecture.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 75f48cd0-94cb-4e27-8ac3-3ba5be662cd8

📥 Commits

Reviewing files that changed from the base of the PR and between b6bf854 and 4604370.

📒 Files selected for processing (9)
  • agents/langflow/README.md
  • agents/langflow/simple_tool_calling_agent/.env.example
  • agents/langflow/simple_tool_calling_agent/Makefile
  • agents/langflow/simple_tool_calling_agent/README.md
  • agents/langflow/simple_tool_calling_agent/agent.yaml
  • agents/langflow/simple_tool_calling_agent/cleanup-local.sh
  • agents/langflow/simple_tool_calling_agent/deploy-local.sh
  • docs/adding-a-new-agent.md
  • docs/local-development.md
💤 Files with no reviewable changes (1)
  • docs/local-development.md

Comment thread docs/local-development.md
make test
```

## Building Container Images Locally

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related to my PR but I feel like the building container images locally doesn't belong in a local-development.md. It belongs in openshift-deployment.md and it already has this.

mpk-droid and others added 2 commits April 2, 2026 03:38
All env vars are either hardcoded defaults in podman-compose.yml or
auto-generated by make init — none are user-provided config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@@ -0,0 +1,43 @@
SHELL := bash
AGENT_NAME := $(shell python3 -c "import re; print(re.search(r'^name:\s*(.+)', open('agent.yaml').read(), re.M).group(1).strip())")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AGENT_NAME Not used anywhere. can be removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will remove it

displayName: "Langflow Simple Tool Calling Agent"
framework: langflow
description: "Tool-calling agent built with Langflow's visual flow builder. Calls external APIs as tools and reasons over results."
deploymentModel: flow-import

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also add the env block here similar to other agents

@mpk-droid mpk-droid Apr 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it. But langflow's local env vars are auto-generated and not user-defined(eg POSTGRESS DB pwd, uname etc). hence didn't add the env vars.

Comment on lines +39 to +43
status: ## Show status of running services
@cd local && podman-compose ps

logs: ## Tail logs from all services
@cd local && podman-compose logs -f

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use the COMPOSE_FILE variable here

Comment on lines +17 to +22
@if ! grep -q '^LANGFUSE_ADMIN_PASSWORD=.\+' $(ENV_FILE) 2>/dev/null; then \
GENERATED_PWD=$$(openssl rand -base64 12) && \
sed -i.bak "s/^LANGFUSE_ADMIN_PASSWORD=.*/LANGFUSE_ADMIN_PASSWORD=$$GENERATED_PWD/" $(ENV_FILE) && \
rm -f $(ENV_FILE).bak && \
echo "Generated Langfuse admin password."; \
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also present in deploy-local.sh. can be removed from one place

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, removed it from deploy-local.sh

@mpk-droid

Copy link
Copy Markdown
Contributor Author

Re: agent.yaml env block — Won't fix. All env vars are either hardcoded defaults in podman-compose.yml (with \${VAR:-langflow} fallbacks) or auto-generated by make init. None are user-provided config, so the env block doesn't serve the same purpose as in other agents.

- Remove unused AGENT_NAME from Makefile
- Use COMPOSE_FILE variable in status/logs targets
- Remove duplicated init logic from deploy-local.sh (Makefile owns init)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tarun-etikala

Copy link
Copy Markdown
Contributor

LGTM

@tarun-etikala
tarun-etikala merged commit ff63266 into main Apr 3, 2026
3 checks passed
@tarun-etikala
tarun-etikala deleted the feat/helm-langflow branch April 3, 2026 18:05
tarun-etikala added a commit to tarun-etikala/agentic-starter-kits that referenced this pull request Apr 16, 2026
- Return HTTP 503 from /health when agent is uninitialized so K8s
  readiness probes correctly gate traffic (8 agents, audit #5)
- Bind local dev servers to 127.0.0.1 to prevent DNS rebinding
  attacks; container Dockerfiles remain at 0.0.0.0 (audit #36)
- Standardize FastAPI to >=0.135.1 across all agents (audit #33)
- Bump uvicorn in mcp_automl_template to >=0.41.0 (audit #34)
- Remove env:init dependency in react_with_database_memory (audit red-hat-data-services#46)
- Update post-helm-migration-audit.md (14 resolved, 4 accepted)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tarun-etikala added a commit to tarun-etikala/agentic-starter-kits that referenced this pull request Apr 16, 2026
- Return HTTP 503 from /health when agent is uninitialized so K8s
  readiness probes correctly gate traffic (8 agents, audit #5)
- Bind local dev servers to 127.0.0.1 to prevent DNS rebinding
  attacks; container Dockerfiles remain at 0.0.0.0 (audit #36)
- Standardize FastAPI to >=0.135.1 across all agents (audit #33)
- Bump uvicorn in mcp_automl_template to >=0.41.0 (audit #34)
- Remove env:init dependency in react_with_database_memory (audit red-hat-data-services#46)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tarun-etikala added a commit to tarun-etikala/agentic-starter-kits that referenced this pull request Apr 20, 2026
- Return HTTP 503 from /health when agent is uninitialized so K8s
  readiness probes correctly gate traffic (8 agents, audit #5)
- Bind local dev servers to 127.0.0.1 to prevent DNS rebinding
  attacks; container Dockerfiles remain at 0.0.0.0 (audit #36)
- Standardize FastAPI to >=0.135.1 across all agents (audit #33)
- Bump uvicorn in mcp_automl_template to >=0.41.0 (audit #34)
- Remove env:init dependency in react_with_database_memory (audit red-hat-data-services#46)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tarun-etikala added a commit to tarun-etikala/agentic-starter-kits that referenced this pull request Apr 20, 2026
- Return HTTP 503 from /health when agent is uninitialized so K8s
  readiness probes correctly gate traffic (8 agents, audit #5)
- Bind local dev servers to 127.0.0.1 to prevent DNS rebinding
  attacks; container Dockerfiles remain at 0.0.0.0 (audit #36)
- Standardize FastAPI to >=0.135.1 across all agents (audit #33)
- Bump uvicorn in mcp_automl_template to >=0.41.0 (audit #34)
- Remove env:init dependency in react_with_database_memory (audit red-hat-data-services#46)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants