AI Library
CodingBeginner

From chatbot to dependable worker

Map a repeatable task into an AI workflow with clear inputs, tools, review points, and proof of completion. Build a plan you can inspect before you automate it.

Your progress0 / 4

Your context and progress are saved in this browser.

Make it yours.

A little context makes a better starting point.

Kept on your device. Prompts run in the AI tool you choose.

Step 1 of 4Coding

Map one useful run

Start with one recurring task and a reviewable result. Name what starts it, what information it needs, and what successful completion would leave behind.

Your prompt
Help me map this recurring task: Draft a weekly project-status update. Trigger: Friday at 15:00 in the team's local time zone. Approved inputs: Project notes, completed tickets, and the current blocker list. Reader and reviewer: The project lead reviews a draft for the delivery team. Done means: A dated draft with source links, unresolved questions, and named next actions. Action boundary: Read the named sources and create a local draft. The project lead handles external delivery.. Describe the trigger, context, model decisions, tools, state, review gate, and completion evidence. Separate facts I supplied from assumptions. Ask about missing decisions. Produce a plan only; do not run the workflow or contact anyone.

Before you move on

The runtime around the model

A useful answer in a chat is a good start. A recurring business task also needs a way to begin, find the right information, act within a defined scope, and leave evidence of what happened. Those responsibilities belong to the system around the model. In this guide we call that system a harness. It is a working engineering term, not a formal certification or a guarantee of reliability.

Think about a weekly status update. A person knows which project notes count, which changes belong to this week, and who can approve the message. A reusable system needs those choices written down. Otherwise a polished paragraph can conceal missing evidence, stale context, or an action nobody intended to authorize.

Scroll sideways to see all columns.

PartIts responsibilityStatus-update example
ModelInterprets context and proposes a result or next actionGroups evidence into progress, blockers, and next steps
ToolReads or changes a specific external resourceFetches ticket records or saves a draft
HarnessCoordinates the run, available capabilities, state, and checksChooses approved sources, handles failures, and routes the draft to review
Human ownerSets the purpose and handles the decisions assigned to themChecks the draft and decides whether to send it

Seven moments in a run

Use this sequence as a map of responsibilities. A real implementation may combine steps or repeat part of the loop. What matters is that you can identify who owns each transition and what evidence it receives. A model proposing a tool call is different from that tool successfully executing it.

  • Trigger: a request, event, or schedule starts the work.
  • Assemble: load the task, approved context, relevant instructions, and current state.
  • Decide: select the next bounded step or produce a candidate answer.
  • Check permission: establish whether that action is within the permitted scope or needs review.
  • Execute: call the tool and record its actual result.
  • Observe: use the result as evidence for the next decision; stop or recover when needed.
  • Finish: verify the output, save the relevant record, and deliver it through the agreed path.

Workflows and agents solve different problems

Anthropic's architectural distinction is useful here: workflows follow predefined code paths, while agents let the model direct more of the process and tool use. Begin with the simpler pattern when the sequence is already known; introduce flexibility where the task actually needs it.

For the status draft, collecting three named sources and saving one document can follow fixed rules. Deciding which blocker needs explanation may benefit from model judgment. Sending the update is a separate business decision. You can combine all three approaches in one system without making the whole process open-ended.

Walk through a weekly-status example

This example is illustrative. At the agreed Friday cutoff, the collector reads this week's ticket updates, project notes, and unresolved blockers. It keeps source identifiers and timestamps with the extracted facts. The drafting step receives only that evidence and a short format: progress, blockers, next actions.

If a ticket is marked complete but the project note says the work is still under review, the draft should expose the disagreement. It should not choose the more impressive version. If one source cannot be read, the run reports the missing source and follows the pre-agreed rule for producing an incomplete draft or stopping.

The project lead reviews the exact draft and its source links. Approval belongs to that version. If the draft changes afterward, the previous decision does not silently approve the new wording. This is a deliberate choice for this example; a different workflow should define its own authority and risk boundaries.

Ten clauses for an automation contract

A plan becomes easier to implement when it answers predictable edge cases. Use these clauses as a practical checklist. Not every workflow needs a large specification, but every consequential ambiguity needs an owner. Name unresolved decisions rather than hiding them inside a confident prompt.

Scroll sideways to see all columns.

ClauseQuestion to settle
IdentityWhat does this automation do, who owns it, and which version is being reviewed?
TriggerWhat starts it, in which time zone, and what happens to missed or overlapping runs?
Input windowWhich timestamp determines whether an input belongs to this run?
EvidenceWhich sources are permitted, how fresh must they be, and what gets rejected?
DecisionsWhich choices follow code, which use model judgment, and which belong to a person?
ToolsWhich reads and writes are permitted, and which capabilities are unavailable?
StateWhat persists, how are duplicate attempts recognized, and who owns recovery?
CompletionWhich artifacts and checks demonstrate the result?
ReviewWho reviews what, and how is their decision attached to that output?
FailureWhen should the system stop, skip, retry, or ask for help?

Keep state useful and limited

State is the information a run needs to remember. It might include the last successful cutoff, an output revision, pending review, or a record that today's trigger has already been handled. It does not need to be an unlimited transcript of every interaction.

