---
title: "Run the Agent"
method: POST
path: "/agent"
---

# Run the Agent

`POST /agent`

## Request

- Base URL: `https://api.drymerge.com`
- URL: `https://api.drymerge.com/agent`
- Auth: HTTP bearer

## Request body

- GenerateFromTemplateEndpointArgs
  - `prompt` string: The user's most recent message.
  - `agent` Identity: An identity is a unique identifier for an entity.
    - `type` string: Type of the identity.
    - `organization` string: Name of the organization that owns the entity.
    - `namespace` string: Namespace delineating logical grouping of entities.
    - `name` string: The name of the entity; must be unique within a namespace.
    - `isolation` string: The isolation level of the entity.
  - `history` ChatMsg[]: The history of the chat up to this point.
    - `text` string: The text of the chat message.
    - `sender` 'user' | 'system' | 'assistant': The sender of the message.

## Response `200`

Successful response

- GenerateFromTemplateEndpointResponse
  - `decision` CrudDecision
    - `Operate` OperateDecision
      - `data` object: Data on which the agent has decided to operate.
      - `ui` UserInterfaceElement[]: UI elements to be rendered for the user.
        - `Form` FormElement
          - `id` Identity: An identity is a unique identifier for an entity.
            - `type` string: Type of the identity.
            - `organization` string: Name of the organization that owns the entity.
            - `namespace` string: Namespace delineating logical grouping of entities.
            - `name` string: The name of the entity; must be unique within a namespace.
            - `isolation` string: The isolation level of the entity.
          - `variant` 'Template' | 'Workflow'
          - `schema` object
        - `Auth` AuthElement[]
          - union
            - object
              - …
            - object: An identity is a unique identifier for an entity.
              - …
        - `Confirmation` ConfirmedAction
          - `id` Identity: An identity is a unique identifier for an entity.
            - `type` string: Type of the identity.
            - `organization` string: Name of the organization that owns the entity.
            - `namespace` string: Namespace delineating logical grouping of entities.
            - `name` string: The name of the entity; must be unique within a namespace.
            - `isolation` string: The isolation level of the entity.
          - `variant` 'Template' | 'Workflow'
          - `schema` object
        - `Display` WorkflowGroupItem[]
          - `id` Identity: An identity is a unique identifier for an entity.
            - `type` string: Type of the identity.
            - `organization` string: Name of the organization that owns the entity.
            - `namespace` string: Namespace delineating logical grouping of entities.
            - `name` string: The name of the entity; must be unique within a namespace.
            - `isolation` string: The isolation level of the entity.
          - `description` string
          - `tags` string[]
        - `Update` UpdateElement
          - `message` string
          - `theme` 'Success' | 'Failure' | 'Neutral'
    - `Yield` YieldDecision
      - `ui` UserInterfaceElement[]: UI elements to be rendered while awaiting further user input.
        - `Form` FormElement
          - `id` Identity: An identity is a unique identifier for an entity.
            - `type` string: Type of the identity.
            - `organization` string: Name of the organization that owns the entity.
            - `namespace` string: Namespace delineating logical grouping of entities.
            - `name` string: The name of the entity; must be unique within a namespace.
            - `isolation` string: The isolation level of the entity.
          - `variant` 'Template' | 'Workflow'
          - `schema` object
        - `Auth` AuthElement[]
          - union
            - object
              - …
            - object: An identity is a unique identifier for an entity.
              - …
        - `Confirmation` ConfirmedAction
          - `id` Identity: An identity is a unique identifier for an entity.
            - `type` string: Type of the identity.
            - `organization` string: Name of the organization that owns the entity.
            - `namespace` string: Namespace delineating logical grouping of entities.
            - `name` string: The name of the entity; must be unique within a namespace.
            - `isolation` string: The isolation level of the entity.
          - `variant` 'Template' | 'Workflow'
          - `schema` object
        - `Display` WorkflowGroupItem[]
          - `id` Identity: An identity is a unique identifier for an entity.
            - `type` string: Type of the identity.
            - `organization` string: Name of the organization that owns the entity.
            - `namespace` string: Namespace delineating logical grouping of entities.
            - `name` string: The name of the entity; must be unique within a namespace.
            - `isolation` string: The isolation level of the entity.
          - `description` string
          - `tags` string[]
        - `Update` UpdateElement
          - `message` string
          - `theme` 'Success' | 'Failure' | 'Neutral'
    - `Skip` string: Reason for skipping the operation.

---

[API](https://skmtc.dev/drymerge/apis/tenant-session-api.md) - [All operations](https://skmtc.dev/drymerge/apis/tenant-session-api/llms.txt) - [OpenAPI document](https://skmtc.dev/drymerge/apis/tenant-session-api/revisions/b161aa26c15a?raw)
