> For the complete documentation index, see [llms.txt](https://docs.tensorix.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tensorix.ai/research-and-knowledge/anythingllm.md).

# AnythingLLM

Connect AnythingLLM to Tensorix and chat with your documents using any of our models.

***

## What is AnythingLLM?

[AnythingLLM](https://anythingllm.com/) is an all-in-one AI application that lets you chat with your documents, use AI agents, and manage multiple workspaces. It supports many LLM providers including OpenAI-compatible APIs like Tensorix.

{% hint style="success" %}
**Why AnythingLLM + Tensorix?**

* 📁 **Document chat** - Upload PDFs, docs, and more to chat with your content
* 🤖 **AI Agents** - Build custom agents that can browse the web and use tools
* 👥 **Multi-user** - Support for teams with permissions (Docker version)
* 🔌 **Embeddable** - Create chat widgets for your website
* 🖥️ **Desktop & Docker** - Run locally or self-host
  {% endhint %}

***

## Prerequisites

* AnythingLLM installed ([Desktop](https://anythingllm.com/download) or [Docker](https://github.com/Mintplex-Labs/anything-llm/blob/master/docker/HOW_TO_USE_DOCKER.md))
* A Tensorix API key ([sign up here](https://app.tensorix.ai))

***

## Configuration

AnythingLLM supports Tensorix through the **OpenAI (Generic)** provider.

### Step 1: Open LLM Settings

1. Launch AnythingLLM
2. Click the **Settings** gear icon
3. Navigate to **LLM** settings

### Step 2: Select OpenAI (Generic)

1. In the LLM provider dropdown, select **OpenAI (Generic)**
2. Configure the following settings:

| Field      | Value                            |
| ---------- | -------------------------------- |
| Base URL   | `https://api.tensorix.ai/v1`     |
| API Key    | Your Tensorix API key            |
| Model Name | `deepseek/deepseek-chat-v3.1`    |
| Max Tokens | `4096` (or your preferred limit) |

3. Click **Save Changes**

{% hint style="warning" %}
**Important**: The Base URL must include `/v1` at the end.
{% endhint %}

***

## Docker Deployment

Deploy AnythingLLM with Tensorix pre-configured:

```bash
docker run -d \
  --name anythingllm \
  -p 3001:3001 \
  -v anythingllm-data:/app/server/storage \
  -e LLM_PROVIDER=generic-openai \
  -e GENERIC_OPEN_AI_BASE_PATH=https://api.tensorix.ai/v1 \
  -e GENERIC_OPEN_AI_API_KEY=your-tensorix-api-key \
  -e GENERIC_OPEN_AI_MODEL_PREF=deepseek/deepseek-chat-v3.1 \
  mintplexlabs/anythingllm
```

Then open `http://localhost:3001` in your browser.

### Docker Compose

```yaml
version: '3.8'

services:
  anythingllm:
    image: mintplexlabs/anythingllm
    container_name: anythingllm
    ports:
      - "3001:3001"
    environment:
      - LLM_PROVIDER=generic-openai
      - GENERIC_OPEN_AI_BASE_PATH=https://api.tensorix.ai/v1
      - GENERIC_OPEN_AI_API_KEY=your-tensorix-api-key
      - GENERIC_OPEN_AI_MODEL_PREF=deepseek/deepseek-chat-v3.1
      - GENERIC_OPEN_AI_MAX_TOKENS=4096
    volumes:
      - anythingllm-data:/app/server/storage

volumes:
  anythingllm-data:
```

Deploy with:

```bash
docker compose up -d
```

***

## Recommended Models

| Use Case              | Model                               | Notes                            |
| --------------------- | ----------------------------------- | -------------------------------- |
| **General chat**      | `deepseek/deepseek-chat-v3.1`       | Fast, great for everyday use     |
| **Complex reasoning** | `deepseek/deepseek-r1-0528`         | Best for analysis and research   |
| **Coding assistance** | `z-ai/glm-5.1`                      | Excellent for code-related tasks |
| **Vision tasks**      | `moonshotai/kimi-k2.5`              | Image understanding              |
| **Long documents**    | `meta-llama/llama-4-maverick`       | Long document processing         |
| **Fast responses**    | `meta-llama/llama-3.3-70b-instruct` | Quick, cost-effective            |

***

## Workspace Configuration

You can set different models per workspace:

1. Open a workspace
2. Click the **Settings** icon for that workspace
3. Under **Chat Settings**, select **Workspace LLM**
4. Choose **OpenAI (Generic)** and configure with a different Tensorix model

This allows you to use different models for different use cases within the same AnythingLLM instance.

***

## Features with Tensorix

### 📁 Document Upload

Upload and chat with various document types:

* PDFs
* Word documents (.docx)
* Text files
* Web pages (via URL)
* And more

### 🤖 AI Agents

Create custom agents that can:

* Browse the web
* Execute code
* Use custom tools
* Access your documents

### 💬 Workspaces

Organize your documents into separate workspaces, each with its own:

* Document collection
* Chat history
* Model settings

### 🔌 Embed Widget

Create embeddable chat widgets for your website (Docker version only).

***

## Environment Variables

For Docker deployments, these environment variables configure Tensorix:

| Variable                     | Value                        | Description                    |
| ---------------------------- | ---------------------------- | ------------------------------ |
| `LLM_PROVIDER`               | `generic-openai`             | Use OpenAI-compatible provider |
| `GENERIC_OPEN_AI_BASE_PATH`  | `https://api.tensorix.ai/v1` | Tensorix API endpoint          |
| `GENERIC_OPEN_AI_API_KEY`    | Your API key                 | Tensorix API key               |
| `GENERIC_OPEN_AI_MODEL_PREF` | Model name                   | Default model to use           |
| `GENERIC_OPEN_AI_MAX_TOKENS` | `4096`                       | Max tokens per response        |

***

## Troubleshooting

### "Invalid API Key" Error

1. Verify your API key is correct
2. Check that the key has available credits
3. Test your key:

```bash
curl https://api.tensorix.ai/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### "Model Not Found" Error

1. Verify the model name is correct (e.g., `deepseek/deepseek-chat-v3.1`)
2. Check available models at [tensorix.ai/models](https://tensorix.ai/models)

### Connection Errors

1. Ensure Base URL is `https://api.tensorix.ai/v1` (with `/v1`)
2. Check your internet connection
3. Verify no firewall is blocking the connection

### Slow Responses

1. Try a faster model like `meta-llama/llama-3.3-70b-instruct`
2. Reduce the document size in your workspace
3. Lower the max tokens setting

### Check Logs (Docker)

```bash
docker logs anythingllm
```

***

## Resources

* [AnythingLLM Documentation](https://docs.anythingllm.com/)
* [AnythingLLM GitHub](https://github.com/Mintplex-Labs/anything-llm)
* [Tensorix Models & Pricing](https://tensorix.ai/models)

***

## See Also

* [Open WebUI](/chat-interfaces/openwebui.md) - Another self-hosted chat interface
* [LibreChat](/chat-interfaces/librechat.md) - Multi-provider chat interface
* [API Examples](/api-reference/api-examples.md) - Code examples for Tensorix API


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tensorix.ai/research-and-knowledge/anythingllm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
