Start and Stop an Agent
Start a background Agent, inspect status, and stop or restart it safely
Start and Stop an Agent
Start
Default startup runs the agent in the background:
studio agent startIf you do not pass a path and the current directory is not already an initialized agent project, the CLI may prompt you to select one from registered agents.
The decision rule is:
- explicit path wins
- if the current directory is already initialized, use it
- otherwise prompt interactively if possible
Foreground mode
If you want to watch runtime behavior in the current terminal:
studio agent start --foregroundForeground mode is for debugging, not long-running production usage.
When background startup fails but the cause is unclear, foreground mode is often the fastest way to see the actual error.
Check status
studio agent statusCommon states:
runningstoppedstalenot initialized
Understanding these states is more useful than repeatedly running start.
Stop
studio agent stopThis stops the target project's daemon and cleans up the corresponding state files.
If the target is already stopped, the command remains idempotent.
Restart
studio agent restartRestart is usually the safest move after changing:
- model binding
- channel configuration
- prompts
- environment variables
Some of those values are loaded during startup, so editing files alone does not automatically refresh the running process.
Good habits
- prefer
restartafter config changes - check
statusbefore guessing - if you see
stale, usedoctor --fix
A safe daily sequence
For most runtime changes, this is a stable pattern:
studio agent status
studio agent restart
studio agent statusNext: