> ## 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](/agents/hermes-agent).
</Note>

[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/api_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`.
</Note>

## 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

<CardGroup cols={2}>
  <Card title="AI Providers" icon="plug" href="https://hermes-agent.nousresearch.com/docs/integrations/providers#deepinfra">
    Hermes' provider overview, including the DeepInfra section.
  </Card>

  <Card title="Configuration" icon="gear" href="https://hermes-agent.nousresearch.com/docs/user-guide/configuration">
    The full `config.yaml` reference.
  </Card>

  <Card title="Chat Completions" icon="comments" href="/chat/overview">
    DeepInfra's OpenAI-compatible API.
  </Card>

  <Card title="NVIDIA OpenShell" icon="shield-halved" href="/integrations/openshell">
    Run Hermes in a sandbox whose only allowed destination is DeepInfra.
  </Card>
</CardGroup>

<Note>
  Tested with Hermes Agent v0.21.5 (2026.9.24).
</Note>


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