# A press is repaired — three weeks, a supplier outside, an order refused, and a repair that did not hold

> A workshop repairs a customer's press. An agent in charge has three specialists read the fault log, the service history and the manual; the customer fills in a form; a technician is asked to inspect and the request goes on to a colleague; a parts supplier with no account answers through a link; the manager refuses the order the agent proposes and approves a smaller one; the customer approves the cost. Then the repair does not hold, the same job looks into it again, the agent cannot be reached and the manager finds the cause herself. Every fact in the story is asserted by the tests of the app it comes from.

<!-- id: agent-story-repair · area: agent · stability: preview · html: https://osysharp.com/reference/agent/story-repair/ -->

> **You are here:** [Agents in an Osy# app](https://osysharp.com/reference/agent/overview/) › Stories › A press is repaired

## Summary        {#summary}
Pressworks services other people's machines. A customer's press stops with a fault code a few times a week, and
the workshop owns that until the press runs a whole shift clean — however many readings, visits and parts that
takes, and whether or not the first repair holds.

This is one repair, of press P-200 at a foundry, from Monday 3 March to Monday 24 March.

## Description    {#description}

### Who is involved?   {#people}

| Person | Their job | What they see and may do |
|---|---|---|
| Carl Lind | the customer, at the foundry | what is asked of him, in his own inbox; where his repair stands. Nothing of the workshop's own |
| Dana Holm | the workshop's desk | takes the report; opens the job |
| Tariq Aziz | technician | is on the job; is asked to inspect |
| Ines Falk | technician | stands in when Tariq cannot answer |
| Mona Berg | workshop manager | answers for the agents; decides what they propose; sees what they cost; steps in when one cannot go on |
| Bo Ek, at Hydra Parts | a parts supplier, outside | has no account: answers one question through a link sent to him |

| Agent | Its part | What it may do alone |
|---|---|---|
| Service coordinator | in charge of the repair: looks into the fault, plans the repair | read and write what the job keeps; hand the three readings on. An order is proposed to a person, every time |
| Diagnoser | reads the machine's fault log | only read |
| History reader | reads what the workshop did to the machine before | only read |
| Manual reader | looks the fault code up in the maker's manual | only read — on a small allowance of its own |

### What is the process?   {#process}
Nine steps a repair can be at, and three ways it can end. Two of the steps are the coordinator's work; six wait for
a person; one — "Found by hand" — exists for when the coordinator cannot.

![The repair's page once it is over: the process drawn downwards with the way this repair went, round the loop twice, beside what happened at each step](https://osysharp.com/media/ref/364e22-assignments-work-queues-repair-run-wide-light.png)

*The page of this repair, afterwards. The heavy line is the way it went; the dashed line back to the top is the
second look. A process this long is drawn downwards beside its history instead of being squeezed into one row.*

Behind the process is a **job**: an [[agent-guide-glossary#assignment|assignment]] with three things that must be true before it is done — the cause is
found, the customer approved the cost, the press ran clean for a shift. The process is how the workshop usually gets
there. The job is what stays when the process has to go round again.

### Monday 3 March: the report, and three readings at once   {#monday}
Carl telephones: the press stops with E41 two or three times a week, always after it has run a while. Dana opens
the job, and the repair starts.

The **Service coordinator** hands out three readings in one go: the fault log to the Diagnoser, the service history
to the History reader, the manual to the Manual reader. Two come back. The Manual reader has a small allowance —
the manual is a long read — spends most of it on its first step, and is stopped before the next: its money ran out.

The coordinator goes on without it, and says so in what it writes down on the job: E41, pilot pressure low,
fourteen times since March; nothing in the history touches the pilot circuit; the manual was not read. Most likely
the pilot valve. Readings from the customer's operator would settle it.

![The coordinator's first piece of work, opened: what it was given, what it handed back, what it cost, and the three readings it handed on — the manual's stopped](https://osysharp.com/media/ref/364e22-assignments-work-queues-repair-work-wide-light.png)

### Wednesday to Friday: a form, and an inspection that goes on to somebody else   {#first-week}
The process asks Carl for three readings. It is a form made from three fields — pilot pressure, main pressure, when
it faults — in his inbox, and the job says it is waiting on him. Two days later his operator fills it in: 38 bar on
the pilot circuit, faults when the press is warm.

Tariq is asked to inspect the valve block, within a day. He is at another customer's and does not answer. On
Thursday the request's date passes, and it **goes on to Ines**, who was named to stand in. Nothing is decided by
the silence: the request still waits, the job's own trail says its date passed and to whom it went. On Friday Ines
inspects: the pilot valve's seat is scored; the block itself is sound.

### Friday to Monday: somebody outside   {#supplier}
The workshop needs to know whether the part can be had. Hydra Parts has no account in the workshop's app. The
process sends its contact a link. The link opens that one question and nothing else, and it is answered on a page
with three fields. On Monday Bo Ek answers: in stock, two working days, 140 euros. His answer is kept on the job as
what Hydra Parts said, by the name he gave.

### Monday 10 March: an order refused, and a smaller one approved   {#refused}
The coordinator plans the repair and wants to order a whole valve block: it replaces the valve and its seals in one
visit. It may not order anything alone. The [[agent-guide-glossary#proposal|proposal]] is put to the person who
answers for it — Mona — in her inbox.

![The manager's inbox: the coordinator proposes to order a valve block assembly for Press P-200, with its reason, what a yes would cover, and the job it is part of](https://osysharp.com/media/ref/364e22-assignments-work-queues-repair-inbox-proposal-wide-light.png)

Mona says no, and why: "Not the whole block: Ines found the block sound. The pilot valve only." Her reason reaches
the coordinator as the answer to what it tried. It proposes the pilot valve alone. She approves, and the part is
ordered at that moment, **as her**. The plan comes back: a pilot valve, four hours on site, 520 euros.

### Tuesday to Thursday: the customer's yes, and the repair   {#repair}
The cost is put to Carl as an approval of *this* quote. He approves on Tuesday. Ines, who inspected, is asked to
fit the valve; on Thursday she reports it changed and two hours clean on her test run.

That closes nothing. What "done" means here is a whole shift, and that is the customer's to show. The job cannot be
completed on the workshop's own word, and says on whom it waits.

### Monday 17 March: it did not hold   {#again}
Carl reports the first shift: three faults, the same E41, about an hour in.

The **same job** looks into it again. What it had settled — the cause, the cost — is back in question; everything
it holds is still there: the report, the readings, the inspection, the supplier's answer, the fitting, the shift.

And the coordinator cannot be reached: the [[agent-guide-glossary#model|AI model]] it uses does not answer. Its
job is set up to try once more; the second try fails too, and it gives up. The process was written to expect this,
and hands the finding to the manager.

### Tuesday 18 March: a person finds it   {#by-hand}
Mona reads what the job holds. One line of the service history stands out now: a guard on the valve side was
refitted in 2030 after a pallet truck hit it. She goes and looks. The pilot pressure sensor's cable chafes on that
guard and shorts when the press is warm. The valve was worn, and was not the cause.

The coordinator is back. It reads what the job holds before it proposes anything, and proposes a sensor cable. Mona
approves. A second repair is a second quote: Carl is asked again, for 230 euros, and approves on Wednesday. On
Friday Ines fits the cable.

### Monday 24 March: a whole shift clean   {#done}
Carl reports a whole shift without a fault. The last thing "done" means is met by his own report, which is an item
of the job, and the job is completed. The repair ends at "Runs clean", 21 days after it began.

### What does the repair's page say afterwards?   {#page}
Each step it was at, in order, with how long it stood there and what happened — including, for every step that
waited for a person, who was asked and who answered. A line about a request opens the request in place.

![A line of the run opened in place: the inspection request, with what Ines Falk found](https://osysharp.com/media/ref/364e22-assignments-work-queues-repair-run-request-open-wide-light.png)

On a phone the same page is one column: where it stands, the picture, then the history.

![The repair's page on a phone, in the dark](https://osysharp.com/media/ref/364e22-assignments-work-queues-repair-run-phone-dark.png)

### What did each person see?   {#who-saw}
None of this was built for this app. It follows from who they are.

- **Mona**, the manager, reads all of it: the job and everything it holds, the run and what it cost, each piece of
  the agents' work with what it was given and what it answered.
- **Ines and Tariq**, the technicians, read the job and what it holds, and follow the repair. What the AI models
  cost is not shown to them.
- **Carl**, the customer, sees where his repair stands and the five things he was asked — the readings, two quotes,
  two shifts. He cannot read the job, what it holds, the run, or a line of the agents' work.
- **Bo Ek**'s link opens his one question, with his own answer once he has given it. It opens nothing else.

### What was refused, and what was stopped?   {#stopped}
- **A refusal.** The manager's no to the valve block, with its reason, which the coordinator acted on.
- **A limit.** The Manual reader's allowance: it was stopped before a call that did not fit, and the work above it
  was told.
- **A date that passed.** The inspection request went on to the stand-in; it was not closed, and nothing was waived.
- **A failure.** The coordinator's model down on the second look: two attempts, then a person.
- **A job that is not done.** After the first repair the job could not be completed: one of its criteria was the
  customer's to meet.

### Where is this written down?   {#source}
In the test app of the kit that joins assignments and the inbox — a workshop called Pressworks.
`a_press_is_diagnosed_repaired_and_shown_to_run_and_the_same_job_is_opened_again_when_it_does_not` is the three
weeks, day by day; `the_run_of_a_repair_tells_each_state_it_was_in_and_what_happened_there` is the page;
`each_reader_of_a_repair_sees_what_is_theirs` is who saw what. Three more tests drive the screens in a real
browser. No AI model is called in any of them: the model is a scripted stand-in.

## What to read next   {#read-next}
- [A supplier is qualified — five days, four agents, one that failed, and a three-day wait](https://osysharp.com/reference/agent/story-supplier/) — a fixed process of four agent steps, one that fails and one that waits three days
- [A parcel that never came — a case owned until it is right, closed, and opened again](https://osysharp.com/reference/agent/story-delivery/) — work with no fixed steps: a lost parcel, settled and reopened
- [What stays under people's control — ten promises, and where each is shown](https://osysharp.com/reference/agent/overview-control/) — the promises this story relied on

## Go deeper   {#see-also}
- [Assignments — a piece of work owned until its outcome is reached (Assignments kit)](https://osysharp.com/reference/agent/assignments/) — a job that is owned until its criteria are met, and reopened when they no longer are
- [What an assignment asks of people — requests as an assignment's work and as inbox items (Assignments.WorkQueues kit)](https://osysharp.com/reference/agent/assignment-requests/) — what a job asks of people: requests as pieces of its work
- [Processes — every run of a business process, listed and read from start to now (Processes kit)](https://osysharp.com/reference/workflow/processes-kit/) — the page of a run, and how a long process is drawn
- [The inspector — one piece of an agent's work, readable by a person who was not there (Agents.Inspector kit)](https://osysharp.com/reference/agent/inspector/) — the page of a piece of work
- [Osysharp.Assignments.WorkQueues — what an assignment asks of people, in their inboxes and on the assignment](https://osysharp.com/reference/agent/kit-assignments-work-queues/) — the kit this story's app tests
