# Read an Agent's external execution status

Source: <https://everruns.com/docs/api/operations/get_external_agent/>

[Docs](https://everruns.com/docs/)/[API reference](https://everruns.com/docs/api/)/[Agents & authoring](https://everruns.com/docs/api/groups/agents-authoring/)/Read an Agent's external execution status

# Read an Agent's external execution status

Preview

Configure agents, harnesses, capabilities, skills and channels. Manage keys, triggers and recorded changes.

Public APIEverruns Cloud and self-hosted Platform

GET`/v1/agents/{agent_id}/external-worker`

See [authentication](https://everruns.com/docs/sre/runbooks/authentication/) for credentials and permissions.

## Parameters

### Path Parameters

**agent_id**

required

string

## Responses

200

### 200

Media typeapplication/json

An Agent’s external-agent state, plus whether this installation lets it connect one.

object

**available**

required

Whether a new endpoint can be connected here: the installation sets `EXTERNAL_AGENTS_ENABLED=true` and protected worker ingress is off. The UI hides the setup when this is false and no endpoint exists.

boolean

**endpoint**

One of:

* object

  The connected (or disconnected) endpoint, if one was ever registered.

  object

  **enabled**

  required

  Whether this binding can lease new work. Disabled bindings retain routing.

  boolean

  **endpoint_url**

  required

  Verified public HTTPS URL that receives signed invocation requests.

  string

  **last_error**

  Sanitized dispatch error, cleared after a successful invocation or registration.

  string | null

  **last_invoked_at**

  Time of the latest invocation attempt, if any.

  string | null format: date-time

* null

  null

### Example

```json
{
  "endpoint": {
    "endpoint_url": "https://sales.example.workers.dev/"
  }
}
```

FetchcURL

Request

```js
const url = 'https://app.everruns.com/api/v1/agents/example/external-worker';
const options = {method: 'GET'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

Request

```sh
curl --request GET \
  --url https://app.everruns.com/api/v1/agents/example/external-worker
```

Additional language examples require JavaScript. The default request example is available above.

200

200 ·

```json
{
  "available": true
}
```

## Matching endpoints