Back to Langflow

Partial Lfx Run Serve Prereqs

docs/versioned_docs/version-1.11.0/_partial-lfx-run-serve-prereqs.mdx

1.12.0.dev31.5 KB
Original Source

Prerequisites

  • Install LFX

  • A flow JSON file. Download the Simple Agent starter flow from the repository:

    bash
    curl -o simple-agent-flow.json "https://raw.githubusercontent.com/langflow-ai/langflow/main/src/backend/base/langflow/initial_setup/starter_projects/Simple%20Agent.json"
    
  • The flow's required API keys. The Simple Agent flow uses OpenAI, which requires OPENAI_API_KEY.

Install flow dependencies {#install-dependencies}

uv pip install lfx and uvx lfx install the LFX engine only. Before running a flow, install the extensions that provide the flow's components.

If a component is missing, LFX reports component-not-found with a hint naming the bundle to install, for example:

text
component-not-found-with-hint: DuckDuckGoSearchComponent not found.
Hint: try ext:duckduckgo:DuckDuckGoSearchComponent@official

Use the bundle name from the hint to find the pip package in the Bundle list.

For more information, see Install LFX with bundle components.

Generate requirements.txt

Extension packages cover component code. Some flows still need additional Python packages at runtime (third-party SDKs imported by those components).

To list them from a flow JSON file, use lfx requirements:

bash
lfx requirements simple-agent-flow.json

Install the reported packages in the same environment before running the flow.