# Cohere

<!-- meta: type=ai-cohere; location=AI; category=AI; platforms=Joomla and WordPress (where applicable) -->

## Overview

Cohere is a **AI** in **AI**. Calls Cohere for text generation or structured output.

When the flow reaches this step, JOrchestrator calls the configured model using credentials from **Node Configuration**, then exposes the response fields listed below to downstream steps.

## Why use this node

Cohere is a **AI step** in the **AI** group. AI steps call language or media models. Use them to generate text, classify content, or produce assets that later steps publish or send.

Typical reasons teams add **Cohere** to a flow:

- Generate or transform content with Cohere before publishing or sending
- Use upstream CMS or webhook fields as prompts or context
- Keep AI calls inside audited, repeatable flows rather than one-off scripts

## Example workflows

Common patterns on the canvas:

1. **Trigger or Webhook** → upstream steps → **Cohere** → **Send Email** or CMS update
2. **Scheduled trigger** → **Cohere** → **Debug** (while testing) → production action

## How to set it up

General — model, temperature, max tokens. Design — available fields, raw JSON shape, and prompt.

## Good to know

Cohere also supports rerank/embed use cases when enabled in your account.

## Properties panel

The designer shows these tabs for this node:

| Tab | Purpose |
|-----|---------|
| **Info** | Plain-language description and output payload fields for downstream steps |
| **General** | Canvas label and read-only node ID |
| **AI** | Optional assistant to help draft settings from plain language |
| **Design** | Node-specific configuration fields |

### System (automatic — not edited by the user)

These fields are managed by the designer or runtime — you do not type into them directly:

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `_nodeId` | Node ID | `node-id` | No | — | — |
| `_payloadFields` | Available Fields | `payload-panel` | No | — | — |
| `rawJsonShape` | Response JSON | `raw-json-shape-editor` | No | `outputFormat === 'raw_json'` | {
  "title": "",
  "introtext": "",
  "customKey": ""
} |

### User-configured — General tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `label` | Label | `text` | No | — | Node label |
| `model` | Model | `text` | No | — | Model name (e.g., gpt-4, claude-3, etc.) |
| `temperature` | Temperature | `number` | No | — | 0.7 |
| `maxTokens` | Max Tokens | `number` | No | — | 1000 |

### User-configured — Design tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `agentPreset` | Agent preset | `select` (`transform` \| `research` \| `classifier` \| `editor` \| `custom`; default: `transform`) | No | — | Transform (default) — Single-shot transform — no agent role or tools.
Research agent — Web search (OpenAI) + structured JSON with citations.
Classifier — Categorize or route content into structured labels.
Editor — Editorial assistant — article-shaped output.
Custom — Write your own system prompt below. |
| `systemPrompt` | System prompt | `textarea` | No | — | Agent role and constraints (optional). Applied separately from the task prompt below. Defines how the model behaves (research agent, editor, classifier, etc.). The task prompt below describes what to do with upstream data this run. |
| `outputFormat` | Output format | `select` (`legacy` \| `image` \| `article` \| `raw_json` \| `email`; default: `article`) | No | — | — |
| `prompt` | Prompt | `textarea` | **Yes** | — | Enter your Cohere prompt here… Drag fields from Available Fields into the prompt. |

### CMS site configuration (not on this node's properties panel)

Credentials, API keys, mailers, SMTP, and integration defaults are configured in the CMS plugin under **Node Configuration**, not per step on this node. Link the flow to a domain before testing CMS-backed fields.

## Output payload fields

After this step runs, later nodes can reference these fields using placeholders such as
`{{cohere.parsed}}`.

| Field key | Type | Description |
|-----------|------|-------------|
| `parsed` | object | Parsed JSON object extracted from the LLM response. |
| `title` | string | Title text for the created or updated record. |
| `introtext` | string | Article introduction / teaser HTML. |
| `fulltext` | string | Article main body HTML. |
| `response` | string | Raw text response from the LLM or API. |
| `content` | string | Main text content from the LLM response. |
| `messageId` | string | Provider message or email identifier. |
| `usage` | object | Token usage metadata from the LLM API. |

## Validation rules

- **Prompt** (`prompt`) must be filled before the flow can be saved.

## Related nodes

Other steps in the same area of the palette:

- **Anthropic Claude** (`ai-anthropic`) — AI
- **Google Gemini** (`ai-google-gemini`) — AI
- **Groq** (`ai-groq`) — AI
- **Meta Llama** (`ai-meta-llama`) — AI
- **Mistral AI** (`ai-mistral`) — AI
