# Editor Mode & Publish

When creating your agent on the canvas in the AI studio, you will do so in **Editor mode**.&#x20;

Once you are ready to connect your agent to the live environment, where any external user can reach your agent, you will have to **publish** the agent.&#x20;

{% hint style="info" %}
*This is applicable for all channels except for* [*<mark style="color:purple;">HTTP</mark>*](https://studio.docs.ai.vonage.com/http/working-with-http-agents) *and WhatsApp agents. For HTTP agent types, you will publish without having to add a phone number. To learn how to publish a WhatsApp Agent please refer to* [*<mark style="color:purple;">this page</mark>*](https://studio.docs.ai.vonage.com/whatsapp/get-started#add-a-phone-number-to-your-whatsapp-agent)*.*&#x20;
{% endhint %}

![](/files/yxv0a7oddV8XTJ4xE9Zp)

## How to publish your Telephony and SMS agents

To publish your agent, click on the "**Publish**" button with the little rocket on the top right of the page. For all channels except HTTP, you will be prompted to add a phone number.&#x20;

{% hint style="danger" %}

### **How to purchase a phone number**

*To add a phone number to your agent, you have to purchase a phone number on the API Dashboard. Sign up for a* [*<mark style="color:purple;">Vonage API Account</mark>*](https://dashboard.nexmo.com/sign-up) *and once you have created an account, you are able to purchase one or more phone numbers.*&#x20;

*The numbers you purchased will show in the studio when publishing your agent under "Phone Settings".*&#x20;

***Please ONLY link your agent with a phone number on the Studio application, never from the API Dashboard.***
{% endhint %}

After having added a phone number, please click on "next". You will be prompted to give your version a name and a short description of the change.&#x20;

![](/files/PCMnngElkhhqHpU2BOme)

{% hint style="warning" %}

#### ***Once published, you will have two versions of your agent:***&#x20;

*The **published version** in the live environment that you and external users can interact with, and the **editors' version**, where you can make adjustments.*&#x20;

***Every time you would like to publish a new version of your agent, please click "publish" again.***
{% endhint %}

## How to change to a previous version

In **Editor mode**, if you'd like to have a look at previously published versions, click on the three dots on the top of the page next to the name of the agent and select **"**&#x76;ersions".

The **published version** will open in the same window. On the right, you will see all versions you published until now. You can either open an old version in the editor, view the description, or un-publish a currently active version to revert back to a previous version.&#x20;

If you want to revert to a previous version, you can click on the three dots next to a version and select "Open in editor".&#x20;

Once you want to return to the editor mode, just click on "Back to Editor" on the top left.&#x20;

{% hint style="warning" %}
*If you would like to test new changes made to your agent via telephony, please make sure to publish so your users can interact with the most updated version of your agent.*&#x20;
{% endhint %}

![](/files/s0sOvnv47fTyIFfx04oq)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://studio.docs.ai.vonage.com/ai-studio/editor-mode-and-publish.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
