From 4864ab7c2157f382144b13abd13fc5a6b3d1814d Mon Sep 17 00:00:00 2001 From: Andrea Falzetti Date: Wed, 30 Jul 2025 16:18:02 +0200 Subject: [PATCH 1/8] feat: Add environment variable support for AI agent configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds support for configuring the AI agent via environment variables, following the same pattern used for other dashboard configurations. Two configuration methods are supported: 1. Full JSON configuration via PARSE_DASHBOARD_AGENT_CONFIG - Allows complex multi-model setups - Accepts a JSON string with the complete agent configuration 2. Individual environment variables for simple single-model setups: - PARSE_DASHBOARD_AGENT_MODEL_NAME - PARSE_DASHBOARD_AGENT_MODEL_PROVIDER - PARSE_DASHBOARD_AGENT_MODEL - PARSE_DASHBOARD_AGENT_API_KEY This enhancement makes it easier to deploy Parse Dashboard in containerized environments and improves security by allowing API keys to be stored as environment variables rather than in configuration files. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- Parse-Dashboard/server.js | 23 +++++++++++++++++++++++ README.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/Parse-Dashboard/server.js b/Parse-Dashboard/server.js index 2f47489e74..b6ef967d8b 100644 --- a/Parse-Dashboard/server.js +++ b/Parse-Dashboard/server.js @@ -39,6 +39,11 @@ module.exports = (options) => { const configUserPassword = options.userPassword || process.env.PARSE_DASHBOARD_USER_PASSWORD; const configSSLKey = options.sslKey || process.env.PARSE_DASHBOARD_SSL_KEY; const configSSLCert = options.sslCert || process.env.PARSE_DASHBOARD_SSL_CERT; + const configAgentConfig = options.agentConfig || process.env.PARSE_DASHBOARD_AGENT_CONFIG; + const configAgentModelName = options.agentModelName || process.env.PARSE_DASHBOARD_AGENT_MODEL_NAME; + const configAgentModelProvider = options.agentModelProvider || process.env.PARSE_DASHBOARD_AGENT_MODEL_PROVIDER; + const configAgentModel = options.agentModel || process.env.PARSE_DASHBOARD_AGENT_MODEL; + const configAgentApiKey = options.agentApiKey || process.env.PARSE_DASHBOARD_AGENT_API_KEY; function handleSIGs(server) { const signals = { @@ -83,6 +88,24 @@ module.exports = (options) => { } ]; } + // Add agent configuration from environment variables + if (configAgentConfig) { + try { + configFromCLI.data.agent = JSON.parse(configAgentConfig); + } catch (error) { + console.error('Failed to parse PARSE_DASHBOARD_AGENT_CONFIG:', error.message); + process.exit(1); + } + } else if (configAgentModelName && configAgentModelProvider && configAgentModel && configAgentApiKey) { + configFromCLI.data.agent = { + models: [{ + name: configAgentModelName, + provider: configAgentModelProvider, + model: configAgentModel, + apiKey: configAgentApiKey + }] + }; + } } else if (!configServerURL && !configMasterKey && !configAppName) { configFile = path.join(__dirname, 'parse-dashboard-config.json'); } diff --git a/README.md b/README.md index 0b3250d33d..842c2664ad 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,11 @@ PARSE_DASHBOARD_SSL_KEY: "sslKey" PARSE_DASHBOARD_SSL_CERT: "sslCert" PARSE_DASHBOARD_CONFIG: undefined // Only for reference, it must not exist PARSE_DASHBOARD_COOKIE_SESSION_SECRET: undefined // set the cookie session secret, defaults to a random string. Use this option if you want sessions to work across multiple servers, or across restarts +PARSE_DASHBOARD_AGENT_CONFIG: undefined // JSON string containing the full agent configuration with models array +PARSE_DASHBOARD_AGENT_MODEL_NAME: undefined // Display name for the AI model (e.g. "ChatGPT 4.1") +PARSE_DASHBOARD_AGENT_MODEL_PROVIDER: undefined // AI provider identifier (e.g. "openai") +PARSE_DASHBOARD_AGENT_MODEL: undefined // Specific model name from the provider (e.g. "gpt-4.1") +PARSE_DASHBOARD_AGENT_API_KEY: undefined // API key for authenticating with the AI provider ``` @@ -1305,6 +1310,32 @@ To configure the AI agent for your dashboard, you need to add the `agent` config The agent will use the configured models to process natural language commands and perform database operations using the master key from your app configuration. +### Environment Variables + +You can also configure the AI agent using environment variables, which is useful for containerized deployments or when you want to avoid storing API keys in configuration files. + +#### Option 1: Full JSON Configuration + +For complex setups with multiple models, you can provide the entire agent configuration as a JSON string: + +``` +PARSE_DASHBOARD_AGENT_CONFIG='{"models":[{"name":"ChatGPT 4.1","provider":"openai","model":"gpt-4.1","apiKey":"YOUR_API_KEY"}]}' +``` + +#### Option 2: Individual Environment Variables + +For simpler setups with a single model, you can use individual environment variables: + +``` +PARSE_DASHBOARD_AGENT_MODEL_NAME="ChatGPT 4.1" +PARSE_DASHBOARD_AGENT_MODEL_PROVIDER="openai" +PARSE_DASHBOARD_AGENT_MODEL="gpt-4.1" +PARSE_DASHBOARD_AGENT_API_KEY="YOUR_API_KEY" +``` + +> [!Note] +> If both `PARSE_DASHBOARD_AGENT_CONFIG` and individual variables are provided, `PARSE_DASHBOARD_AGENT_CONFIG` takes precedence. + ### Providers > [!Note] From cc5ab7ecc25108ca5a8c64005bb72edb97017da1 Mon Sep 17 00:00:00 2001 From: Andrea Falzetti Date: Wed, 30 Jul 2025 19:46:15 +0200 Subject: [PATCH 2/8] fix: Remove individual agent env vars, keep only full JSON config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The agent configuration is designed to support multiple models, so having individual environment variables for a single model doesn't align with the feature's multi-model design. This commit keeps only PARSE_DASHBOARD_AGENT_CONFIG which accepts a JSON string with the full agent configuration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- Parse-Dashboard/server.js | 13 ------------- README.md | 22 ++-------------------- 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/Parse-Dashboard/server.js b/Parse-Dashboard/server.js index b6ef967d8b..8163d82f35 100644 --- a/Parse-Dashboard/server.js +++ b/Parse-Dashboard/server.js @@ -40,10 +40,6 @@ module.exports = (options) => { const configSSLKey = options.sslKey || process.env.PARSE_DASHBOARD_SSL_KEY; const configSSLCert = options.sslCert || process.env.PARSE_DASHBOARD_SSL_CERT; const configAgentConfig = options.agentConfig || process.env.PARSE_DASHBOARD_AGENT_CONFIG; - const configAgentModelName = options.agentModelName || process.env.PARSE_DASHBOARD_AGENT_MODEL_NAME; - const configAgentModelProvider = options.agentModelProvider || process.env.PARSE_DASHBOARD_AGENT_MODEL_PROVIDER; - const configAgentModel = options.agentModel || process.env.PARSE_DASHBOARD_AGENT_MODEL; - const configAgentApiKey = options.agentApiKey || process.env.PARSE_DASHBOARD_AGENT_API_KEY; function handleSIGs(server) { const signals = { @@ -96,15 +92,6 @@ module.exports = (options) => { console.error('Failed to parse PARSE_DASHBOARD_AGENT_CONFIG:', error.message); process.exit(1); } - } else if (configAgentModelName && configAgentModelProvider && configAgentModel && configAgentApiKey) { - configFromCLI.data.agent = { - models: [{ - name: configAgentModelName, - provider: configAgentModelProvider, - model: configAgentModel, - apiKey: configAgentApiKey - }] - }; } } else if (!configServerURL && !configMasterKey && !configAppName) { configFile = path.join(__dirname, 'parse-dashboard-config.json'); diff --git a/README.md b/README.md index 842c2664ad..95dd393702 100644 --- a/README.md +++ b/README.md @@ -214,10 +214,6 @@ PARSE_DASHBOARD_SSL_CERT: "sslCert" PARSE_DASHBOARD_CONFIG: undefined // Only for reference, it must not exist PARSE_DASHBOARD_COOKIE_SESSION_SECRET: undefined // set the cookie session secret, defaults to a random string. Use this option if you want sessions to work across multiple servers, or across restarts PARSE_DASHBOARD_AGENT_CONFIG: undefined // JSON string containing the full agent configuration with models array -PARSE_DASHBOARD_AGENT_MODEL_NAME: undefined // Display name for the AI model (e.g. "ChatGPT 4.1") -PARSE_DASHBOARD_AGENT_MODEL_PROVIDER: undefined // AI provider identifier (e.g. "openai") -PARSE_DASHBOARD_AGENT_MODEL: undefined // Specific model name from the provider (e.g. "gpt-4.1") -PARSE_DASHBOARD_AGENT_API_KEY: undefined // API key for authenticating with the AI provider ``` @@ -1314,27 +1310,13 @@ The agent will use the configured models to process natural language commands an You can also configure the AI agent using environment variables, which is useful for containerized deployments or when you want to avoid storing API keys in configuration files. -#### Option 1: Full JSON Configuration - -For complex setups with multiple models, you can provide the entire agent configuration as a JSON string: +Set the `PARSE_DASHBOARD_AGENT_CONFIG` environment variable with a JSON string containing the full agent configuration: ``` PARSE_DASHBOARD_AGENT_CONFIG='{"models":[{"name":"ChatGPT 4.1","provider":"openai","model":"gpt-4.1","apiKey":"YOUR_API_KEY"}]}' ``` -#### Option 2: Individual Environment Variables - -For simpler setups with a single model, you can use individual environment variables: - -``` -PARSE_DASHBOARD_AGENT_MODEL_NAME="ChatGPT 4.1" -PARSE_DASHBOARD_AGENT_MODEL_PROVIDER="openai" -PARSE_DASHBOARD_AGENT_MODEL="gpt-4.1" -PARSE_DASHBOARD_AGENT_API_KEY="YOUR_API_KEY" -``` - -> [!Note] -> If both `PARSE_DASHBOARD_AGENT_CONFIG` and individual variables are provided, `PARSE_DASHBOARD_AGENT_CONFIG` takes precedence. +This supports the same multi-model configuration structure as the JSON config file, allowing you to define multiple AI models in the array. ### Providers From ad711316d34c989450999dfd3e4c08c89b56c599 Mon Sep 17 00:00:00 2001 From: Andrea Falzetti Date: Thu, 31 Jul 2025 10:47:56 +0200 Subject: [PATCH 3/8] refactor: Address review feedback for agent env var support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change configAgentConfig to configAgent for naming consistency - Handle both JS config objects and JSON strings properly - Remove separate env var chapter, integrate into existing table - Add environment variable column to AI Agent configuration table 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- Parse-Dashboard/server.js | 20 +++++++++++++------- README.md | 34 ++++++++++++++-------------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Parse-Dashboard/server.js b/Parse-Dashboard/server.js index 8163d82f35..4afd3c0968 100644 --- a/Parse-Dashboard/server.js +++ b/Parse-Dashboard/server.js @@ -39,7 +39,7 @@ module.exports = (options) => { const configUserPassword = options.userPassword || process.env.PARSE_DASHBOARD_USER_PASSWORD; const configSSLKey = options.sslKey || process.env.PARSE_DASHBOARD_SSL_KEY; const configSSLCert = options.sslCert || process.env.PARSE_DASHBOARD_SSL_CERT; - const configAgentConfig = options.agentConfig || process.env.PARSE_DASHBOARD_AGENT_CONFIG; + const configAgent = options.agent || process.env.PARSE_DASHBOARD_AGENT_CONFIG; function handleSIGs(server) { const signals = { @@ -85,12 +85,18 @@ module.exports = (options) => { ]; } // Add agent configuration from environment variables - if (configAgentConfig) { - try { - configFromCLI.data.agent = JSON.parse(configAgentConfig); - } catch (error) { - console.error('Failed to parse PARSE_DASHBOARD_AGENT_CONFIG:', error.message); - process.exit(1); + if (configAgent) { + // If it's already an object (from JS config), use it directly + if (typeof configAgent === 'object') { + configFromCLI.data.agent = configAgent; + } else { + // Otherwise, try to parse it as JSON + try { + configFromCLI.data.agent = JSON.parse(configAgent); + } catch (error) { + console.error('Failed to parse PARSE_DASHBOARD_AGENT_CONFIG:', error.message); + process.exit(1); + } } } } else if (!configServerURL && !configMasterKey && !configAppName) { diff --git a/README.md b/README.md index 95dd393702..48b3688c54 100644 --- a/README.md +++ b/README.md @@ -1295,28 +1295,22 @@ To configure the AI agent for your dashboard, you need to add the `agent` config } ``` -| Parameter | Type | Required | Description | -|-----------------------------|--------|----------|--------------------------------------------------------------------------------| -| `agent` | Object | Yes | The AI agent configuration object. | -| `agent.models` | Array | Yes | Array of AI model configurations available to the agent. | -| `agent.models[*].name` | String | Yes | The display name for the model (e.g., `ChatGPT 4.1`). | -| `agent.models[*].provider` | String | Yes | The AI provider identifier (e.g., "openai"). | -| `agent.models[*].model` | String | Yes | The specific model name from the provider (e.g., `gpt-4.1`). | -| `agent.models[*].apiKey` | String | Yes | The API key for authenticating with the AI provider. | +| Parameter | Type | Required | Description | Environment Variable | +|-----------------------------|--------|----------|--------------------------------------------------------------------------------|-----------------------| +| `agent` | Object | Yes | The AI agent configuration object. | `PARSE_DASHBOARD_AGENT_CONFIG` | +| `agent.models` | Array | Yes | Array of AI model configurations available to the agent. | - | +| `agent.models[*].name` | String | Yes | The display name for the model (e.g., `ChatGPT 4.1`). | - | +| `agent.models[*].provider` | String | Yes | The AI provider identifier (e.g., "openai"). | - | +| `agent.models[*].model` | String | Yes | The specific model name from the provider (e.g., `gpt-4.1`). | - | +| `agent.models[*].apiKey` | String | Yes | The API key for authenticating with the AI provider. | - | -The agent will use the configured models to process natural language commands and perform database operations using the master key from your app configuration. - -### Environment Variables - -You can also configure the AI agent using environment variables, which is useful for containerized deployments or when you want to avoid storing API keys in configuration files. - -Set the `PARSE_DASHBOARD_AGENT_CONFIG` environment variable with a JSON string containing the full agent configuration: - -``` -PARSE_DASHBOARD_AGENT_CONFIG='{"models":[{"name":"ChatGPT 4.1","provider":"openai","model":"gpt-4.1","apiKey":"YOUR_API_KEY"}]}' -``` +> [!Note] +> When using the `PARSE_DASHBOARD_AGENT_CONFIG` environment variable, provide the complete agent configuration as a JSON string. For example: +> ```bash +> PARSE_DASHBOARD_AGENT_CONFIG='{"models":[{"name":"ChatGPT 4.1","provider":"openai","model":"gpt-4.1","apiKey":"YOUR_API_KEY"}]}' +> ``` -This supports the same multi-model configuration structure as the JSON config file, allowing you to define multiple AI models in the array. +The agent will use the configured models to process natural language commands and perform database operations using the master key from your app configuration. ### Providers From 34d0f6274e92520fa227b358a9108cb68d2b44b7 Mon Sep 17 00:00:00 2001 From: Andrea Falzetti Date: Thu, 31 Jul 2025 10:52:03 +0200 Subject: [PATCH 4/8] fix: Remove Environment Variable column from table, keep as note MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove the Environment Variable column from the AI Agent config table - Keep environment variable information as a note below the table - Properly align table columns for better readability 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 48b3688c54..1131f217ff 100644 --- a/README.md +++ b/README.md @@ -1295,17 +1295,17 @@ To configure the AI agent for your dashboard, you need to add the `agent` config } ``` -| Parameter | Type | Required | Description | Environment Variable | -|-----------------------------|--------|----------|--------------------------------------------------------------------------------|-----------------------| -| `agent` | Object | Yes | The AI agent configuration object. | `PARSE_DASHBOARD_AGENT_CONFIG` | -| `agent.models` | Array | Yes | Array of AI model configurations available to the agent. | - | -| `agent.models[*].name` | String | Yes | The display name for the model (e.g., `ChatGPT 4.1`). | - | -| `agent.models[*].provider` | String | Yes | The AI provider identifier (e.g., "openai"). | - | -| `agent.models[*].model` | String | Yes | The specific model name from the provider (e.g., `gpt-4.1`). | - | -| `agent.models[*].apiKey` | String | Yes | The API key for authenticating with the AI provider. | - | +| Parameter | Type | Required | Description | +|-----------------------------|--------|----------|--------------------------------------------------------------------------| +| `agent` | Object | Yes | The AI agent configuration object. | +| `agent.models` | Array | Yes | Array of AI model configurations available to the agent. | +| `agent.models[*].name` | String | Yes | The display name for the model (e.g., `ChatGPT 4.1`). | +| `agent.models[*].provider` | String | Yes | The AI provider identifier (e.g., "openai"). | +| `agent.models[*].model` | String | Yes | The specific model name from the provider (e.g., `gpt-4.1`). | +| `agent.models[*].apiKey` | String | Yes | The API key for authenticating with the AI provider. | > [!Note] -> When using the `PARSE_DASHBOARD_AGENT_CONFIG` environment variable, provide the complete agent configuration as a JSON string. For example: +> The agent configuration can also be set via the `PARSE_DASHBOARD_AGENT_CONFIG` environment variable. Provide the complete agent configuration as a JSON string: > ```bash > PARSE_DASHBOARD_AGENT_CONFIG='{"models":[{"name":"ChatGPT 4.1","provider":"openai","model":"gpt-4.1","apiKey":"YOUR_API_KEY"}]}' > ``` From d85060315f0be1e5d09b1ad407b1375c736a9e92 Mon Sep 17 00:00:00 2001 From: Andrea Falzetti Date: Thu, 31 Jul 2025 10:53:33 +0200 Subject: [PATCH 5/8] style: Further improve AI agent config table alignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adjust column widths for better visual consistency and readability. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1131f217ff..42df0b31dc 100644 --- a/README.md +++ b/README.md @@ -1295,14 +1295,14 @@ To configure the AI agent for your dashboard, you need to add the `agent` config } ``` -| Parameter | Type | Required | Description | -|-----------------------------|--------|----------|--------------------------------------------------------------------------| -| `agent` | Object | Yes | The AI agent configuration object. | -| `agent.models` | Array | Yes | Array of AI model configurations available to the agent. | -| `agent.models[*].name` | String | Yes | The display name for the model (e.g., `ChatGPT 4.1`). | -| `agent.models[*].provider` | String | Yes | The AI provider identifier (e.g., "openai"). | -| `agent.models[*].model` | String | Yes | The specific model name from the provider (e.g., `gpt-4.1`). | -| `agent.models[*].apiKey` | String | Yes | The API key for authenticating with the AI provider. | +| Parameter | Type | Required | Description | +|-----------------------------|--------|----------|--------------------------------------------------------------| +| `agent` | Object | Yes | The AI agent configuration object. | +| `agent.models` | Array | Yes | Array of AI model configurations available to the agent. | +| `agent.models[*].name` | String | Yes | The display name for the model (e.g., `ChatGPT 4.1`). | +| `agent.models[*].provider` | String | Yes | The AI provider identifier (e.g., "openai"). | +| `agent.models[*].model` | String | Yes | The specific model name from the provider (e.g., `gpt-4.1`). | +| `agent.models[*].apiKey` | String | Yes | The API key for authenticating with the AI provider. | > [!Note] > The agent configuration can also be set via the `PARSE_DASHBOARD_AGENT_CONFIG` environment variable. Provide the complete agent configuration as a JSON string: From 485aa1d03f39373e97030df2e8a89f53c9d4569d Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Thu, 31 Jul 2025 14:20:45 +0200 Subject: [PATCH 6/8] Update README.md --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index 42df0b31dc..84046d3642 100644 --- a/README.md +++ b/README.md @@ -1297,19 +1297,13 @@ To configure the AI agent for your dashboard, you need to add the `agent` config | Parameter | Type | Required | Description | |-----------------------------|--------|----------|--------------------------------------------------------------| -| `agent` | Object | Yes | The AI agent configuration object. | +| `agent` | Object | Yes | The AI agent configuration object. When using the environment variable, provide the complete agent configuration as a JSON string. | | `agent.models` | Array | Yes | Array of AI model configurations available to the agent. | | `agent.models[*].name` | String | Yes | The display name for the model (e.g., `ChatGPT 4.1`). | | `agent.models[*].provider` | String | Yes | The AI provider identifier (e.g., "openai"). | | `agent.models[*].model` | String | Yes | The specific model name from the provider (e.g., `gpt-4.1`). | | `agent.models[*].apiKey` | String | Yes | The API key for authenticating with the AI provider. | -> [!Note] -> The agent configuration can also be set via the `PARSE_DASHBOARD_AGENT_CONFIG` environment variable. Provide the complete agent configuration as a JSON string: -> ```bash -> PARSE_DASHBOARD_AGENT_CONFIG='{"models":[{"name":"ChatGPT 4.1","provider":"openai","model":"gpt-4.1","apiKey":"YOUR_API_KEY"}]}' -> ``` - The agent will use the configured models to process natural language commands and perform database operations using the master key from your app configuration. ### Providers From 1f0a93f7bb5da45a4836944fb50ae0923341e0b0 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Thu, 31 Jul 2025 14:21:02 +0200 Subject: [PATCH 7/8] Update README.md --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 84046d3642..cdbea45e9d 100644 --- a/README.md +++ b/README.md @@ -526,8 +526,8 @@ Parse.Cloud.define('deleteAccount', async (req) => { Parse Dashboard can cache its resources such as bundles in the browser, so that opening the dashboard in another tab does not reload the dashboard resources from the server but from the local browser cache. Caching only starts after login in the dashboard. -| Parameter | Type | Optional | Default | Example | Description | -|-----------------------|---------|----------|---------|---------|-----------------------------------------------------------------------------------------------------------------------------------------| +| Parameter | Type | Optional | Default | Example | Description | +|-----------------------|---------|----------|---------|---------|----------------------------------------------------------------------------------------------------------------| | `enableResourceCache` | Boolean | yes | `false` | `true` | Enables caching of dashboard resources in the browser for faster dashboard loading in additional browser tabs. | @@ -1295,14 +1295,14 @@ To configure the AI agent for your dashboard, you need to add the `agent` config } ``` -| Parameter | Type | Required | Description | -|-----------------------------|--------|----------|--------------------------------------------------------------| -| `agent` | Object | Yes | The AI agent configuration object. When using the environment variable, provide the complete agent configuration as a JSON string. | -| `agent.models` | Array | Yes | Array of AI model configurations available to the agent. | -| `agent.models[*].name` | String | Yes | The display name for the model (e.g., `ChatGPT 4.1`). | -| `agent.models[*].provider` | String | Yes | The AI provider identifier (e.g., "openai"). | -| `agent.models[*].model` | String | Yes | The specific model name from the provider (e.g., `gpt-4.1`). | -| `agent.models[*].apiKey` | String | Yes | The API key for authenticating with the AI provider. | +| Parameter | Type | Required | Description | +|----------------------------|--------|----------|-------------------------------------------------------------------------------------------------------------------------------------| +| `agent` | Object | Yes | The AI agent configuration object. When using the environment variable, provide the complete agent configuration as a JSON string. | +| `agent.models` | Array | Yes | Array of AI model configurations available to the agent. | +| `agent.models[*].name` | String | Yes | The display name for the model (e.g., `ChatGPT 4.1`). | +| `agent.models[*].provider` | String | Yes | The AI provider identifier (e.g., "openai"). | +| `agent.models[*].model` | String | Yes | The specific model name from the provider (e.g., `gpt-4.1`). | +| `agent.models[*].apiKey` | String | Yes | The API key for authenticating with the AI provider. | The agent will use the configured models to process natural language commands and perform database operations using the master key from your app configuration. From 802fbc1c01a7da08db4810bd9184b3e67853ee62 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Thu, 31 Jul 2025 14:23:00 +0200 Subject: [PATCH 8/8] rename env var --- Parse-Dashboard/server.js | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Parse-Dashboard/server.js b/Parse-Dashboard/server.js index 4afd3c0968..412b5a2eb5 100644 --- a/Parse-Dashboard/server.js +++ b/Parse-Dashboard/server.js @@ -39,7 +39,7 @@ module.exports = (options) => { const configUserPassword = options.userPassword || process.env.PARSE_DASHBOARD_USER_PASSWORD; const configSSLKey = options.sslKey || process.env.PARSE_DASHBOARD_SSL_KEY; const configSSLCert = options.sslCert || process.env.PARSE_DASHBOARD_SSL_CERT; - const configAgent = options.agent || process.env.PARSE_DASHBOARD_AGENT_CONFIG; + const configAgent = options.agent || process.env.PARSE_DASHBOARD_AGENT; function handleSIGs(server) { const signals = { @@ -94,7 +94,7 @@ module.exports = (options) => { try { configFromCLI.data.agent = JSON.parse(configAgent); } catch (error) { - console.error('Failed to parse PARSE_DASHBOARD_AGENT_CONFIG:', error.message); + console.error('Failed to parse PARSE_DASHBOARD_AGENT:', error.message); process.exit(1); } } diff --git a/README.md b/README.md index cdbea45e9d..dc5b5a287e 100644 --- a/README.md +++ b/README.md @@ -213,7 +213,7 @@ PARSE_DASHBOARD_SSL_KEY: "sslKey" PARSE_DASHBOARD_SSL_CERT: "sslCert" PARSE_DASHBOARD_CONFIG: undefined // Only for reference, it must not exist PARSE_DASHBOARD_COOKIE_SESSION_SECRET: undefined // set the cookie session secret, defaults to a random string. Use this option if you want sessions to work across multiple servers, or across restarts -PARSE_DASHBOARD_AGENT_CONFIG: undefined // JSON string containing the full agent configuration with models array +PARSE_DASHBOARD_AGENT: undefined // JSON string containing the full agent configuration with models array ```