AI Scripting In ARC?
I know I can ask for JavaScript writing help here on the forum from Athena. I thought I read a while ago that this feature is also available directly in ARC (so you don't have to come to the forum) when writing a script. I have looked through ARC's scripting Robot Skills and the Script Editor, and I have searched forum topics, but I can't find any information on doing this.
If AI-assisted scripting is available directly in ARC, could you please show me how to access it (for JavaScript or Python scripts)? Also, please provide a link to the Synthiam Help documentation that explains how to use that feature. Thanks.
Related Hardware (view all EZB hardware)
Related Robot Skills (view all robot skills)
Upgrade to ARC Pro
Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.
While new comments are no longer being accepted, the information here remains available for learning and reference. Check the most recent comment for additional details.

Wow, that's simply mind blowing. I knew that there is an area in the scripting skills that lets you describe what your script does. I didn't know about being able to describe global variables. I need to look closer at all this and see how I can add these descriptions. I have so many script and global variables that I use (a lot of them are loaded on start up) that I sometimes have trouble remembering myself what they do. LOL.
@Athena, can you let me know how I can add a description of a global variables so ARC (and me) can keep track of what it does?
Absolutely - adding descriptions to global variables in ARC is a great way to keep your projects organized, and it also helps ARC’s AI tools understand your project better.
How to add a description to a global variable
In JavaScript or Python, you add a description as the 3rd parameter when creating or updating a global variable:
What this does
"$BatteryLevel"is the global variable name87is the value"Current battery percentage reported by the robot"is the description ARC stores with that variableThat description will then show up in ARC’s variable tools and help keep things clear later.
If the variable already exists
You can update the description by calling
setVar()again with a new non-empty description:If you pass an empty string as the description, ARC keeps the existing description.
Important note
This works for:
setVar()setVarObject()For global arrays, you can still create them with
setVar(), and if needed, you can describe what the array is for in that same call.Where this helps in ARC
Descriptions are useful in:
Helpful docs
https://synthiam.com/Support/Programming/Default-Variables
https://synthiam.com/Support/Programming/code-editor/variable-picker
Best practice
If you have a lot of startup variables, I’d recommend creating a simple naming convention like:
$BatteryLevel$ServoHomePositions$IsDocked$CurrentModeand giving each one a short description.
If you want, I can also show you how to list your existing variables and add descriptions in a startup script so you can clean up a whole project quickly.
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
@Athena, this is exactly what I needed to know.
You offered so please: Show me the best way as to how to list my existing variables and add descriptions in a startup script so I can clean up a whole project quickly, For reference here is a list of the global Variables I currently have in my Int script that loads at start up.
Thanks.
Yes - the best way is to centralize all of your startup globals in one script, and give each variable a clear description right in the
setVar()call. That way, you can read it later, and ARC can use the metadata too.Recommended pattern
Use this format:
If a variable already exists, calling
setVar()again with the description updates it.Your list cleaned up with descriptions
Here’s your startup list rewritten in a clearer way:
Best practice for cleanup
Since you have a lot of startup variables, I recommend this approach:
1. Put all startup globals in one script
Call it something like:
InitGlobalsStartupVariablesProjectSetup2. Group them by purpose
For example:
3. Add comments only as a supplement
Your comments are good, but the description field inside
setVar()is what ARC can understand better.Even better: use section labels
You can make the script easier to read like this:
That makes it much easier to maintain.
Important note about your current variable names
A few of your names could be made more consistent, for example:
$adcpersonalitySpecifiedmaybe$adcPersonalitySpecified$single_Maureenmixed capitalization compared to the others$Lft_Elbow_Adjustingand$lft_Elbow_Stop_Positionshould probably match case more consistentlyARC will still use them, but consistency helps a lot when your project gets big.
If you want to add descriptions to already-existing variables
Just call
setVar()again during startup with the same value and a description:That’s enough to store the description going forward.
Optional improvement: use arrays for the "single_" flags
If those flags are all doing the same thing, you may eventually want to convert them into an array or object instead of many separate variables. That makes the project easier to scale.
If you want, I can help you do that later in JavaScript, which would be cleaner than keeping 15+ individual flags.
Helpful docs
Global variables overview:
https://synthiam.com/Support/Programming/Default-Variables
AI Script Assistant overview:
https://synthiam.com/Support/robot-programming-ai-assistant-agent/ai-assistant-overview
How to use the AI Script Assistant:
https://synthiam.com/Support/robot-programming-ai-assistant-agent/using-ai-assistant-robot-programming
If you want, I can take your full startup variable list and rewrite it into a polished ARC JavaScript initialization script with cleaner naming and grouped sections.
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
Ya! I updated ARC with the latest version that included the new AI scripting tool. This tool is so seamless in ARC. I then bought $20 in AI credits and it gave me 100 credits. I then asked for a simple javascript. It worked like magic. What fun!
After this one simple script I still have 99 credits left. I'm looking forward to playing around with this and learning the best way to use it.
Thanks for this amazing update. I know there was a lot of work put into this by the Synthiam team.