# Life of a task

URL: /products/agent/life-of-a-task · Id: `page:products/agent/life-of-a-task`

> One renewal notice from the morning it is due to the verdict that bills it, through every part of an agent product.

A [Task](/business/nouns/task) is one piece of work an agent takes on for one [Customer](/business/nouns/customer). This chapter follows one renewal notice that Harbor Residential's agent sends, from the morning it is due to the verdict that bills it.

## The morning it is due
Harbor Residential's agent runs on its [Role](/business/nouns/role)'s `daily` schedule, inside Harbor Residential's [Tenant](/business/nouns/tenant). At 08:00 in the property manager's timezone it lists every lease that ends in 60 days. One is `lease_4loEed1JG4`, for unit 5C, ending on `2026-11-05`.

The list reads Harbor Residential's records only. The agent has no path to another Customer's leases, because its Tenant is the only namespace it can address.

## Draft, check, send
The agent drafts the notice from the lease and from what its [Memory](/business/nouns/memory) holds about this building. Before anything leaves, the outbound [Message](/business/nouns/message) passes the [Guard](/business/nouns/guard): tone, AI disclosure, consent and claims.

| Step | [Verb](/business/nouns/verb) | What it records |
| --- | --- | --- |
| Draft the notice | `Lease.notify` | The notice, with the end date and the rent the manager set |
| Pass the Guard | Every outbound Message | Each check and its result |
| Send it | [`Message.create`](/business/nouns/message/create) | The email from `renewals@harbor.leaseline.app` |
| Grade it | [`Action.evaluate`](/business/nouns/action/evaluate) | The [Evaluator](/business/nouns/evaluator)'s verdict and its reasons |

The [Mailbox](/business/nouns/mailbox) belongs to Harbor Residential's Tenant. A reply reaches the same agent, in the same thread.

## A question that needs a yes
The resident replies and asks for $25 off a 13-month renewal. The agent answers questions on its own, but a rent the manager has not set is a `price` [Action](/business/nouns/action). Harbor Residential approves every one.

The offer waits as an [Approval](/business/nouns/approval) in Harbor Residential's [Portal](/business/nouns/portal), assigned to Ines Duarte. She approves it, and the agent sends the counter-offer. Leaseline never sees the Approval: [approvals per customer](/products/agent/approvals-per-customer) covers why.

## The record it leaves
Every step is an Action that says who did it and for whom. The builder reads it on [api.sb](/code/platform/api-sb):

```json
{
  "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
  "$type": "Action",
  "status": "done",
  "by": "agent_ONES1oEBjR",
  "for": "cus_BNY3PShL26",
  "via": "email",
  "thing": "lease_4loEed1JG4",
  "createdAt": "2026-10-06T08:02:00Z"
}
```

Harbor Residential reads the same Action in its Portal, and its own code reads it from `api.leaseline.app` with a `leaseline_sk_live_` key. [Traces](/products/agent/traces) shows how to follow a Task across its Actions.

## Billed on the verdict
The Evaluator grades the notice against its rubric: the end date and the new rent, one clear next step, no threat. A pass makes the notice billable work. A fail sends it back for a redraft, and Harbor Residential pays nothing for the failed draft.

At the month's end, the agent's report lists notices sent and passed, Approvals asked for, and replies answered. The same numbers sit live in the Portal.

## Next
The [lifecycle](/products/agent/lifecycle) page follows the agent product itself, from its file to its retirement.