# terminateAgent (/api/reference/mutations/terminate-agent)

End a hired agent's hire. Workspace admins only. It is switched off and no further months are charged. Its history is kept. Terminating it again changes nothing and keeps the first `hire.terminatedAt`.

```graphql
terminateAgent(
  input: TerminateAgentInput!
): TerminateAgentPayload!
```

### Arguments [#arguments]

#### [`terminateAgent.input`](#input) · [`TerminateAgentInput!`](/api/reference/inputs/terminate-agent-input) `non-null` `input` [#input]
Which hire to end.

### Type [#type]

#### [`TerminateAgentPayload`](/api/reference/objects/terminate-agent-payload) `object` [#terminateagentpayload-object]
The agent after its hire ended.