An idempotency key is a stable identifier used to recognize repeat attempts for the same operation. For a daily draft, an implementation might combine the workflow identity and the relevant calendar date. That is a design example: the actual key must match the operation's scope. A key alone does not prevent duplication unless the receiving system checks and enforces it.

Decide what a retry can repeat safely. Reading a source again and sending the same external message again have different consequences. Keep the record of attempted actions separate from the record of confirmed results, so recovery can resume from evidence rather than from assumptions.

Read a real architecture without copying the whole stack

Hermes is one implementation you can study alongside this map. Its architecture documentation describes the components around the conversation loop. Use it to ask where context, tools, sessions, and execution belong, rather than treating its particular file names as requirements for your own project.

Start with your smallest useful workflow. Compare a direct script, a fixed sequence of model calls, and an existing agent runtime against that need. The selection should follow the work you must operate and maintain. You have a useful first design when another person can explain the inputs, action limits, failure paths, and completion evidence from your plan.

Check your understanding.

Choose an answer, then read the explanation. These questions check the concepts, not the readiness of your automation.

Which part proposes the next action?
A collector could not read a required source. What should the draft do?
Which is evidence that the work finished?

The complete guide.

Read every step, prompt, and review check in one place. The examples use the context below; use the interactive workflow above to make them your own.

Example context

Recurring task
Draft a weekly project-status update
Trigger
Friday at 15:00 in the team's local time zone
Approved inputs
Project notes, completed tickets, and the current blocker list
Reader and reviewer
The project lead reviews a draft for the delivery team
Evidence of completion
A dated draft with source links, unresolved questions, and named next actions
Action boundary
Read the named sources and create a local draft. The project lead handles external delivery.
  1. 1. Map one useful run

    Start with one recurring task and a reviewable result. Name what starts it, what information it needs, and what successful completion would leave behind.

    Example prompt
    Help me map this recurring task: Draft a weekly project-status update. Trigger: Friday at 15:00 in the team's local time zone. Approved inputs: Project notes, completed tickets, and the current blocker list. Reader and reviewer: The project lead reviews a draft for the delivery team. Done means: A dated draft with source links, unresolved questions, and named next actions. Action boundary: Read the named sources and create a local draft. The project lead handles external delivery.. Describe the trigger, context, model decisions, tools, state, review gate, and completion evidence. Separate facts I supplied from assumptions. Ask about missing decisions. Produce a plan only; do not run the workflow or contact anyone.

    Review checklist

    • The output is a specific artifact
    • Each input has a known source
    • Missing decisions are recorded
    • The action boundary is explicit
  2. 2. Separate rules from judgment

    Decide which steps have a predictable rule, which need interpretation, and which require a person. A model does not need to control every transition.

    Example prompt
    Review the plan for Draft a weekly project-status update. Classify each stage as a deterministic rule, bounded model judgment, or human decision. For each stage name its input, output, permitted tool, failure condition, and next owner. Preserve this boundary: Read the named sources and create a local draft. The project lead handles external delivery.. Identify a smaller fixed workflow if it meets the same need. Use illustrative values only when labeled, and do not claim this design is implemented or tested.

    Review checklist

    • Fixed rules have an accountable owner
    • Model decisions have clear limits
    • Review happens before consequential delivery
    • The plan has a stop condition
  3. 3. Write the run contract

    Make timing, duplicate runs, empty inputs, and failure visible. The contract should tell an implementer what to do when the happy path fails.

    Example prompt
    Turn the reviewed plan for Draft a weekly project-status update into a short run contract. Cover identity and owner; trigger and time zone; missed and duplicate runs; approved inputs Project notes, completed tickets, and the current blocker list; data freshness; read/write permissions Read the named sources and create a local draft. The project lead handles external delivery.; retained state; retry limits; empty-input behavior; reviewer The project lead reviews a draft for the delivery team; and completion evidence A dated draft with source links, unresolved questions, and named next actions. Mark unresolved values as decisions needed. Include a worked normal run, a missing-source run, and a duplicate-trigger run. This is a design exercise; do not schedule or execute anything.

    Review checklist

    • Time zone and duplicate-run policy are explicit
    • Empty or stale inputs have a defined outcome
    • Retries are bounded
    • Completion means evidence, not a success message
  4. 4. Plan a small verification

    Check the design with representative examples before connecting a real business process. Completing this checklist records your review; it does not certify an automation.

    Example prompt
    Create a verification plan for the proposed Draft a weekly project-status update workflow. Use A dated draft with source links, unresolved questions, and named next actions as the acceptance target. Include one normal example, one ambiguous input, one unavailable source, one duplicate trigger, and one denied review. For each, state expected output and prohibited side effects. Keep Read the named sources and create a local draft. The project lead handles external delivery.. Explain which checks are automated, which need The project lead reviews a draft for the delivery team, and which cannot be verified until implementation exists. Produce the test plan without executing actions.

    Review checklist

    • Normal and failure examples have expected results
    • Unavailable evidence cannot become invented progress
    • The reviewer can see what actually ran
    • Unverified behavior remains clearly identified

What you’re working toward.

A workflow map, a run contract, and a small verification plan. These are reviewable design artifacts for an implementer, not a deployed agent or proof that the workflow succeeds.