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

# Hermes Agent

Use TensorX models with Hermes Agent — the self-improving AI agent by Nous Research.

***

## Overview

[Hermes Agent](https://github.com/NousResearch/hermes-agent) is an open-source AI agent built by [Nous Research](https://nousresearch.com) that learns from experience, creates skills autonomously, and works across CLI, Telegram, Discord, Slack, and WhatsApp. It supports custom OpenAI-compatible endpoints via environment variables or config.

***

## Prerequisites

* **Linux, macOS, or WSL2** (native Windows not supported)
* **Git**
* A TensorX API key ([sign up here](https://app.tensorx.ai/register))

***

## Installation

```bash
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
source ~/.bashrc
```

***

## Configuration

### Option 1: Setup Wizard

```bash
hermes setup
```

When prompted for provider, choose **Custom/OpenAI-compatible** and enter:

| Setting      | Value                       |
| ------------ | --------------------------- |
| **Base URL** | `https://api.tensorx.ai/v1` |
| **API Key**  | Your TensorX API key        |
| **Model**    | `z-ai/glm-5.3`              |

### Option 2: Environment Variables

```bash
export OPENAI_BASE_URL=https://api.tensorx.ai/v1
export OPENAI_API_KEY=your-tensorx-api-key-here
```

To make permanent, add to `~/.bashrc` or `~/.zshrc`.

### Option 3: Config File

Edit `~/.hermes/config.yaml`:

```yaml
model:
  provider: auto
  default: z-ai/glm-5.3
  base_url: https://api.tensorx.ai/v1
```

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

***

## Usage

```bash
hermes                  # Start interactive CLI
hermes model            # Switch model
hermes gateway          # Start messaging gateway (Telegram, Discord, etc.)
hermes doctor           # Diagnose issues
```

***

## Model selection

Call `GET /v1/models` with your TensorX API key and use one of the returned IDs. If the integration depends on a capability or token limit, query `GET /v1/model/info` before selecting the model. See [Models](/api-reference/models.md) for examples.

***

## Messaging Gateway

Connect your agent to messaging platforms:

```bash
hermes gateway
```

Hermes Agent supports Telegram, Discord, Slack, and WhatsApp — all from a single gateway process with cross-platform conversation continuity.

***

## Troubleshooting

### Agent Not Responding

1. Verify your environment variables:

   ```bash
   echo $OPENAI_BASE_URL
   echo $OPENAI_API_KEY
   ```
2. Run diagnostics:

   ```bash
   hermes doctor
   ```

### Model Errors

Switch models with:

```bash
hermes model
```

***

## See Also

* [Hermes Agent GitHub](https://github.com/NousResearch/hermes-agent)
* [Nous Research](https://nousresearch.com)
* [TensorX Models](https://tensorx.ai/models)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tensorx.ai/ai-agents-and-chatbots/hermes-agent.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
