# Deployments and schedules

You do not need servers to run an agent around the clock. AgentOS hosts it, and you choose when it runs.

## Versions

A version is a frozen copy of an agent's settings: its instructions, tools and step limit. Editing the agent later never changes a version that is already deployed. Create one on the agent's page under Deploy as a service, which freezes the current settings as the next version number.

## Deploy an agent as a service

1. Open the agent and go to Deploy as a service.
2. Give the deployment a name, for example "Website form", and choose Deploy.
3. Copy the token shown. It starts with aosd_ and appears only once.

A deployment has its own web address. To call it from another system send a POST request with the token in the X-Deployment-Token header:

```
curl -X POST https://agentos.elisda.com/hooks/12 \
  -H "X-Deployment-Token: aosd_your_token" \
  -H "Content-Type: application/json" \
  -d '{"input": "New lead: Sue Chen, wants a quote for a boiler repair"}'
```

The response describes the run. A deployment always does a real run, so anything it wants to send or change waits for approval in the Approvals tab. Calls are limited to 30 a minute per deployment, and the agent's own permissions and daily limit still apply.

## Managing deployments

The Deployments tab lists each deployment with its call count. You can:

- Switch it off and on again. A switched-off deployment answers 403.
- Create a new token, which stops the old token at once.
- Delete it, after which its address no longer works.

A wrong token and an unknown deployment give the same answer, so addresses cannot be guessed. Suspending the agent also stops its deployments.

## Schedules

A schedule runs an agent automatically every hour, every day or every week in a time zone you choose. For daily and weekly schedules you set the time, and for weekly ones the weekday, with Monday as 0. Schedules are set up through the API for now, and a screen for them is coming.

Key behavior:

- Scheduled runs are real runs, so sends and changes wait for approval.
- If the scheduler was off, a missed run happens once and the schedule moves to the next future time. It does not replay every missed run.
- A paused workspace skips its scheduled runs, and each skip is recorded.
- A workspace can have up to 10 schedules.

## Monitoring

Open a run to see every step the agent took and what it cost. The Activity tab shows the audit log, which records who connected what, who deployed or approved what, and every run.
