Skip to main content
Version: Peki

Publishing and versions

Every agent has one draft that you edit and a history of versions your customers have talked to. Customers only ever talk to the published version. Your edits stay in the draft, and you can test them freely, until you click Publish. Every publish is kept, so you can compare any two versions and bring an earlier one back.

Draft and published​

  • The draft is what you edit on the agent's pages: prompt blocks, model, memory, guardrails, handoff, team, web search, context, fallback reply, tools, Functions, skills, knowledge sources the agent uses, record tables and starter questions. The Test panel always answers with the draft.
  • The live version (marked live) is what customers on every channel talk to.
  • Previous versions are earlier publishes. They stay in history and can be restored.

When you publish draft v4, it becomes live version v4, the old live version becomes previous, and a new draft v5 starts with the same content as v4. Version numbers only go up.

What's not versioned​

Some things apply at once, without a publish, and restoring an old version doesn't bring them back:

Not versionedWhere it's managed
Variable valuesSettings → Variables. See Variables and secrets.
Secrets (API keys)Settings → Secrets
The agent's nameAgent settings
Record data (the rows themselves)Records. Table settings are versioned, the records aren't.
Channel settingsChannels
Business hoursSettings → Business hours

Saving the draft​

Edits on a page aren't saved as you type. The header shows where you stand, for example: Draft v4 · 2 unpublished changes · Unsaved changes.

  • Click Save, or press ⌘S (Ctrl+S on Windows), to save the draft.
  • Test and Publish save first, so they always use what's on screen.
  • If you try to leave a page with unsaved edits, Peki asks Leave without saving?
  • Every block needs a title and text before the draft saves. Until then the header shows Every block needs a title and text before the draft saves.

If the Copilot or a teammate changed the draft while you were editing, your save is refused instead of overwriting their work. The page reloads the latest draft and shows The draft changed (Copilot or a teammate); reloaded. Your unsaved edits on that page are lost, so make them again.

Publish​

What Publish requires​

RequirementWhyIf it's missing
A paid planPublishing is how an agent goes live. On the free plan you can build, test and connect channels, but not publish.The Publish button shows a lock. Clicking it opens Settings → Plan & credits, and the message is Publishing needs a package.
The Editor role or higherViewers can't change agents.The page is read-only.
A savable draftEvery block needs a title and text; settings must be valid, for example Allowed topics filled in when Stay on topic is on.The button is disabled.
Something to publishAfter the first publish, there must be at least one change since the live version.The button is disabled and the header says No changes since v4.
A valid teamEvery member of the agent's team must exist, be published itself and have a description.Publish fails and names the member and the problem. See Agent teams.

See Plans and credits and Members and roles.

How to publish​

  1. Make your changes and test them in the Test panel. See Testing.
  2. Click Publish in the page header. Once an agent is live, the button counts your changes, for example Publish (3 changes).
  3. In Publish v4, optionally describe what changed in What changed? (optional), up to 200 characters. It appears in the version history, like a commit message.
  4. Click Publish. Press ⌘Enter (Ctrl+Enter) to publish from the text box.

The change Goes live on every connected channel right away.

tip

Write a note every time, even a short one like "Added return policy for sale items". When something changes in your conversations a week later, the history tells you what changed and who changed it.

The Copilot can publish for you too. It always asks first with an approval card, and publishes only when you approve. See Working with the Copilot.

How changes are counted​

The count on the button and in the header is the number of things that differ from the live version, the way a person would count them: each added, removed or edited block, each changed tool, Function, skill or table, and each changed setting, such as the model, temperature, memory, guardrails, handoff, web search or the fallback reply. Reordering blocks without other edits counts as one change.

Versions​

The Versions section, at the bottom of the Instructions page, is the agent's history, newest first.

The draft row​

The first row is the draft, for example v5 draft, with a summary of how it differs from the live version, such as +1 block · 2 edited · model, memory. It shows:

  • restored from v2, if the draft's content was restored from an earlier version,
  • Discard unsaved changes, if you have unsaved edits; it puts the page back to the saved draft,
  • Compare with live to open the full comparison. Before the first publish it says Nothing is live yet — everything below is new.

Compare with live also appears in the page header whenever the draft differs from the live version.

Published versions​

Each published version shows:

  • its number, with live on the current one,
  • the publish note, or No message,
  • a summary of what changed compared with the version before it (First version for v1),
  • who published it and when.

Click a row, or Show changes, to open its comparison with the version before it.

Reading a comparison​

A comparison lists every difference, grouped:

GroupWhat you see
Prompt blocksEach block marked Added, Removed, Edited or Moved. Edited text is compared word by word, with removed words struck out and added words highlighted. Changes to a block's Title or Condition are shown too.
SettingsEach changed setting with its value before and after: model, fallback, temperature, memory, new session after (hours), customer profile, date and time, fallback reply, personal data, prompt injection, stay on topic, never reveal, offensive messages, handoff, web search and starter questions.
Tools and FunctionsEach one added, removed or Changed, with the fields that changed.
SkillsEach skill added, removed or changed.
TablesEach record table added, removed or changed, with the settings that changed.
Team membersEach member added, removed or changed.

No differences means the two versions are the same.

Restore an earlier version​

Restoring works like a revert: it copies an earlier version's content into the draft. History stays as it is, and nothing goes live until you publish.

  1. In Versions, open the version you want.
  2. Click Restore to draft.
  3. Confirm with Restore. If you have unsaved edits, the dialog warns Your unsaved changes will be lost.
  4. Check the draft, test it, then Publish. The restored content goes live as a new version with the next number. If v6 is live and you restore v3, you publish v7 with v3's content.

Record tables are an exception. A table the restored version didn't have stays in the draft, so restoring never orphans records your agent has collected.

warning

Restoring replaces the whole draft, including edits you saved but haven't published. Publish or note down anything you want to keep first.

What customers see during a publish​

  • No downtime. The switch from the old live version to the new one happens in one step. There's no moment when the agent is offline or half updated.
  • The next reply uses the new version. A reply that's already being written when you publish finishes with the version it started with. Every reply after that uses the new one.
  • Conversations continue. Customers stay in the same conversation and the agent keeps its memory of earlier messages. Nothing visible happens to them, apart from the agent now following your new instructions.
  • Every channel at once. The website chat, Telegram and the Sessions API all switch together.
  • Before the first publish, the agent doesn't answer customers on any channel. The website chat shows "This chat is not available right now.", and the Channels page warns Customers chat with the published version, and this agent hasn't been published yet.

Agents on a team call the other agents' published versions. Publishing one member changes the answers it gives every agent that asks it. See Agent teams.