# Summarize it

> Replaced by an AI agent step. Give the agent the instruction "Write a short summary of the document".

Source: https://docs.go-lumen.ai/de/reference/steps/summarize

## Auf einen Blick

| Eigenschaft | Wert |
| --- | --- |
| **Schrittname** | `summarize` |
| **Ressource** | ClusterStep (`lumen.ai/v1alpha1`) |
| **Palettengruppe, Kategorie** | ai, ai |
| **Credits** | **0.5** Credits bei jedem Erfolg |
| **Externe Wirkung** | nein |
| **Die Installation muss bereitstellen** | nichts |

## Eingaben

| Eigenschaft | Wert |
| --- | --- |
| **Braucht** | `text` |
| **Liefert** | `fields` |
| **Arbeitet auf** | item: einem Dokument nach dem anderen |

Braucht und Liefert sind Datentypen (file, text, fields, email). Der Editor bietet einen Schritt nur dort an, wo das, was er braucht, schon auf dem Pfad liegt. Siehe [Dokumente und Daten](https://docs.go-lumen.ai/de/concepts/how-flows-run.md#documents-and-data).

## Ausgaben

Keine benannten Ausgaben. Spätere Knoten sehen weiterhin alles, was auf dem Pfad zuvor entstanden ist, und dieser Schritt reicht die Dokumente unverändert weiter.

## Einstellungen

Wird unter `config:` im Knoten des Flows gesetzt. Texteinstellungen dürfen Platzhalter wie `{nodeId.field}` enthalten.

| Einstellung | Typ | Standardwert | Beschreibung |
| --- | --- | --- | --- |
| `files` | object |  |  |
| `files.mode` | string | `"attach"` | Mode is attach (the model reads each file whole when it can, its text otherwise), text (only the text read out of each file) or none (no file at all). Unset is attach. ifNoText attaches them only when the document has no text, and sends none otherwise. (one of attach, text, none, ifNoText) |
| `files.maxFiles` | integer | `10` | MaxFiles is the most files one document may bring; the rest are skipped. Unset is 10. (minimum 1; maximum 100) |
| `files.maxPages` | integer | `100` | MaxPages is the most PDF pages across all files together; a PDF that crosses it is read up to the pages left. Unset is 100. (minimum 1; maximum 1000) |
| `files.maxBytes` | integer | `20971520` | MaxBytes is the most bytes, all files together. Unset is 20 MB. (minimum 1; maximum 104857600) |

Das vollständige JSON Schema dieser Einstellungen: [summarize.schema.json](https://docs.go-lumen.ai/schemas/steps/summarize.schema.json).

## Im Flow verwenden

Ein Knoten, der `summarize` ausführt, steht unter `spec.nodes` eines [Flow](https://docs.go-lumen.ai/de/concepts/how-flows-run.md#the-flow-as-yaml). Geben Sie ihm eine beliebige id und nennen Sie in next die ids der nächsten Knoten.

```yaml title="flow.yaml"
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
  name: summarize-example
  namespace: tenant-acme
spec:
  displayName: "Summarize it"
  triggers:
    - id: start
      ref: {name: manual-run}
      next: [summarize]
  nodes:
    - id: summarize
      stepRef: {name: summarize}
```
