🤖HermesBlog
Hermes Practical Guides · Part 18/9/2026

Connect Microsoft Foundry

Connect Microsoft Foundry — easy-to-understand guide based on official docs

Think of this feature as a universal translator for your AI models—it lets Hermes Agent talk to Microsoft Foundry (and Azure OpenAI) no matter which “language” your model speaks, so you don’t have to worry about the technical details.

What’s the Big Deal?

Microsoft Foundry can host AI models that use two different “dialects” for communication:

  • OpenAI-style (like GPT-4, GPT-5, Llama, Mistral) — these use a standard chat endpoint.
  • Anthropic-style (like Claude) — these use a different message format.

Normally, you’d have to write separate code for each. But Hermes Agent’s azure-foundry provider automatically detects which format your model uses, then handles the translation for you. It’s like having a plug-and-play adapter for every model.


Before You Start

You’ll need three things:

  1. A Microsoft Foundry or Azure OpenAI resource with at least one model deployed.
  2. The endpoint URL for that deployment (found in the Azure Portal).
  3. One of these two ways to authenticate:
    • An API key (grab it from the Portal under “Keys and Endpoint”), or
    • The Azure AI User role (also called “Foundry User” in some tenants) if you want to use Microsoft Entra ID — this is the keyless method Microsoft recommends.

Quick Start: One Command

Once you have your endpoint and credentials, the setup is just one command:

hermes model

That’s it. The wizard will:

  • Probe your endpoint to see which transport it uses (OpenAI-style or Anthropic-style).
  • List available deployments so you can pick one.
  • Detect each model’s context length (how much text it can handle at once).

You don’t need to know any of the technical details — Hermes Agent figures it out for you.


What Happens Next?

After you pick a model, Hermes Agent will remember your choice. You can now use it for any task, like chatting or building agents, without reconfiguring.

If you ever want to switch models or check what’s available, just run hermes model again.


A Simple Example

Imagine you have two models in Foundry: a GPT-4 (OpenAI-style) and a Claude (Anthropic-style). With Hermes Agent, you can switch between them by running hermes model and selecting the one you want. The provider handles the different “languages” behind the scenes, so you just talk to your AI normally.


Summary & Practical Tip

In short: This feature removes the headache of dealing with different API formats. You point Hermes Agent at your Foundry resource, it figures out the rest, and you’re ready to go.

Practical tip: If you’re in a corporate environment, use the keyless Microsoft Entra ID path (the Azure AI User role) instead of API keys — it’s more secure and Microsoft’s recommended approach. Just make sure your user or service principal has that role assigned before running hermes model.

Now go connect your models — it’s literally one command away.

📖 Official Docs

This article is based on the official Hermes Agent documentation:Official docs › user-guide/foundry