Use Prime Agent with open models

Add Munito AI to Prime Agent as a custom provider, and run open models such as GLM-5.3-Flash in the terminal or in one command.

Prime Agent runs open models on Munito AI through a custom provider that calls the OpenAI-compatible Chat Completions API. Create an API key. Export the key as MUNITO_API_KEY:

export MUNITO_API_KEY=munitoai_...

Add this configuration to ~/.prime/agent/models.json:

{
  "providers": {
    "munito": {
      "name": "Munito AI",
      "baseUrl": "https://api.munito.ai/inference/v1",
      "api": "openai-completions",
      "apiKey": "MUNITO_API_KEY",
      "models": [
        {
          "id": "zai-org/glm-5.3-flash",
          "name": "GLM-5.3-Flash",
          "reasoning": true,
          "contextWindow": 1048576,
          "maxTokens": 131072,
          "compat": {
            "sendSessionAffinityHeaders": true
          }
        }
      ]
    }
  }
}

Start Prime Agent in your project folder:

prime-agent --provider munito --model zai-org/glm-5.3-flash

The command prime-agent -p --provider munito --model zai-org/glm-5.3-flash "<task>" runs one task without the terminal UI, and prints the answer. apiKey names the environment variable that holds the key, so the file holds no key. contextWindow tells Prime Agent the context window of GLM-5.3-Flash, 1,048,576 tokens, so that it compacts the conversation before the window is full. prime-agent model list munito lists the models of the provider.

Prime Agent sends the session ID in the header x-session-affinity because of sendSessionAffinityHeaders. Munito AI then keeps the conversation on its prompt cache, see Prompt caching. Munito AI tested this configuration with Prime Agent 0.10.1. See the Prime Agent README to install it.

Use a regional host to keep processing in the EU. Replace the baseUrl with https://api.eu.munito.ai/inference/v1.

To add a model, add its ID and its contextWindow to models. The page of each chat model in the model catalog gives its model ID and its context.

Reasoning effort

GLM-5.3-Flash always reasons. "reasoning": true turns on the thinking levels of Prime Agent. --thinking high sets the level of a run, and Prime Agent sends it as reasoning_effort. Munito AI moves each level to the nearest level that the model has: low, high or max. See Reasoning models.

On this page