# Memória

Canonical URL: https://developers.iagenify.com/pt/sdk/workflows/steps/memory/
Language: pt

`type: "memory"`

Legge, scrive o cancella una delle note a lungo termine del conto — perciocè una catena può ricordare qualcosa tra runs.

Status: free · 3 actions · read by default

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `action` | string | read | `read` · `write` · `delete`. |
| `name` | string |  | Necessari per `write` e `delete`. |
| `content` | string |  | Necessari per `write`. |
| `description` | string |  | Una rigna, mostrada in l'indice. |

```javascript
// Remember where the last run got to
{ id: "mark", type: "memory", config: {
    action: "write", name: "last-digest",
    description: "The date of the last digest sent",
    content: "{{input.week}}" } }

// Read it at the start of the next run
{ id: "since", type: "memory", config: { action: "read", name: "last-digest" } }
```

## Saída {#output}

| azione | Produzione |
| --- | --- |
| `read` con un nome | la nota |
| `read`senza uno | `memories` — l'indice |
| `write` | la nota, e se fu creata |
| `delete` | il nome, e se è stato eliminat |

## Così è come una catena mantiene lo stato {#state}

> **Una run comince con niente**
>
> Una catena programmata che non deve ripetersi — un digest desde il ultimo digest — scrie una nota al final e la lee al principio. Non c'è altro stato entre runs.

## Le notes sono del cont {#shared}

I medesimi un agent lee e scrie, e i medesimi [api.memory](/pt/sdk/ref/memory) gestisce. Un workflow writing cambia ciò che ogni agent di quel account sa — che è utile, e vale la pena ser deliberat.

- [Memória](/pt/sdk/agent/tools/memory): La versiòn del agent.
- [api.memory](/pt/sdk/ref/memory): A partir do código.
- [Etapas do fluxo de trabalho](/pt/sdk/workflows/steps): Os 23 tipos.

```python
# Remember where the last run got to
{"id": "mark", "type": "memory", "config": {
    "action": "write", "name": "last-digest",
    "description": "The date of the last digest sent",
    "content": "{{input.week}}"}}

# Read it at the start of the next run
{"id": "since", "type": "memory", "config": {"action": "read", "name": "last-digest"}}
```
