# Run the agent that fills an application form in the user's browser

Streams one stretch of the agent that fills the application form open in the user's own browser. The agent's browser steps are run by the HireSweep page through the browser extension, which sends the conversation back with each result. The agent reports every question and answer for the user to review; it presses the site's Submit only on a turn where the user pressed Submit. Requires authentication.

```http
POST https://hiresweep.com/api/openapi/applications/{applicationId}/fill/agent
x-api-key: YOUR_API_KEY
```

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `applicationId` | path | string | Yes |  |

## Request body

```json
{
  "type": "object",
  "properties": {
    "messages": {
      "type": "array",
      "minItems": 1,
      "maxItems": 600,
      "items": {
        "not": {}
      }
    },
    "today": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "The candidate's own calendar date (YYYY-MM-DD), which a site dates an upload by."
    }
  },
  "required": [
    "messages"
  ]
}
```

## Responses

- `200`: The agent's steps, as a UI message stream.
- `402`: 402
- `409`: 409
