As its name implies, this component is used to execute code generated from LLM, it requires permission to kms:decrypt
action.
A script is allowed to save or interact with files in tmp/
directory.
To start Code Executor server, you can use the below command:
$ main.py [optional args]
[optional args]
can be any combination of:
--host
: host url, default value localhost
--port
: host port, default value 8080
--kms
: Amazon KMS key id or alias, this key is used to decrypt the script to be executed.
Code Executor has the following API endpoints:
/ping
(GET): A standard health check endpoint.list_kernel_specs
(GET): Lists all available kernels that can be used for execution/execute_code
(POST): Execute encripted script.- Required parameters:
code
: script encrypted with kms key.
kernel_name
: name of kernel to run the code
- Required parameters: