Editor Agent Configuration for US Domain or VPC

This section guides users operating Encord with the US domain (https://api.us.encord.com) or within their private Virtual Private Cloud (VPC) on how to configure their editor agents.


STEP 1: Set the ENCORD_DOMAIN Environment Variable

Define the Encord API domain, not the front-end application domain.

  • Running Locally:
    export ENCORD_DOMAIN=https://api.us.encord.com
    
  • Deploying with a GCP Cloud Function: Create a GCP secret and pass in the domain:
    --set-secrets="ENCORD_SSH_KEY=YOUR_GCP_STORED_KEY:latest,ENCORD_DOMAIN=YOUR_GCP_STORED_DOMAIN"
    

STEP 2: Set the ENCORD_SSH_KEY or ENCORD_SSH_KEY_FILE Environment Variables

Provide your SSH key for authentication.

  • Running Locally:
    export ENCORD_SSH_KEY_FILE="path/to/your/key"
    
    or
    export ENCORD_SSH_KEY="<your key>"
    
  • Deploying with a GCP Cloud Function: Create a GCP secret and pass in the key:
    --set-secrets="ENCORD_SSH_KEY=YOUR_GCP_STORED_KEY:latest,ENCORD_DOMAIN=YOUR_GCP_STORED_DOMAIN"
    

STEP 3: Pass the Front-end Domain to the Editor Agent Declaration

Pass the Encord front-end domain into the @editor_agent declaration to ensure the function respects Cross-Origin Resource Sharing (CORS):

@editor_agent(custom_cors_regex="https://app.us.encord.com") # Or the domain of your custom FE