LangFlow Integration Guide

Operationalise LangFlow boards inside AIP so you can run and manage them alongside native agents. This guide is for teams prototyping visually who are ready to sync flows into the wider automation platform without rewriting them by hand.

Overview

When to use: Understand the sync pipeline before wiring automation.

LangFlow lets you design complex agent workflows visually. The GL AIP package can sync those flows and expose them as agents of type langflow, ready to run via the Python SDK or CLI. Use LangFlow for rapid prototyping, then promote the result into your wider automation pipelines.

Configure Access

When to use: Connect LangFlow to AIP with the right credentials and endpoints.

Set the LangFlow connection once via environment variables or CLI flags:

export LANGFLOW_BASE_URL="https://your-langflow.example.com"
export LANGFLOW_API_KEY="super-secret"

Sync Flows from LangFlow

When to use: Promote a visual flow into an AIP agent for the first time or after edits.

from glaip_sdk import Client

client = Client()

client.sync_langflow_agents()

# Inspect LangFlow-based agents
langflow_agents = client.agents.list_agents(agent_type="langflow")
for agent in langflow_agents:
    print(agent.name)
circle-info

aip agents sync-langflow references agents by their underlying LangFlow IDs, but follow-up commands like aip agents run accept either the synced agent ID or its unique name. Use --select if multiple agents share a similar name.

The sync operation fetches every published flow, creating new agents or updating existing ones if the LangFlow ID already exists in AIP.

Common sync issues

chevron-rightFlow not listed in CLI after synchashtag
  • Likely cause: Sync command failed silently or wrong workspace connected.

  • Fix: Re-run the sync with verbose logging and confirm API keys reference the correct LangFlow workspace.

chevron-rightTool references missinghashtag
  • Likely cause: Tool IDs in the flow do not exist in the target account.

  • Fix: Import or recreate the tools first, then resync the flow.

chevron-rightRuntime errors about unknown nodeshashtag
  • Likely cause: Custom components unsupported in AIP runtime.

  • Fix: Replace custom nodes with supported blocks before syncing.

chevron-rightFlow changes not reflectedhashtag
  • Likely cause: Cached agent still running previous version.

  • Fix: Use --force sync options or delete/recreate the agent before syncing.

Run LangFlow Agents

When to use: Execute, monitor, and validate converted flows inside AIP.

Best Practices

When to use: Keep flows consistent between design and production environments.

  • Version in LangFlow: Tag releases in LangFlow so you can track which build is currently synced. The sync output returns counts for created, updated, and skipped flows.

  • Modular boards: Break large chains into reusable sub-flows to keep agent responses predictable and easier to debug.

  • Tool parity: Ensure any tools referenced in the LangFlow board exist in the target AIP account; missing tools will surface as execution errors.

  • Scheduled syncs: Use CI or scheduled jobs to call aip agents sync-langflow so your AIP account always mirrors the latest published boards.

Troubleshooting

When to use: Resolve sync or runtime failures before filing an issue.

chevron-rightMissing LangFlow configuration errorhashtag
  • Likely Cause: No base URL/API key configured

  • Fix: Set LANGFLOW_BASE_URL and LANGFLOW_API_KEY or pass flags

chevron-rightAgents not appearing after synchashtag
  • Likely Cause: Flow is disabled or missing required metadata

  • Fix: Publish/enable the flow in LangFlow and re-run sync

chevron-rightExecution errors at runtimehashtag
  • Likely Cause: Referenced tools/models unavailable in AIP

  • Fix: Provision the same tools/models in the target account before running


Design visually in LangFlow, sync into AIP, and run those flows anywhere you use the SDK or CLI.

Last updated