Repository navigation
feat: make langflow consistent with helm-based agent pattern - #46
Conversation
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds 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
Sequence Diagram(s)(Skipped) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (9)
agents/langflow/README.mdagents/langflow/simple_tool_calling_agent/.env.exampleagents/langflow/simple_tool_calling_agent/Makefileagents/langflow/simple_tool_calling_agent/README.mdagents/langflow/simple_tool_calling_agent/agent.yamlagents/langflow/simple_tool_calling_agent/cleanup-local.shagents/langflow/simple_tool_calling_agent/deploy-local.shdocs/adding-a-new-agent.mddocs/local-development.md
💤 Files with no reviewable changes (1)
- docs/local-development.md
| make test | ||
| ``` | ||
|
|
||
| ## Building Container Images Locally |
There was a problem hiding this comment.
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.
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())") | |||
There was a problem hiding this comment.
AGENT_NAME Not used anywhere. can be removed?
| 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 |
There was a problem hiding this comment.
Can also add the env block here similar to other agents
There was a problem hiding this comment.
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.
| status: ## Show status of running services | ||
| @cd local && podman-compose ps | ||
|
|
||
| logs: ## Tail logs from all services | ||
| @cd local && podman-compose logs -f |
There was a problem hiding this comment.
Could use the COMPOSE_FILE variable here
| @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 |
There was a problem hiding this comment.
This is also present in deploy-local.sh. can be removed from one place
There was a problem hiding this comment.
good catch, removed it from deploy-local.sh
|
Re: agent.yaml env block — Won't fix. All env vars are either hardcoded defaults in |
- 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>
|
LGTM |
- 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>
- 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>
- 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>
- 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>
Summary
agent.yaml,Makefile, and.env.exampleto langflow agent for consistency with llamaindex/crewai/vanilla_python agentsagents/langflow/README.mddocs/adding-a-new-agent.mdwith flow-based agent exceptiondocs/local-development.md(already inopenshift-deployment.md)Test plan
cd agents/langflow/simple_tool_calling_agent && make help— shows all targetsmake init— createslocal/.envfrom.env.examplewith generated Langfuse secretsmake run— starts the local stack (requires podman)make stop/make clean— stops services correctly🤖 Generated with Claude Code