# See what the support agent did yesterday

URL: /agents/see-what-an-agent-did · Id: `guide:see-what-an-agent-did`

> List every Action one agent took in a day, newest first, with the record, input, outcome and cause of each.

Every call an [Agent](/business/nouns/agent) makes is an [Action](/business/nouns/action) on the record, so yesterday is one query. Filter by the agent, the day or the [Verb](/business/nouns/verb), and each row links to what caused it.

**Before it runs**

- You leave the chat: Never: it all happens in the chat.

## What you get
- 1 list of everything the agent did, newest first (Action)
- 1 row for each one: what it did, to which record, and how it turned out (Action)
- 1 who each one was for, and the permission it acted under (Mandate)
- 1 link from each one to the conversation or event that caused it (Event)

## Your agent does
**For agents**

- Guide: `guide:see-what-an-agent-did`, status `live`. Page: [/agents/see-what-an-agent-did.md](/agents/see-what-an-agent-did.md).
- Approval: none. Run it when the founder asks.
- Leaves the chat: never.
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Action.list`](/business/nouns/action/list) (`verb:Action.list`) | `limit` integer: example `100`; `where` string: example `"by = \"agent_customer_lead\" and createdAt >= \"2026-10-22\" and createdAt < \"2026-10-23\""`; `sort` string: example `"-createdAt"` | `actions` Action[] |

Returns: the last call answers with `actions`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "$type": "Action",
  "actions": [
    {
      "$id": "https://api.sb/leaseline.app/actions/action_1",
      "$type": "Action",
      "by": "agent_customer_lead"
    }
  ],
  "meta": {
    "limit": 100,
    "after": "cursor_2"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions?limit=100",
    "next": "https://api.sb/leaseline.app/actions?after=cursor_2"
  }
}
```

Next: offer “Only the Actions that waited for my Approval”, or “Send me this every morning at 8”.

Calls: `Action.list`

Ask:

```text
Show me everything the support agent did yesterday.
What did the agents do overnight?
List every refund the support agent made this week.
```

API:

```bash
# Action.list
curl "https://api.sb/leaseline.app/actions?limit=100&where=by%20%3D%20%22agent_customer_lead%22%20and%20createdAt%20%3E%3D%20%222026-10-22%22%20and%20createdAt%20%3C%20%222026-10-23%22&sort=-createdAt" \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

SDK:

```ts
import { $ } from 'startup-builder'

await $.Action.list({ limit: 100, where: 'by = "agent_customer_lead" and createdAt >= "2026-10-22" and createdAt < "2026-10-23"', sort: '-createdAt' })
```

CLI:

```bash
npx startup-builder do Action.list --json '{"limit":100,"where":"by = \"agent_customer_lead\" and createdAt >= \"2026-10-22\" and createdAt < \"2026-10-23\"","sort":"-createdAt"}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Action.list({ limit: 100, where: 'by = \"agent_customer_lead\" and createdAt >= \"2026-10-22\" and createdAt < \"2026-10-23\"', sort: '-createdAt' })"
  }
}
```

## Change it
- Only the Actions that waited for my Approval.
- Send me this every morning at 8.
- Undo the refund it made to Unit 4B.

## Under the hood
- Systems: [Work queue](/agents/work-queue), [Support](/systems/support)
- Nouns: [Action](/business/nouns/action), [Agent](/business/nouns/agent), [Mandate](/business/nouns/mandate), [Event](/business/nouns/event)

Read it every morning for the first few weeks. Each miss you find becomes an [eval](/agents/evals) case, and a seat climbs [the ladder](/agents/autonomy#the-ladder) on the cases it passes.