Skip to main content

Environments

Environments are used to store predefined code snippets and docker images for the use of coder agents with code execution.

Environments are automatically choosen based on what the user is trying to accomplish. For example, if the user is trying to perform some data analysis over a set of csv files using python code, if there is an environment with applicable libraries installed, that environment will be used.

In case no environment is found, the agent will use the default environment.

Environments can only be setup using python as programming language for now.

Warning

The code environments are available only for Enterprise plans. Please contact us for more information.

Code environment default setup

Available libraries:

  • numpy
  • pandas
  • matplotlib
  • PyPDF2
  • pdfminer
  • openpyxl
  • xlsxWriter
  • python-docx
  • python-pptx
  • xmltodict
  • html2text
  • matplotlib
  • seaborn
  • scikit-learn
  • cmake
  • pydantic
  • Ppillow
  • reportlab
  • pytesseract
  • fpdf
  • tabula-py
  • plotly
  • prophet
  • kaleido
  • pyyaml
  • lxml
  • datetime
  • statsmodels
  • folium

Max runtime memory: 10 GB

Max runtime duration: 15 minutes

Max runtime storage: 10 GB

Environments can be created and or edited from the following menu: Settings > Environments > Create

Create a environment

  1. Click on the Create button.
  2. Fill in the code execution env. name and description.
  3. Remote environment name (optional) - this will allow the agent to use a custom execution environment with the enterprise customer libraries and setup.
    1. This can include also credentials and access to other remote VMs.
  4. Code execution instructions (optional) - this will guide the agent on how to generate and execute the code.
  5. Predefined code snippet (optional) - this will allow the agent to use a predefined code snippet to steer the generation of the code towards a predefined implementation.
  6. Click on the Save button to create the environment.

Additional options

Secrets to inject in execution environments: When enabled the agent associated to the environment will be able to use secrets in the code. This is useful for environments where the code needs to interact with external services that require authentication or 3rd party libraries that require a license.

Execute as static script: When enabled the agent associated to the environment will execute the code as a static script. This means that the agent will not be able to modify the code after it has been generated. This is useful for environments where the code needs to be exactly the same regardless of the nuances of the instructions

Allow external API calls: When enabled the agent associated to the environment will be able to make external API calls. This is useful for environments where the code needs to interact with external services.

Note

In order for the code environment to be used, it needs to be assigned to the agent. This can be done from the agent execution environments settings once code exeuction is enabled.

Description

The coding agents with Code execution enabled will use the description of the environment to decide if it is appropriate to use code and secrets to accomplish the task required