LESSON 06 / 16·2 min readIntermediate

Workflow State and the Ledger

Must knowConcept lesson
01 Understand02 Recall03 Prepare

A multi-turn workflow needs a reliable memory of what has happened. That is different from merely sending the whole chat history back to an LLM.

A workflow ledger can store structured, validated facts such as:

JSON
{
  "customer_verified": true,
  "transaction_id": "txn_example_123",
  "dispute_reason": "unrecognized_transaction",
  "replacement_card_requested": null,
  "action_confirmed": false
}

The ledger should distinguish between:

  • Unknown: No usable answer has been collected yet.
  • Known: A value has been collected and validated.
  • Pending: A required question or confirmation is still open.
  • Completed: A permitted action or workflow step has finished.

This prevents the system from treating conversational wording as authoritative state.

PAUSE & RECALL

Can you explain it without the notes?

Workflow State and the Ledger

Use your own words. Explain an example and one limitation before checking the explanation.

Check your explanation

A multi-turn workflow needs a reliable memory of what has happened. That is different from merely sending the whole chat history back to an LLM.

CONNECT IT TO YOUR INTERVIEW

Turn this concept into a clear answer.

Practice this concept
YOUR NEXT STEP

Keep connecting the ideas.

Next lesson: Graphs, Nodes, and Transitions

Adapted from 19_deterministic_workflow_engine_learnings.md · “5. Workflow State and the Ledger”. Examples are study fragments; framework behavior can depend on your version.