Scripts
A skill can include scripts that the agent runs as part of a task, which is handy for work that’s awkward to do in conversation, like transforming data, generating a file, or crunching numbers. Scripts are optional and aimed at more technical authors; many skills are instruction-only.
Adding a script
In the skill editor, open the Files panel, find the scripts folder, and choose Upload. Then reference the script from your instructions by name so the agent knows when to run it. For example: Run scripts/format_report.py to build the summary table from the raw data.
Supported languages are Python, Bash, and JavaScript.
How scripts run
Scripts execute in a sandboxed container that belongs to the conversation, not on your machine and not inside the agent’s own reasoning. The agent runs a script and reads back its output; the script’s code never enters the agent’s context, only its result. That keeps script-heavy skills fast and predictable.
Dependencies
Many common libraries are preinstalled, so a lot of scripts run with no extra setup. These include pandas, numpy, and matplotlib, plus tooling for working with PDF, Word, Excel, and PowerPoint files.
If your script needs something else, you have two options:
- Include a manifest: add a
requirements.txt(Python) orpackage.json(JavaScript) alongside your script, and its dependencies are installed when the skill runs. - Install in the instructions: have the instructions tell the agent to install a package (for example,
pip install <package>) before using it.
Tips
- Keep each script focused on one job, and reference it clearly from your instructions so the agent knows exactly when to run it.
- Lean on the preinstalled libraries where you can, since it keeps the skill portable and avoids relying on run-time installs.
- To talk to an external service like a CRM or chat tool, use an Autohive Action rather than writing a script that handles credentials and API calls itself.