Sign inSign up

droqai/lfx-runtime-executor-node

By droqai

•Updated 10 months ago

A Droq AI node providing execution of Langflow runtime executor node.

Image
Machine learning & AI
Developer tools
Data science
0

1.6K

droqai/lfx-runtime-executor-node repository overview

⁠Langflow Runtime Executor Node

A Droq AI⁠ node that executes Langflow components in isolated environments.

⁠Quick Start

⁠Local Development

Recommended: Use the startup script

cd node
./start-local.sh

This script will:

  • Check for dependencies
  • Start the executor node with auto-reload enabled

Manual startup:

# 1. Install dependencies (if needed)
cd node
uv sync

# 2. Run the executor
PYTHONPATH=src python -m node.main
# or with auto-reload (default in start-local.sh)
RELOAD=true PYTHONPATH=src python -m node.main

The executor will run on http://localhost:8000 by default.

⁠Docker Build

Important: The Dockerfile must be built from the repository root, not from the node/ directory.

# Option 1: Use the build script (recommended)
cd /path/to/droqflow
./node/build.sh

# Option 2: Build manually from repo root
cd /path/to/droqflow
docker build -f node/Dockerfile -t lfx-runtime-executor-node:latest .

# Option 3: Build from node directory (use parent as context)
cd /path/to/droqflow/node
docker build -f Dockerfile -t lfx-runtime-executor-node:latest ..

# Run the container
docker run -p 8000:8000 lfx-runtime-executor-node:latest

⁠API Endpoints

⁠POST /api/v1/execute

Execute a Langflow component method.

Request:

{
    "component_state": {
        "component_class": "TextInput",
        "component_module": "lfx.components.input_output.text_input",
        "parameters": {
            "input_value": "Hello World"
        },
        "config": {},
        "display_name": "Text Input",
        "component_id": "TextInput-abc123"
    },
    "method_name": "text_response",
    "is_async": false,
    "timeout": 30
}

Response:

{
    "result": {...},
    "success": true,
    "result_type": "Message",
    "execution_time": 0.123,
    "error": null
}
⁠GET /health

Health check endpoint.

⁠GET /

Service information.

⁠Environment Variables

  • HOST - Server host (default: 0.0.0.0)
  • PORT - Server port (default: 8000)
  • LOG_LEVEL - Logging level (default: INFO)
  • RELOAD - Enable auto-reload for development (default: false)

⁠Integration with Main Backend

The main droqflow backend calls this executor node from Component._get_output_result() when components need to execute. All components are now routed to the executor by default.

⁠Docker Build

The Dockerfile is designed to be built from the repository root:

# From repo root
docker build -f node/Dockerfile -t lfx-runtime-executor-node:latest .

This allows the Dockerfile to access both:

  • app/src/node/ - Node source code
  • node/ - Executor node source code

⁠Next Steps

  1. Test locally with sample component execution
  2. Build Docker image
  3. Deploy executor node service
  4. Configure main backend to use executor node

⁠License

Apache License 2.0

Tag summary

Content type

Image

Digest

sha256:ca7864ba6…

Size

142.6 MB

Last updated

10 months ago

docker pull droqai/lfx-runtime-executor-node