Project settings
Use the project's Settings to change the port, request duration, secrets and access, or to pause or remove the project.
Port#
The platform picks a web service's port in this order and passes it to your program in the PORT environment variable:
- The value in Settings › Runtime settings › Port, if set.
- Otherwise, the one TCP port the image
EXPOSEs. - Otherwise,
8080.
Request duration#
Every request to a web service has a time limit: 30 seconds unless you raise it. The limit covers the whole response, a streamed one included (server-sent events, an LLM answer sent as it is generated). Raise it in Settings › Compute › Request duration (seconds), up to what your plan allows (the field shows the maximum), then restart the service. The setting is only in the console; an AI tool connected through MCP can't change it.
When a request reaches the limit:
| When | What the caller gets |
|---|---|
| Before your service sent its response headers | 504 with the header X-AgentLab-Error: platform-timeout and the body {"error":"platform_request_timeout","timeoutSeconds":30,"retry":false} |
| After it started sending (a stream) | The connection closes and the response just stops. Nothing can be added to a response already under way. |
A 504 without X-AgentLab-Error came from your own service, not from the platform.
Don't resend a request that timed out
The limit ends the connection, not necessarily the work: your service may still be running the request, and paying a model for it. Sending it again can do the same work twice, which is why the body says "retry": false. For work longer than the limit, start it in one request that answers at once, and let the client ask for the result later.
Secrets#
Secrets are confidential values such as API keys and tokens. You enter them in the console, and your code reads them as environment variables. Each environment has its own secrets.
A saved secret never shows its value again, to anyone. Each one says who set it and when; one that Agent Lab generated, or set when a database or cache was connected, says at whose request. "in use by the running service" means it has taken effect; "takes effect after a service restart" means it waits for a restart.
Never paste a secret into a conversation
Don't put secret values in a command or paste them into a conversation with an AI tool. If they're already in a .env file, an AI tool can send that file straight to the platform without seeing the values; see Upload secrets from a .env file.
Apply settings#
A setting takes effect when the service restarts. When you can restart the service and a version is running, the save button reads Save and restart. It asks you to confirm first: the instances are replaced one by one and the old ones keep serving until the new ones are ready, but the files in /tmp are emptied, and so is the data of a database running inside the image. Nothing is saved until you confirm. Removing a variable or secret works the same way: its confirmation says the service restarts, and its button reads Remove and restart.
When a save can't restart the service, because you don't have permission to restart it or nothing is running, the button reads Save. The change is saved and waits: the overview says the settings have changed, and it applies when someone selects Restart service or the next version goes live.
An AI tool connected through MCP only saves. sites_runtime_settings_update never restarts the service; sites_restart is a separate step.
Pause, remove and delete#
| Action | What happens | Can it be undone? |
|---|---|---|
| Pause project | The project goes offline and visitors see a neutral page. Everything is kept, and no new version can be deployed while it's paused. | Yes. Select Resume project. |
| Remove project | The project goes offline now and a seven-day grace period starts. | Restore it within seven days. After that, its versions are deleted. |
| Delete permanently | Every version and address is deleted now. You type the project's name to confirm. | No. The address is never given to anyone else. |