Setup Mistral vibe in Zed using ACP

Read as Markdown

Mistral released a new CLI tool vibe to perform coding tasks in the terminal and code editors that support the ACP protocol.

Mistral Vibe is a command-line coding assistant powered by Mistral's models. It provides a conversational interface to your codebase, allowing you to use natural language to explore, modify, and interact with your projects through a powerful set of tools.

You can use the Zed editor to utilize the vibe agent.

Step 1: Install Vibe

uv tool install mistral-vibe to install the tool. Other ways to install can be found in GH.

This installs two CLI commands, vibe and vibe-acp. Source

Step 2: Set up Mistral API Key

Run vibe to set up the Mistral API key, and you can test if the API key is working by asking a simple prompt.

mistral vibe working check

Step 3: Update zed settings

Go to ~/.config/zed/settings.json and under the agent_servers key, add the command to invoke vibe-acp to use it.

"agent_servers": {
    "vibe": {
      "command": "/path/to/vibe-acp",
      "args": [],
      "env": {}
    }
    ...
    }

Step 4: Try out vibe

New thread in zed

Under New Thread, select the vibe agent and start the conversation.

Example: Write a function to calculate if the given year is a leap year in Python?

If the vibe-acp path is properly set up, then you should see the response. Otherwise, an error will be shown.

Step 5: Look at the ACP interaction logs

Zed ACP logs for mistral vibe

Now, open the ACP dev log by pressing Cmd + Shift + P. The latest ACP logs should be displayed and look like the following:

[
  {
    "_direction": "outgoing",
    "_type": "request",
    "id": 0,
    "method": "initialize",
    "params": {
      "protocolVersion": 1,
      "clientCapabilities": {
        "fs": {
          "readTextFile": true,
          "writeTextFile": true
        },
        "terminal": true,
        "_meta": {
          "terminal_output": true,
          "terminal-auth": true
        }
      },
      "clientInfo": {
        "name": "zed",
        "title": "Zed",
        "version": "0.214.6"
      }
    }
  },
  {
    "_direction": "incoming",
    "_type": "response",
    "id": 0,
    "method": "initialize",
    "params": {
      "agentCapabilities": {
        "loadSession": false,
        "promptCapabilities": {
          "audio": false,
          "embeddedContext": true,
          "image": false
        }
      },
      "agentInfo": {
        "name": "@mistralai/mistral-vibe",
        "title": "Mistral Vibe",
        "version": "1.1.1"
      },
      "authMethods": [
        {
          "_meta": {
            "terminal-auth": {
              "command": "/Users/kracekumar/.local/share/uv/tools/mistral-vibe/bin/python",
              "args": [
                "/Users/kracekumar/.local/bin/vibe-acp",
                "--setup"
              ],
              "label": "Mistral Vibe Setup"
            }
          },
          "description": "Register your API Key inside Mistral Vibe",
          "id": "vibe-setup",
          "name": "Register your API Key"
        }
      ],
      "protocolVersion": 1
    }
  },
  {
    "_direction": "outgoing",
    "_type": "request",
    "id": 1,
    "method": "session/new",
    "params": {
      "cwd": "/Users/kracekumar/code/xyz",
      "mcpServers": []
    }
  },
  {
    "_direction": "incoming",
    "_type": "response",
    "id": 1,
    "method": "session/new",
    "params": {
      "models": {
        "availableModels": [
          {
            "modelId": "devstral-2",
            "name": "devstral-2"
          },
          {
            "modelId": "devstral-small",
            "name": "devstral-small"
          },
          {
            "modelId": "local",
            "name": "local"
          }
        ],
        "currentModelId": "devstral-2"
      },
      "modes": {
        "availableModes": [
          {
            "description": "Requires user approval for tool executions",
            "id": "approval_required",
            "name": "Approval Required"
          },
          {
            "description": "Automatically approves all tool executions",
            "id": "auto_approve",
            "name": "Auto Approve"
          }
        ],
        "currentModeId": "approval_required"
      },
      "sessionId": "55f1ad19-f502-4e09-bd14-8816adc61a02"
    }
  }
  
  ...

Enjoy hacking the ACP and vibe coding!