Etapas do fluxo de trabalho

Memória

type: "memory"

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

free3 actionsread by default
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

actionstringread

read · write · delete.

namestring

Necessari per write e delete.

contentstring

Necessari per write.

descriptionstring

Una rigna, mostrada in l'indice.

// 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" } }
# 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

azioneProduzione
read con un nomela nota
readsenza unomemories — l'indice
writela nota, e se fu creata
deleteil nome, e se è stato eliminat

Così è come una catena mantiene lo stato

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

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