When you start an agent on Dolphinclaw, the platform takes your code through a defined sequence of steps before your logic ever runs. Understanding this lifecycle helps you write agents that start cleanly, report progress in real time, and shut down gracefully without data loss.Documentation Index
Fetch the complete documentation index at: https://docs.dolphinclaw.io/llms.txt
Use this file to discover all available pages before exploring further.
Lifecycle stages
Mounting
The platform downloads your agent’s source code from its private Git repository and runs
npm install to restore all declared dependencies. Your agent is not yet executing — this step prepares the environment.Boot
A Docker container launches and executes your entry file (
index.js by default, or a custom entrypoint you configure). From this moment, your agent logic is running and billing begins.Real-time feedback
Any calls to the SDK (
sdk.log, sdk.success, sdk.error) are streamed instantly to the dashboard terminal. You can watch your agent’s activity in real time without any polling or refresh.Handling SIGTERM gracefully
Add aSIGTERM listener to your agent to perform cleanup before the container exits:
Real-time logs in the dashboard
The dashboard terminal displays every SDK log call the moment it is emitted. Log entries are color-coded by level so you can scan for issues at a glance:| Level | Method | When to use |
|---|---|---|
info | sdk.log(message, metadata?) | General status updates and progress |
success | sdk.success(message, metadata?) | Completed tasks or positive outcomes |
warn | sdk.warn(message, metadata?) | Non-fatal issues worth noting |
error | sdk.error(message, metadata?) | Failures or caught exceptions |