Building Chatflows in Calabi AI Builder
Calabi AI Builder is a visual, low-code environment for constructing LLM-powered conversational applications. A chatflow is a directed graph of nodes that defines how a user's message moves through language models, memory stores, and data retrieval steps to produce a response. This page covers the canvas, every node type, how to connect nodes, and how to deploy a finished chatflow as a production API endpoint.
Canvas Overview
When you open a chatflow in Calabi AI Builder, you see the canvas — a drag-and-drop workspace where nodes are connected by edges representing the data flow.
| UI Element | Description |
|---|---|
| Canvas | The main workspace. Pan by holding Space+drag. Zoom with Ctrl+Scroll. |
| Node Palette | Left panel. Contains all available node types organized by category. |
| Configuration Drawer | Right panel. Appears when a node is selected; shows all editable fields. |
| Chat Panel | Bottom panel. Opens a test chat interface to interact with the chatflow live. |
| Toolbar | Top bar. Contains Save, Clear, Import/Export JSON, and the API Endpoint button. |
| Run Preview | Displays intermediate outputs at each node during a test chat, for debugging. |
Node Types
LLM Nodes
LLM nodes are the reasoning core of a chatflow. They take a formatted prompt and return a generated response.
| Node | Model Families | Description |
|---|---|---|
| ChatOpenAI | GPT-4o, GPT-4 Turbo, GPT-3.5 | OpenAI chat completion models with streaming support. |
| ChatAnthropic | Claude 3.5 Sonnet, Claude 3 Opus | Anthropic Claude models, strong at long-context tasks. |
| Chat (Local Models) | Llama 3, Mistral, Phi-3, Gemma | Local models served by Calabi Local Models within the cluster. |
| ChatBedrock | Claude on Bedrock, Titan, Llama | AWS Bedrock-hosted models for customers with Bedrock access. |
| ChatAzureOpenAI | GPT-4o on Azure | Azure OpenAI Service endpoint for enterprise Azure customers. |
Key LLM node settings:
| Setting | Description |
|---|---|
| Temperature | Controls randomness (0 = deterministic, 1 = creative). Default: 0.7 |
| Max Tokens | Maximum tokens in the response. |
| System Prompt | Instructions prepended to every conversation. |
| Streaming | Enable token-by-token streaming for real-time UI updates. |
| Top P | Nucleus sampling parameter. Default: 1. |
Memory Nodes
Memory nodes give the chatflow access to conversation history, enabling multi-turn interactions.
| Node | Storage Backend | Description |
|---|---|---|
| Buffer Memory | In-process (ephemeral) | Stores the full conversation history in memory. Resets on service restart. |
| Buffer Window Memory | In-process | Stores only the last N message pairs (configurable window). |
| Redis Memory | Redis | Persists conversation history in Redis, keyed by session ID. Survives restarts. |
| Postgres Memory | database | Stores conversation history in the Calabi metadata database. |
| Zep Memory | Zep server | Long-term memory with automatic summarization of older messages. |
| Motorhead Memory | Motorhead | API-based managed memory service. |
Best practice: Use Redis Memory for production chatflows — it survives pod restarts and supports horizontal scaling of the AI Builder service.
Tool Nodes
Tool nodes extend the LLM with specific capabilities. The LLM can choose to "call" a tool when it determines the user's question requires it.
| Node | Description |
|---|---|
| Calabi Catalogue Tool | Allows the LLM to search Calabi Catalogue for asset metadata. |
| CalabiIQ SQL Tool | Allows the LLM to execute SQL queries against the data warehouse. |
| Calculator | Performs arithmetic operations (useful when the LLM would otherwise hallucinate calculations). |
| Web Browser | Fetches and summarizes content from URLs. |
| Serper Search | Performs Google web searches via the Serper API. |
| HTTP Request Tool | Calls a custom REST API with LLM-generated parameters. |
| Custom Tool | Define your own tool with a name, description, and function schema; the LLM decides when to call it. |
Data Retrieval Nodes (RAG)
Data retrieval nodes connect the chatflow to external documents and databases for Retrieval Augmented Generation (RAG).
| Node | Description |
|---|---|
| Vector Store Retriever | Queries a vector store with a similarity search and returns the top-K chunks. |
| Document Store | Manages a collection of indexed documents (backed by a vector store). |
| Conversational Retrieval QA | A complete RAG chain: retrieves context, injects it into the prompt, and generates an answer. |
Prompt Nodes
Prompt nodes format the input to the LLM, combining the user's message with retrieved context and system instructions.
| Node | Description |
|---|---|
| Chat Prompt Template | A template with {input} and {context} placeholders that structures the LLM input. |
| Prompt Template | A simpler single-string template for non-chat completion models. |
Utility Nodes
| Node | Description |
|---|---|
| LLM Chain | Combines a Prompt Template + LLM into a single step. |
| Conversational Chain | An LLM Chain with built-in memory. |
| Text Splitter | Splits large documents into chunks for embedding. Multiple strategies: recursive character, token-based, markdown-aware. |
| Output Parser | Parses the LLM's output into a structured format (JSON, list, custom schema). |
Connecting Nodes
Every node has input handles (on the left) and output handles (on the right). The handle label indicates the expected data type (e.g., LLM, Memory, VectorStore, Document).
- Hover over an output handle to see its type.
- Click and drag from the output handle to a compatible input handle on another node.
- Compatible handles are highlighted in green; incompatible ones are greyed out.
- Release to create the connection.
Type enforcement: Calabi AI Builder enforces type compatibility — you cannot connect a Memory node's output directly to an LLM node's input handle; it must go to the memory handle.
Sample RAG Chatflow
The following diagram shows a complete Retrieval Augmented Generation chatflow that answers questions about company HR policies.
Node-by-node explanation:
- PDF Loader — Loads
hr_policy.pdffrom the document store. Runs only during the indexing phase. - Text Splitter — Splits the PDF into 1,000-character chunks with 200-character overlap to preserve context across chunk boundaries.
- OpenAI Embeddings — Converts each chunk into a 1,536-dimension embedding vector using
text-embedding-3-small. - Postgres Vector Store — Stores chunks and their vectors in the Calabi metadata database via the
pgvectorextension. - Vector Store Retriever — At query time, embeds the user's question and retrieves the 4 most similar chunks.
- Chat Prompt Template — Formats the prompt with the retrieved chunks as
{context}and the user's message as{input}. - ChatOpenAI — Generates the final answer using GPT-4o at low temperature (0.2) for factual consistency.
- Redis Memory — Maintains conversation history so follow-up questions reference prior answers.
- Response — Streamed back to the user.
Connecting to Data Sources
Calabi AI Builder can pull documents from multiple sources for indexing:
| Source | Node | Supported Formats |
|---|---|---|
| Local file upload | Document Store | PDF, DOCX, TXT, CSV, XLSX |
| S3 bucket | S3 File Loader | PDF, TXT, CSV, DOCX |
| Web URL | Web Scraper Loader | HTML pages |
| Calabi Catalogue | Catalogue Document Loader | Asset descriptions, glossary terms |
| Notion | Notion Loader | Notion pages and databases |
| Confluence | Confluence Loader | Confluence spaces and pages |
Testing a Chatflow
- After connecting all nodes, click Save in the toolbar.
- Click Test Chatflow — the Chat Panel opens at the bottom of the screen.
- Type a test message and press Enter.
- The response streams in. Click any node in the canvas to inspect its intermediate input/output for that message.
- Use the Session ID field in the Chat Panel to simulate different users by entering different IDs.
The test panel shows:
- The user message
- Retrieved document chunks (for RAG chatflows)
- The formatted prompt sent to the LLM
- Token usage (input tokens, output tokens, cost estimate)
- Response time
Deploying as an API Endpoint
Once your chatflow is tested and ready:
- Click API Endpoint in the top toolbar.
- Copy the endpoint URL:
https://<your-calabi-domain>/api/v1/prediction/<chatflow-id> - Obtain an API key: Settings → API Keys → + Create API Key.
- Make requests using the following format:
curl -X POST \
"https://<your-calabi-domain>/api/v1/prediction/<chatflow-id>" \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"question": "What is the maternity leave policy?",
"overrideConfig": {
"sessionId": "user-456"
}
}'
Response format:
{
"text": "The maternity leave policy provides 16 weeks of fully paid leave...",
"sourceDocuments": [
{
"pageContent": "Section 4.2 — Maternity Leave...",
"metadata": { "source": "hr_policy.pdf", "page": 12 }
}
]
}
The sourceDocuments array includes the document chunks used to generate the answer — essential for RAG transparency and auditability.
Related Pages
- RAG Agents — Build document-grounded knowledge base agents
- Local Models — Use on-premise models in chatflows
- Embedding AI Builder Chatflows — Embed as iframe, widget, Slack bot, or Teams bot