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

# Hermes Agent

> Use DeepInfra models with Hermes Agent through its built-in DeepInfra provider.

> [!NOTE]
>
> Don't want to host it yourself? DeepInfra can run Hermes for you — see [Hosted Agents: Hermes-Agent](https://docs.deepinfra.com/agents/hermes-agent.md).

[Hermes Agent](https://github.com/NousResearch/hermes-agent) is a self-hosted, self-improving autonomous agent by Nous Research. DeepInfra is a built-in Hermes provider: set `provider: deepinfra`, export your key as `DEEPINFRA_API_KEY`, and pick any [LLM from our catalog](https://deepinfra.com/models/text-generation). Hermes reads the model list, context lengths and pricing live from the DeepInfra catalog, so there is no base URL or context length to configure.

## Configure `~/.hermes/config.yaml`

```yaml theme={null}
model:
  default: deepseek-ai/DeepSeek-V4-Flash
  provider: deepinfra
```

Get your API key from the [Dashboard](https://deepinfra.com/dash/keys) and export it, or put the same line in `~/.hermes/.env`:

```bash theme={null}
export DEEPINFRA_API_KEY="<your DeepInfra API key here>"
```

> [!NOTE]
>
> * The DeepInfra model id passes through verbatim in `default` — no reformatting needed.
> * Reasoning is controlled through DeepInfra's `reasoning_effort` field, so `agent.reasoning_effort`, `/reasoning <level>` and `--reasoning` work in both directions: an effort turns thinking on for models that default off (DeepSeek-V4.x), and `/reasoning none` turns it off for models that default on.
> * Hermes needs roughly 64k of context for agent functionality. Check a model's window and pricing via [`/v1/openai/models?filter=with_meta&sort_by=hermes`](https://api.deepinfra.com/v1/openai/models?filter=with_meta\&sort_by=hermes).
> * On a Hermes release older than the built-in provider, use `provider: custom` with `base_url: https://api.deepinfra.com/v1/openai`, `api_key: ${DEEPINFRA_API_KEY}` and an explicit `context_length`.

## Run it

```bash theme={null}
hermes
```

To try a model without editing the YAML, pass the provider and model on the command line:

```bash theme={null}
hermes chat --provider deepinfra -m deepseek-ai/DeepSeek-V4-Flash -q "Say hello in one word."
```

## Learn more

> [card] [AI Providers](https://hermes-agent.nousresearch.com/docs/integrations/providers#deepinfra)
>
> Hermes' provider overview, including the DeepInfra section.

> [card] [Configuration](https://hermes-agent.nousresearch.com/docs/user-guide/configuration)
>
> The full `config.yaml` reference.

> [card] [Chat Completions](https://docs.deepinfra.com/chat/overview.md)
>
> DeepInfra's OpenAI-compatible API.

> [card] [NVIDIA OpenShell](https://docs.deepinfra.com/integrations/openshell.md)
>
> Run Hermes in a sandbox whose only allowed destination is DeepInfra.

> [!NOTE]
>
> Tested with Hermes Agent v0.21.5 (2026.9.24).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.