Skip to main content

Generating a Template with Koodisi AI

Koodisi AI is an AI-powered assistant embedded directly into the Koodisi workspace. It can write a template from a description, rewrite one you already have, and save templates for you from the chat panel. You review everything before it is published.

Before you begin​

  • Koodisi AI must be available to your organization. If Ask KoodisiAI is greyed out in the template editor, hover over it for the reason. If it is missing, it is not available for your organization.
  • For the chat assistant, switch the chat panel to Build. In Ask mode the template assistant is not used, so it neither generates nor saves templates. When you ask it to save, it proposes switching to Build.

Generate in the template editor​

  1. Select Settings > Workspace > Templates.
  2. Select Create Template, or select the edit icon on an existing template.
  3. Select a Type. Koodisi AI writes for the type you selected.
  4. Select Ask KoodisiAI.
  5. In the box, describe the template. The label reads Describe the type template you need when the editor is empty, and Describe how to change this type template when it has text. For an HTTP (HTML) template the type reads HTTP.
  6. Select Generate, or press Ctrl+Enter, or Command+Enter on a Mac.

While it works, the status reads Generating template…. Select Stop, or press Escape, to cancel.

When the editor is empty​

Koodisi AI writes the result straight into the editor. The status reads Written by KoodisiAI. Review it before you publish. with the check result.

  • Select Undo to clear the editor. It is available until you edit the text.
  • Select Try again to generate another result.

When the editor already has text​

Koodisi AI never replaces your text silently. The status reads Review the changes, then keep or discard them. and the panel shows Suggested changes with Current on one side and Generated on the other.

  • Select Keep to replace the editor text. You can still undo the change in the editor.
  • Select Discard, or press Escape, to keep your text.
  • Select Try again to generate another suggestion.

When either template is longer than 2,000 lines, the panel shows the new text without a comparison.

Review before publishing​

Koodisi AI can make mistakes. Read the template, check the status line for problems, and save it as a draft before you publish. Generated templates go through the same checks as typed ones, including the HTTP (HTML) security rules.

Use the chat assistant​

  1. Open the Koodisi AI chat panel and select Build.
  2. Ask for the template, for example: Write an HTML template for an order confirmation with the order number and a list of items.
  3. If the type is unclear, the assistant asks you one question.

The assistant shows the result in a card labeled Generated by AI. Review before saving. with Copy and Open in template editor. Open in template editor opens Create template with the text filled in and not yet saved. You enter the name. The button is greyed out, with a reason, when Templates is not available for your organization.

Save, update, and publish from chat​

Ask the assistant to save, create, store, or update a template. It then shows a confirmation card, for example Create template "name" and save as a draft?, with the type and level. The confirm button reads Create or Update followed by the template name. The assistant writes only after you confirm.

RuleWhat it means
Draft by defaultA saved template is a draft. A draft is not used by any activity until it is published.
Publish only when askedSay that you want it published. The card then reads Create template "name" and publish as v1?, or Update template "name" and publish as vN*?*.
LevelA new template is saved at the workspace level unless you ask for the organization. An update keeps the template's level.
NameIf you give no name, the assistant asks for one.
Same nameIf a template with that name exists at the level, the assistant offers to update it.
UpdatingThe assistant never edits a published version. It saves a draft, or publishes the next version. The card adds Replaces the existing draft when a draft exists.
No delete or promoteThe assistant tells you to use Settings > Workspace > Templates for those.

After a save, the chat shows a status line such as Created template "name" as a draft (v1). or Published template "name" as v3. and an Open in Templates button.

How you know it worked​

In the editor, the generated text appears, or Suggested changes appear for review. In chat, the status line names the template and version, and the template appears in the Templates list.

When it does not work​

In the template editor:

MessageWhat to do
Describe the template you want.Enter a description.
Keep the description under 2000 characters.Shorten the description.
The current template is too long to refine. Clear it to generate a new one.Clear the editor, or edit the text yourself. Existing text over 100,000 characters cannot be refined.
That doesn't look like a template request. Describe the template you want.Describe the template's purpose and content.
Couldn't generate a valid template. Try rewording the description.Add detail or simplify the request.
Couldn't generate the template. Check the description and try again.Check the description, then select Try again.
You've reached the daily AI limit. Try again later.Try again later.
AI features are turned off right now. Try again later.Try again later, or contact your organization administrator.
AI template generation isn't available for your organization.Contact your organization administrator.
Couldn't generate the template. Sign in again and retry.Sign in again, then retry.
The AI assistant isn't responding right now. Try again in a few minutes.Select Try again after a few minutes.

In chat, the assistant explains a failure in its own words. The save step can report that a template with that name already exists, that you lack access, that the template no longer exists, or that it could not confirm the save. In the last case, check Settings > Workspace > Templates before you try again. A template that is too large to show in chat, or that uses an external partial, is reported the same way. Use Ask KoodisiAI in the template editor for a larger template.

Next steps​