# Agent Zero

Build autonomous AI agents powered by Tensorix models using Agent Zero — the open-source agentic AI framework.

***

## Overview

[Agent Zero](https://agent-zero.ai) is an open-source autonomous AI agent framework that can operate on its own computer, create and use tools, learn from experience, and execute complex workflows. It's #12 on [OpenRouter](https://openrouter.ai/apps) and trending fast. Agent Zero uses LiteLLM under the hood, making it easy to connect to Tensorix as a custom provider.

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

* 🧠 **Autonomous agents** — Self-correcting AI that creates its own tools
* 🔒 **Privacy-first** — Self-hosted framework + EU-hosted models with zero data retention
* 🌐 **Web UI** — Built-in browser-based interface for managing agents
* 🔧 **Tool creation** — Agents dynamically create and use tools as needed
* 💰 **Cost-effective** — Run complex agent workflows at a fraction of the cost
  {% endhint %}

***

## Prerequisites

* **Python** 3.10+ and **Node.js** 22+
* **Docker** (recommended for sandboxed execution)
* A Tensorix API key ([sign up here](https://app.tensorix.ai/register))

***

## Installation

```bash
git clone https://github.com/agent0ai/agent-zero.git
cd agent-zero
pip install -r requirements.txt
```

***

## Configuration

### Option 1: Web UI Setup

1. Start Agent Zero:

   ```bash
   python run_ui.py
   ```
2. Open `http://localhost:50001` in your browser
3. Go to **Settings** and configure:

| Setting                 | Value                        |
| ----------------------- | ---------------------------- |
| **Chat Model Provider** | `Other OpenAI compatible`    |
| **Chat Model Name**     | `z-ai/glm-5.1`               |
| **Chat Model API Key**  | Your Tensorix API key        |
| **Chat Model API Base** | `https://api.tensorix.ai/v1` |

4. Set the same for **Utility Model** (or use a faster model like `minimax/minimax-m2`)

### Option 2: Environment Variables

Create a `.env` file in the Agent Zero root directory:

```bash
# Chat model (main agent)
CHAT_MODEL_PROVIDER=other
CHAT_MODEL_NAME=z-ai/glm-5.1
API_KEY_OTHER=your-tensorix-api-key-here
CHAT_MODEL_API_BASE=https://api.tensorix.ai/v1

# Utility model (background tasks)
UTILITY_MODEL_PROVIDER=other
UTILITY_MODEL_NAME=minimax/minimax-m2
UTILITY_MODEL_API_BASE=https://api.tensorix.ai/v1
```

{% hint style="warning" %}
Replace `your-tensorix-api-key-here` with your actual Tensorix API key from [app.tensorix.ai](https://app.tensorix.ai/dashboard).
{% endhint %}

***

## Recommended Models

| Use Case              | Model                         | Why                                 |
| --------------------- | ----------------------------- | ----------------------------------- |
| **Chat model** ⭐      | `z-ai/glm-5.1`                | Best coding + reasoning performance |
| **Utility model**     | `minimax/minimax-m2`          | Fast, cheap for background tasks    |
| **Complex reasoning** | `deepseek/deepseek-r1-0528`   | Deep analysis and planning          |
| **Vision tasks**      | `moonshotai/kimi-k2.5`        | Image understanding, large context  |
| **General chat**      | `deepseek/deepseek-chat-v3.1` | Balanced performance and cost       |

***

## Usage

Start the web UI and interact with your agent:

```bash
python run_ui.py
```

Agent Zero will autonomously:

* Break down complex tasks into steps
* Create and execute tools
* Search the web for information
* Write and run code
* Self-correct when errors occur

***

## Troubleshooting

### Agent Not Responding

1. Check your API key and base URL in Settings
2. Verify your Tensorix credit balance at [app.tensorix.ai](https://app.tensorix.ai/dashboard)
3. Check the terminal logs for error messages

### Tool Execution Errors

Ensure Docker is running if you're using sandboxed execution mode.

***

## See Also

* [Agent Zero Documentation](https://agent-zero.ai/p/docs/get-started/)
* [Agent Zero GitHub](https://github.com/agent0ai/agent-zero)
* [Tensorix Models](https://tensorix.ai/models)


---

# Agent Instructions: 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/ai-agents-and-chatbots/agent-zero.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.
