How to use a specific conversation agent via conversation API?

I’m trying to integrate the home assistant “assist” or “conversation” features using the websocket or REST api.

So far I was able to get conversation working with the websocket API with messages like this:

sendMessagePromise({
        type: 'conversation/process',
        text: "turn off all lights",
        language: 'en',
      })

And it will correctly turn off all lights.

However the conversation message, seems limited to only using the default “home assistant” conversation agent.

I have my own agent set up in home assistant using chatGPT conversation integration, and it is set ot the default and works fine in the home assistant dashboard, but the conversation API does not seem to use it and I can’t find any way to set the agent to use the assist or openAI conversation integration.

I have tried reloading conversations, and restarting home assistant.

I would expect to be able to pass an argument like:

conversation_engine: "conversation.chatgpt"

But that doesn’t seem to be implemented? Is this a missing feature, or can anyone help me figure out how to use the openAI conversation via the websocket or REST APIs?

You got pretty close, I got this working by providing an agent_id property it’s not documented in the conversation api but seems to work.

You can get the coversation agent id by creating an action in the developer tools with the agent you want, then switch to yaml to get the id.