For the complete documentation index, see llms.txt. This page is also available as Markdown.

Langflow

Langflow is a visual framework for building RAG applications and multi-agent AI workflows using a drag-and-drop interface.

Prerequisites

Configuration

Langflow connects to TensorX through the OpenAI model component, which supports custom base URLs for OpenAI-compatible APIs.

Step 1: Add OpenAI Model Component

  1. Open your Langflow workspace

  2. In the component sidebar, navigate to Models

  3. Drag the OpenAI component onto your canvas

Step 2: Configure the Component

Click on the OpenAI component to open its settings and configure:

Parameter
Value

OpenAI API Base

https://api.tensorx.ai/v1

OpenAI API Key

Your TensorX API key

Model Name

deepseek/deepseek-chat-v3.1

The OpenAI API Base field allows you to point to any OpenAI-compatible endpoint. Enter the full URL including /v1.

Step 3: Adjust Model Parameters

Configure optional parameters as needed:

Parameter
Description
Recommended

Temperature

Controls randomness (0-2)

0.7

Max Tokens

Maximum response length

4096

Stream

Enable streaming responses

true

Building a Basic Flow

Simple Chat Flow

  1. Add an OpenAI model component (configured for TensorX)

  2. Add a Chat Input component

  3. Add a Chat Output component

  4. Connect: Chat Input → OpenAI → Chat Output

  5. Click Run to test

RAG Flow with Vector Store

  1. Add an OpenAI model component for TensorX

  2. Add a Vector Store component (Chroma, Pinecone, etc.)

  3. Add a Retriever component

  4. Add a Prompt component with RAG template

  5. Connect components to build the retrieval pipeline

  6. Add Chat Input/Output for interaction

For Coding Tasks:

  • z-ai/glm-5.1 - Best for tool calling and structured outputs

  • minimax/minimax-m2.5 - Best for complex reasoning tasks

Model ID
Best For

deepseek/deepseek-chat-v3.1

General chat, balanced

z-ai/glm-5.1

Tool calling, agents, code

minimax/minimax-m2.5

Reasoning, functions

moonshotai/kimi-k2.5

Vision, long context

Agent Workflows

When building agent workflows with tools:

Step 1: Configure Model for Tool Calling

Use z-ai/glm-5.1 for best tool calling support:

Step 2: Add Tool Components

  1. Add tool components from the Tools section

  2. Available tools include: Calculator, Web Search, Python Code, etc.

  3. Connect tools to your agent flow

Step 3: Build Agent Logic

  1. Add an Agent component

  2. Connect your TensorX model to the agent's LLM input

  3. Connect tool components to the agent

  4. Add memory component if needed for conversation history

Example Configurations

Code Assistant

Creative Writing

Analytical Tasks

Using Multiple Models

You can use different TensorX models in the same flow:

  1. Add multiple OpenAI components

  2. Configure each with a different model

  3. Use a Router component to direct queries to the appropriate model

  4. Or chain models for multi-step processing

Memory and Context

Adding Conversation Memory

  1. Add a Memory component (e.g., Buffer Memory)

  2. Connect it to your OpenAI model component

  3. This enables multi-turn conversations with context

Managing Context Length

For long conversations:

  • Use models with larger context windows

  • Implement summarization for older messages

  • Use the Memory component's built-in truncation

Troubleshooting

"Invalid API Key" Error

  • Verify your API key at app.tensorx.ai

  • Check for extra spaces in the API key field

  • Ensure the base URL is correct: https://api.tensorx.ai/v1

"Model Not Found" Error

  • Use the full model ID with provider prefix

  • Example: deepseek/deepseek-chat-v3.1 not just deepseek-chat

  • Check available models at app.tensorx.ai/models

Connection Timeout

  • Check your Langflow instance's network connectivity

  • Verify there are no firewall rules blocking the API

  • Try increasing timeout settings if available

Flow Not Responding

  • Check the Langflow logs for error messages

  • Verify all required connections are made

  • Test individual components before full flow

Support

Need help? Contact us at support@tensorx.ai

Last updated

Was this helpful?