code-tools
Read, change, and test the Code tools of your AI Agent. A Code tool runs a short Python snippet to transform data during a conversation. The alias is code-actions.
Commands
Examples
Create a Code tool with one input that reads a variable and one input that the AI Agent gives:
Edit the source of a Code tool. Write the source to a file, change it, then send it back:
Run a Code tool with test inputs:
Let Code tools call an API:
Details
createneeds--file,--name, and--description. The API refuses source over 64 KB and a name that another tool uses.update --inputsandupdate --outputsreplace the full list.- In an output,
variable_idis the 24-character ID of a variable, not its name.keyis a JMESPath expression into the result. testruns like a live call.fetch()sends real requests, and secrets resolve.testneeds the Owner or Admin role. The API allows 10 test runs each minute. A failed run gives a non-zero exit code.- An allowed domain is a scheme and a host, with an optional port. A leading
*.allows one level of subdomain. Anhttps://domain does not allowhttp://requests. - Do not put a secret in the source. Use an environment variable for each secret.
For every option of a command, run it with --help, for example adacli acme code-tools create --help.