Guide to enable the LLM‐based Texera copilot - apache/texera GitHub Wiki

This guide explains how to enable the AI Copilot feature in Texera. For detailed explanation about this feature, see https://github.com/apache/texera/pull/4020.

Prerequisites

  • Already know how to setup Texera
  • Python 3.10+
  • API key from a supported LLM provider (e.g., Anthropic, OpenAI)

Step 1: Install LiteLLM

Run command:

pip install 'litellm[proxy]'

Step 2: Configure API Keys

Set your LLM provider API key as an environment variable:

For Anthropic (Claude):

export ANTHROPIC_API_KEY=<your-anthropic-api-key>

For OpenAI:

export OPENAI_API_KEY=<your-openai-api-key>

You can set multiple API keys if you want to use models from different providers.

Step 3: Start LiteLLM Service

Start the LiteLLM proxy using the provided configuration:

litellm --config bin/litellm-config.yaml

By default, LiteLLM runs on http://0.0.0.0:4000.

To customize available models, edit bin/litellm-config.yaml. See LiteLLM documentation for more options. Also see LiteLLM Model Configuration for supported providers and model formats.

Step 4: Enable Copilot in Configuration

Modify common/config/src/main/resources/gui.conf to enable the copilot feature:

 gui {
   workflow-workspace {
     # ... other settings ...

     # whether AI copilot feature is enabled
-    copilot-enabled = false
+    copilot-enabled = true
   }
 }

Step 5: Configure LiteLLM Connection (Optional)

The AccessControlService acts as a gateway between the frontend and LiteLLM. If LiteLLM is running on a different host or port, modify common/config/src/main/resources/llm.conf:

 llm {
   # Base URL for LiteLLM service
-  base-url = "http://0.0.0.0:4000"
+  base-url = "http://your-litellm-host:4000"

   # Master key for LiteLLM authentication
-  master-key = ""
+  master-key = "your-master-key"
 }

Alternatively, set environment variables:

export LITELLM_BASE_URL=http://your-litellm-host:4000
export LITELLM_MASTER_KEY=your-master-key

Step 6: Start Texera Services

Start the all Texera micro services, including the AccessControlService.

Done!

After opening any workflow, you should now see a robot icon at the bottom right. Click on it will expand a panel with all the available models: 2025-11-25 18 34 39