Skip to main content

Script Copilot

Every AutessaScript editor in Autessa carries its own copilot: an Autobot chat tab that writes and fixes scripts you can apply in place, and a Docs tab with a searchable reference of every helper and built-in — so you never leave the editor to look something up.

What it's for​

AutessaScript powers the programmable corners of the platform, and the copilot removes the friction of writing it. Ask for a script in plain language, paste an error you're getting, or select a confusing block and ask what it does — the copilot answers with runnable code you can apply to the editor in one click.

The copilot lives wherever the AutessaScript editor appears:

  • Script tools — a tool whose type runs a script (Tools page → tool config editor).
  • Webhook handlers — request-validation and payload-transformation scripts.
  • Computed columns — AutessaDB columns whose values are calculated by a script.

Click the Autobot toggle at the top-right of any script editor to open the side panel, then switch between the Autobot and Docs tabs.

Key concepts​

  • Selection-aware chat — select code in the editor before asking and a Selection chip attaches it to your question, so "why does this fail?" targets exactly the lines you highlighted.
  • Apply to Editor — when the copilot answers with a code block, an Apply to Editor button writes it into the editor, replacing the current script; the button flips to Applied once it lands. Nothing changes until you click — and the applied script still isn't saved until you save the resource itself.
  • Docs tab — a Search documentation box filters three sections: Helpers (the platform objects your script can call), Built-ins, and Notes. Expanding an entry shows its description and method signatures. This is the same material as the full AutessaScript reference, inlined next to your code.
  • Clear conversation — the chat keeps context within your editing session; use the clear link to start over when switching topics.

How to write a script with the copilot​

  1. Open the script editor (tool config, webhook handler, or computed column) and click Autobot.
  2. Describe what the script should do, including its inputs and what it must return — return-value contracts differ by context (a webhook validator returns true or false; a transformer returns an object; a computed column returns the cell value).
  3. Review the generated code. Check the Docs tab if you want to verify a helper's signature.
  4. Click Apply to Editor, then test the surrounding resource and save.

How to fix a failing script​

  1. Select the failing section in the editor (or leave nothing selected to include the whole script).
  2. Paste the error message or describe the wrong behavior in the Autobot tab.
  3. Apply the corrected version and re-run.