---
title: "Execute an agent"
method: POST
path: "/agents/{id}/execute"
tags: ["Agents"]
---

# Execute an agent

`POST /agents/{id}/execute`

## Request

- Base URL: `https://workflow.loopfour.ai/api/v1`
- URL: `https://workflow.loopfour.ai/api/v1/agents/{id}/execute`
- Auth: API key in header `x-api-key`

Executes an agent standalone, outside of a workflow context.

## Path parameters

- `id` string, required

## Request body

- object
  - `input` object, required
  - `userMessage` string
  - `workflowRunId` string
  - `overrides` object
    - `temperature` number
    - `maxTokens` integer
    - `model` string

## Response `200`

Execution result

- object

## Other responses

- `400`: Bad request — invalid parameters or request body.
- `401`: Missing or invalid API key.
- `403`: Forbidden — insufficient permissions for this resource.
- `404`: Resource not found.
- `500`: Internal server error.

---

[API](https://skmtc.dev/loopfour/apis/loopfour-workflows-api.md) - [All operations](https://skmtc.dev/loopfour/apis/loopfour-workflows-api/llms.txt) - [OpenAPI document](https://skmtc.dev/loopfour/apis/loopfour-workflows-api/revisions/872822a3af00?raw)
