Repository navigation
feat: make langflow consistent with helm-based agent pattern #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8b49082
4604370
ca07b12
6c1e52e
9228a9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Langflow Agents | ||
|
|
||
| Agent templates built with [Langflow](https://docs.langflow.org/)'s visual flow builder. | ||
|
|
||
| > **Note:** Langflow agents are different from other agents in this repo. They do not deploy a custom container — the "agent" is a JSON flow definition imported into an existing Langflow instance. See each agent's README for details. | ||
|
|
||
| ## Available Agents | ||
|
|
||
| | Agent | Description | | ||
| |-------|-------------| | ||
| | [Simple Tool Calling Agent](simple_tool_calling_agent/) | Tool-calling agent that calls external APIs (weather, parks) and reasons over results. Includes Langfuse v3 tracing. | |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # PostgreSQL | ||
| POSTGRES_USER=langflow | ||
| POSTGRES_PASSWORD=langflow | ||
| POSTGRES_DB=langflow | ||
|
|
||
| # Langfuse — admin password and encryption key are auto-generated on first run by make init | ||
| LANGFUSE_ADMIN_PASSWORD= | ||
| LANGFUSE_ENCRYPTION_KEY= |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| SHELL := bash | ||
| COMPOSE_FILE := local/podman-compose.yml | ||
| ENV_FILE := local/.env | ||
|
|
||
| .PHONY: init run stop clean status logs help | ||
|
|
||
| help: ## Show this help | ||
| @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-12s %s\n", $$1, $$2}' | ||
|
|
||
| init: ## Create local/.env from .env.example and generate secrets | ||
| @if [ ! -f $(ENV_FILE) ]; then \ | ||
| cp .env.example $(ENV_FILE) && echo "Created local/.env from .env.example"; \ | ||
| else \ | ||
| echo "local/.env already exists — skipping"; \ | ||
| fi | ||
| @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 | ||
| @if ! grep -q '^LANGFUSE_ENCRYPTION_KEY=.\+' $(ENV_FILE) 2>/dev/null; then \ | ||
| GENERATED_KEY=$$(openssl rand -hex 32) && \ | ||
| sed -i.bak "s/^LANGFUSE_ENCRYPTION_KEY=.*/LANGFUSE_ENCRYPTION_KEY=$$GENERATED_KEY/" $(ENV_FILE) && \ | ||
| rm -f $(ENV_FILE).bak && \ | ||
| echo "Generated Langfuse encryption key."; \ | ||
| fi | ||
|
|
||
| run: init ## Start the local Langflow stack (Langflow + PostgreSQL + Langfuse) | ||
| @./deploy-local.sh | ||
|
|
||
| stop: ## Stop services (data preserved) | ||
| @./cleanup-local.sh | ||
|
|
||
| clean: ## Stop services and remove all data | ||
| @./cleanup-local.sh --force | ||
|
|
||
| status: ## Show status of running services | ||
| @podman-compose -f $(COMPOSE_FILE) ps | ||
|
|
||
| logs: ## Tail logs from all services | ||
| @podman-compose -f $(COMPOSE_FILE) logs -f | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| name: langflow-simple-tool-calling-agent | ||
| 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can also add the env block here similar to other agents
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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