Foundations · Chapter 04
The business as a state machine
States, transitions and triggers. Autonomy is more transitions run without a person.
A way of describing a business as a set of states (for example: lead, customer, invoice due, churned) and the events that move things between them. Describing a business this way makes it clear which specific steps could be handed to agents. Glossary ↗
A customer becoming active, an invoice becoming overdue and a support request becoming resolved are changes in the business, not merely tasks on someone’s list. Describing them as transitions makes it possible to ask what must be true before a change, what triggers it and what the business should look like afterwards.
That is a useful scale at which to introduce an agent. “Handle sales” leaves the boundary unclear. Moving a lead from qualified to call booked names an outcome that can be checked. The surrounding states also make it easier to see where a person still needs to decide.
Making the map executable
Begin with the things the business tracks: leads, customers, orders, invoices and tickets. Give each a set of meaningful states. A lead might move through qualified and call booked before becoming a customer. Write down the event that permits each move, and who or what carries it out today.
The map becomes more useful when it governs execution as well as describing it. The same transition that appears in the model should be the one the process performs. Otherwise the diagram can look orderly while the actual work follows a different path.
What happens when work is interrupted
A transition may take longer than one request or one running process. A payment may be sent before a confirmation arrives; a service may fail while the business is waiting for an answer. Saving a checkpoint is only part of the problem. The process must also know which effects already happened and what can safely be attempted again.
Rehearse one transition before leaving it to run. Interrupt it, present the same input twice and try an approval for the wrong version. The process should recover without repeating a consequential action, and it should know which decision it is waiting for. A tool such as n8n can implement a fixed workflow; more flexible orchestration becomes useful when the task requires choices that the fixed path cannot express.
Keep a run record with the input, current state, completed effects, waiting decision and owner. A saved prompt has become an operating process when the trigger, continuation and recovery work in the environment where it will run. Someone outside the team should be able to read the record and explain what happens next.
Tools and setup
Prior work: Anthropic's Building effective agents documents the workflow/agent distinction and simple composable patterns. It is a historical architecture reference; its own note points readers to newer tooling. n8n's workflow guide provides a concrete visual implementation path.
- Reuse TAB's existing process-interview skill. Agree trigger, full map, account, output, owner, budget and human boundary. Save a runbook and unique run key.
- In n8n, create a workflow with a Manual Trigger, a narrowly scoped source read, processing, and an approved draft destination. Add service credentials in n8n's credential interface. Store run IDs, statuses and completed action identifiers in a suitable persistent store.
- A simple table is adequate for a single manual rehearsal. For unattended concurrent work, require atomic uniqueness/locking and destination reconciliation; n8n nodes or a prompt alone do not prove those invariants. Keep a manual single-run limit if they cannot be enforced.
- Test approval pause/reply/resume and failure paths. Only then configure a Schedule Trigger, set the workflow timezone, obtain activation approval and publish. Verify the first execution and result; a published schedule is not a successful run.
Setup paths checked against linked documentation on 15 November 2026. Verify current account support during setup; reader integrations have not been tested here.
Work through this with your agent
Paste the request into your assistant. It will interview you and help produce the working artifact.
Interview me to implement ONE reliable workflow. Ask at most three questions per turn and wait. Reuse my approved process map; if missing, obtain and confirm the full trigger-to-outcome map first. Ask about approved facts, output, acceptance tests, owner, tools, budget, human decisions and stop conditions. Start with a fixed workflow unless route selection needs an agent. Use the existing process-interview skill if available. Define durable run IDs, source/artifact versions, status, completed actions, approval replies, timeouts and reconciliation before retry. Prevent overlapping runs from duplicating effects; if tools cannot enforce this, require a single manual run. Test a normal run, missing input, revision and a paused/resumed approval without duplicate effects. Save PROCESS-RUNBOOK.md and run evidence. Show the concrete trigger/schedule, timezone, allowed actions and limitations for approval before activation. Verify saved schedule and unattended access; otherwise label MANUAL ONLY. Do not claim always-on execution without proof.
Use these documented setup paths as references; check current account support before acting:
https://www.anthropic.com/research/building-effective-agents
https://docs.n8n.io/build-your-first-workflow.md
https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger