Project 9 — Deterministic plus agentic workflow
Words made simple
A few useful meanings before you read the explanation.
- Deterministic
- Following steps or rules defined by code. The model does not decide which step should run next in a deterministic workflow.
- AI
- Software techniques for tasks such as recognizing patterns, understanding language or generating content.
- API
- A way for one piece of software to ask another for data or an action. A claims API might return the current status of a claim.
More words from this lesson
- Schema
- A description of the fields and value types that data should contain. It helps check that an answer has the expected shape.
- State
- The data describing where a workflow is now, what it already knows, and what still needs to happen.
- Durable
- Able to retain progress and recover across interruptions. Durable workflows require appropriate storage and retry behavior.
- Idempotency
- Making a repeated request have the same intended business effect as one request. It helps avoid duplicate submissions or payments.
- Evaluation
- Checking results against examples and clear criteria to find whether the system works well and where it fails.
Requirements
Interpret input, prepare a draft, validate required fields, wait for review, execute once, and notify reliably.
Architecture
AI interpretation → deterministic state machine → durable approval wait → idempotent service → outbox notification.
Technologies
Existing AI/graph layer plus Temporal or another justified durable workflow, or BullMQ with explicit application state for simpler jobs.
Database design
Draft versions/hashes, approval records, operation keys/receipts, workflow status, and outbox events.
API design
Draft create/edit/review/submit/status; require expected version and operation key; expose uncertain outcome explicitly.
AI design
Language extraction and draft wording only; code controls calculations, permissions, retries, and transitions.
Security
Authenticated exact-action approval, current-rule checks at commit, least-privilege activities, safe recipient validation.
Evaluation
Duplicate messages, worker crashes, stale approvals, transaction/dispatch gaps, external timeout, and compensation limits.
Observability
Workflow events, wait age, retry counts, receipt links, unknown outcomes, and notification lag.
Deployment
Durable storage and timers, worker recovery, schema/version migration, redrive/reconciliation operations, and backup restore test.
Interview questions
- “Exactly once?” Answer: design effectively-once business effects through deduplication and reconciliation; do not assume the network guarantees it.
- “Can every action be undone?” Answer: disclosure and email often cannot.
Acceptance: The same approved logical request creates one effect across retries and restarts.
Can you explain it without the notes?
Project 9 — Deterministic plus agentic workflow
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Requirements: Interpret input, prepare a draft, validate required fields, wait for review, execute once, and notify reliably.
Turn this concept into a clear answer.
Practice this conceptAdapted from 13_AI.MD · “Project 9 — Deterministic plus agentic workflow”. Examples are study fragments; framework behavior can depend on your version.