langflow-ai/langflow · error · HTTPException

This endpoint is not available

Error message

This endpoint is not available

What it means

The agentic assistant's code-generating/executing endpoints are gated by a dependency that checks settings.agentic_experience. When an operator opts out with LANGFLOW_AGENTIC_EXPERIENCE=false, the gate raises HTTP 404 ('This endpoint is not available') instead of 403 so clients cannot distinguish 'disabled' from 'does not exist'. Only the codegen endpoints are gated; the read-only /agentic/check-config probe stays open by design.

Source

Thrown at src/backend/base/langflow/agentic/api/deps.py:25

from fastapi import HTTPException, status
from lfx.services.deps import get_settings_service


def require_agentic_experience() -> None:
    """Backend gate for the agentic assistant's code-generating/executing endpoints.

    SECURITY: the assistant generates and EXECUTES component code in-process
    (langflow.agentic.helpers.validation.validate_component_runtime and the user-components
    overlay). ``agentic_experience`` is on by default (the Assistant is Langflow's entry-point
    experience); this gate 404s the codegen endpoints when an operator opts out with
    LANGFLOW_AGENTIC_EXPERIENCE=false, matching the per-endpoint precedent in
    api/v1/endpoints.py. Execution entry points are additionally guarded by
    ``allow_custom_components``. The read-only ``/agentic/check-config`` probe is intentionally
    NOT gated so non-agentic deployments can still query provider configuration.
    """
    if not get_settings_service().settings.agentic_experience:
        raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="This endpoint is not available")

View on GitHub (pinned to 976ec789d2)

Solutions

  1. Re-enable the feature if intended: set LANGFLOW_AGENTIC_EXPERIENCE=true and restart.
  2. If it must stay off, remove/feature-flag the client code that calls agentic codegen endpoints.
  3. Probe capability first via GET /agentic/check-config (never gated) before invoking codegen endpoints.
  4. For execution endpoints also confirm allow_custom_components is enabled.

Example fix

# before: deployment runs with LANGFLOW_AGENTIC_EXPERIENCE=false
POST /api/v1/agentic/generate  # 404 This endpoint is not available
# after
LANGFLOW_AGENTIC_EXPERIENCE=true langflow run
POST /api/v1/agentic/generate  # 200
Defensive patterns

Strategy: validation

Validate before calling

import requests
r = requests.get("http://host/api/v1/agentic/check-config", headers=headers)  # never gated
r.raise_for_status()
agentic_on = r.json().get("agentic_experience", False)
if not agentic_on:
    skip_codegen_calls()

Try / catch

resp = client.post("/api/v1/agentic/generate", json=payload)
if resp.status_code == 404 and resp.json().get("detail") == "This endpoint is not available":
    disable_assistant_ui()  # feature flag off, not a routing bug
else:
    resp.raise_for_status()

Prevention

When it happens

Trigger: Calling any POST /api/v1/agentic/... codegen or execution endpoint while LANGFLOW_AGENTIC_EXPERIENCE=false; a frontend or script that assumes the Assistant API is always present.

Common situations: Hardened deployments disabling the in-process code-executing assistant; a stale client hitting a deployment that turned the feature off; execution endpoints additionally require allow_custom_components=true.

Related errors


AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14). Data as JSON: /api/errors/d31489fd6e550913. Report an issue: GitHub.