> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abliteration.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Hermes Agent with abliteration.ai

> Use Hermes Agent with abliteration.ai through Hermes' custom OpenAI-compatible provider or a small model-provider plugin.

**To use Hermes Agent with abliteration.ai**, configure Hermes as a custom OpenAI-compatible endpoint with base URL `https://api.abliteration.ai/v1`, your `ak_...` API key, and model `abliterated-model`.

Hermes already supports custom OpenAI-compatible providers, so you do not need a native adapter for abliteration.ai.

## Install

Follow the [Hermes Agent installation guide](https://hermes-agent.nousresearch.com/docs/getting-started/quickstart), then configure the model provider:

```sh theme={"system"}
hermes model
```

When prompted, choose the custom endpoint option and enter:

| Prompt         | Value                            |
| -------------- | -------------------------------- |
| API base URL   | `https://api.abliteration.ai/v1` |
| API key        | `ak_YOUR_API_KEY`                |
| Model name     | `abliterated-model`              |
| Context length | `150000`                         |

## Manual config

You can also edit `~/.hermes/config.yaml` directly:

```yaml theme={"system"}
model:
  provider: custom
  default: abliterated-model
  base_url: https://api.abliteration.ai/v1
  api_key: ak_YOUR_API_KEY
  context_length: 150000
```

Then start Hermes:

```sh theme={"system"}
hermes chat
```

## Named custom provider

If you prefer not to store the key in `config.yaml`, use a named custom provider with `key_env` and put the key in `~/.hermes/.env`:

```sh theme={"system"}
echo 'ABLITERATION_API_KEY=ak_YOUR_API_KEY' >> ~/.hermes/.env
```

```yaml theme={"system"}
custom_providers:
  - name: abliteration
    base_url: https://api.abliteration.ai/v1
    key_env: ABLITERATION_API_KEY
    api_mode: chat_completions
    models:
      abliterated-model:
        context_length: 150000

model:
  provider: custom:abliteration
  default: abliterated-model
```

You can switch back to this provider inside a Hermes session with `/model custom:abliteration:abliterated-model`.

## Provider plugin

For a named provider that works with `--provider abliteration-ai`, add a small Hermes model-provider plugin.

Create `~/.hermes/plugins/model-providers/abliteration-ai/__init__.py`:

```python theme={"system"}
from providers import register_provider
from providers.base import ProviderProfile

register_provider(ProviderProfile(
    name="abliteration-ai",
    aliases=("abliteration", "ablit"),
    display_name="abliteration.ai",
    description="abliteration.ai - OpenAI-compatible unrestricted model API",
    signup_url="https://abliteration.ai/signup",
    env_vars=("ABLIT_KEY", "ABLITERATION_API_KEY", "ABLITERATION_BASE_URL"),
    base_url="https://api.abliteration.ai/v1",
    auth_type="api_key",
    default_aux_model="abliterated-model",
    fallback_models=("abliterated-model",),
))
```

Create `~/.hermes/plugins/model-providers/abliteration-ai/plugin.yaml`:

```yaml theme={"system"}
name: abliteration-ai
kind: model-provider
version: 1.0.0
description: abliteration.ai - OpenAI-compatible direct API
author: abliteration.ai
```

Export your key:

```sh theme={"system"}
export ABLIT_KEY="ak_YOUR_API_KEY"
```

Then run:

```sh theme={"system"}
hermes chat --provider abliteration-ai --model abliterated-model
```

## Verify

```sh theme={"system"}
hermes doctor
hermes -z "Say hello in one sentence." --provider custom -m abliterated-model
```

If you installed the provider plugin, use:

```sh theme={"system"}
hermes -z "Say hello in one sentence." --provider abliteration-ai -m abliterated-model
```

## Notes

* `abliterated-model` supports a 150K context window. Set `context_length: 150000` so Hermes can budget long agent sessions correctly.
* Policy rules attached to your API key apply to every Hermes request. See [Policy Gateway](/policy-gateway/overview).
* The live model list is available from `GET /v1/models`. See [models](/models).
