> ## Documentation Index
> Fetch the complete documentation index at: https://docs.intelligence-management-platform.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow templates

> The workflow_template type defines a multi-step automated routine that an agent executes sequentially.

export const EditionBadge = ({edition}) => <Tooltip tip={edition === "ee" ? "Requires an Enterprise Edition license." : "Available in the Community Edition."}>
    <span style={{
  fontFamily: "RobotoMono, monospace",
  fontSize: "12px",
  textTransform: "uppercase",
  letterSpacing: "0.04em",
  border: "1px solid var(--imp-hair-light)",
  padding: "2px 8px"
}}>
      {edition === "ee" ? "Enterprise" : "Community"}
    </span>
  </Tooltip>;

<EditionBadge edition="ee" /> Workflow templates require an Enterprise Edition license (`template-conversations` entitlement).

A `workflow_template` is a reusable automation script: an ordered list of agent-executed steps stored as JSON. Workflows can be triggered manually, via the API, or on a cron schedule. See [Routines overview](/building/routines/overview).

```graphql theme={null}
type workflow_template {
  name: String!
  description: String
  agent: String
  steps_json: JSON!
  last_processed_at: Date
  embeddings_updated_at: Date
  rights_mode: String
  created_by: Float!
  createdAt: Date
  updatedAt: Date
  variables: [String]
  budget: JSON
  id: ID!
  RBAC: RBACData
}
```

## Field notes

| Field                   | Notes                                                                                                                |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `agent`                 | ID string of the default `agent` executing each step; individual steps may override this.                            |
| `steps_json`            | JSON array of step definitions. Each step specifies a prompt, optional tools, and per-step agent or model overrides. |
| `variables`             | Computed string array of `{{variable}}` placeholder names extracted from `steps_json`; populated at read time.       |
| `rights_mode`           | `"public"` or `"private"`; private templates are scoped via `RBAC`.                                                  |
| `created_by`            | Numeric ID of the creating user.                                                                                     |
| `budget`                | JSON budget envelope for cost limits on this workflow's runs.                                                        |
| `last_processed_at`     | Timestamp of the last knowledge-embedding pass over this record.                                                     |
| `embeddings_updated_at` | Timestamp when vector embeddings were last regenerated.                                                              |

## Example query

```graphql theme={null}
query {
  workflow_templatesPagination(
    limit: 10
    filters: [{ rights_mode: { eq: "public" } }]
    sort: { field: "name", direction: ASC }
  ) {
    items {
      id
      name
      description
      agent
      variables
      createdAt
    }
    pageInfo {
      currentPage
      hasNextPage
    }
  }
}
```
