Publishing
A validated draft can be published. The published agent is visible to every developer and runnable by users, and the draft is retired.
Versions
A publish that changes the definition creates a new version of the agent. Past versions are kept for 7 days and can be viewed from the agent's page. The paid service has no such limit. A publish that changes only the agent meta, that is the prompts, the const, the title or the run limits, keeps the version number; the agent's next run uses the new values. A past version is shown without prompts.
Every publish writes an entry in the audit log, naming the agent, the version and the fields that changed.
When the published agent changed after the draft was made
The title and the run limits can be changed on the agent's page, and another developer's draft can publish new prompts or a new const without a new version. A draft made before such a change still carries the old values. Publishing it first shows which fields differ between the draft and the agent, prompts listed one by one. You can merge those changes into the draft, or publish again to replace them with the draft's values; the changes made on the agent are then lost. In the REST API the second publish carries overwrite.
Describing the agent
After publishing, describe the agent in plain English so that search can find it; see Describing an agent. An agent without a description can be run by name, but search cannot find it.
When several developers change the same agent
Developers who create drafts of the same published agent each work on their own copy. A draft remembers the version it was created from. When someone else publishes a new version of the definition, the draft is behind, and it cannot be published until it is merged.
The next time the draft is opened, the UI says so and offers to merge. Search2o Cloud produces a merged definition from the draft and the new version, saves it to the draft, and marks the draft as based on the current version. The merge clears the draft's validation, so the developer reviews the merged definition, validates it, and publishes it like any draft. If the agent has not changed since the draft was created, there is nothing to merge and publishing proceeds. In the REST API the same step is the mergeDraft call, offered when getDraft reports that the agent has changed.

