Osy#betaRun it on Osyrin: osyrin.com

Reference / Agent

Two suppliers for a bakery group — a week's wait, an outsider's answer, and one agent directing three

A bakery group's purchasing office takes on a flour mill and qualifies a dairy. The mill's own contact fills in a form through a link, with no account. An agent's question waits a week for the purchasing lead, and its work goes on from the same point when he answers. For the dairy, one agent hands three assessments to three specialists at once: one finishes, one waits for a person's approval, one runs out of its allowance. A proposal about money goes to Finance, and the buyer who asked is refused when she tries to approve it herself.

previewagentsguidestory

You are here: Agents in an Osy# app › Stories › Two suppliers for a bakery group

Summary#

Crumb & Crust is a group of bakeries. Its purchasing office buys flour, butter and milk, and has to decide which companies it buys them from. This is the story of two of those decisions in the same fortnight: a mill, and a dairy.

It shows three things the first story did not: somebody outside the company answering, a wait of a week, and several agents working at once.

Description#

Who is involved?#

PersonTheir jobWhat they may do
Noor Haddadbuyerask agents for work; work the purchasing inbox. May not clear a supplier or agree a payment term
Ilse Brandtbuyerthe same; she also helps out in Finance's inbox
Tariq Azizpurchasing leadanswers for all five agents; may clear a supplier; may say "from now on, do this alone"
Femi Okafor, Rosa Lindqvistfinancework Finance's inbox, which only its members see
Greta Hollinthe mill's own contacthas no account; answers through a link sent to her
AgentIts jobWhat it may do alone
Vettervets one supplier; settles payment termsnote a risk. Clearing a supplier and agreeing a term are proposed. It may ask a person about a payment term over 30 days
Qualifierin charge of a qualificationhands three assessments on, and decides from what comes back
Finance assessoris the company sound?note a risk
Safety assessoris its food safety good enough?only read: a restriction is proposed
Terms readerare its terms acceptable?only read, within a small allowance

Part one: the mill#

Monday. Noor starts the onboarding of Hollin Mill. The office does not have the mill's details, so the process asks for them: Greta Hollin, at the mill, is sent a link to a short form — registration number, country, the payment term the mill asks for. No [[agent-guide-glossary#agent|agent]] has done anything yet.

Wednesday. Greta fills the form in. The mill is registered in England and asks to be paid in 45 days. The process takes her answers and moves to vetting.

The Vetter looks the company up: registered 1987, active, nothing against it. But 45 days is more than the office's standard 30, and its instructions say that is the purchasing lead's to accept. So it asks him:

A question from the Vetter in the purchasing lead's inbox: Hollin Mill asks to be paid in 45 days. Is that acceptable?

The question arrives with its context: "Our standard term is 30 days. The register shows nothing against the company."

The following week. Tariq is away. For seven days nothing runs. The Vetter has made two calls to its AI model so far, and that number does not move. The onboarding says what it is waiting for, and on whom.

The Wednesday after. Tariq answers: "Yes, 45 days is fine for a mill." The Vetter's work goes on from exactly where it stopped, with his answer in hand. Now it wants to clear the mill to trade — and that is not its to do alone. A second item arrives in Tariq's [[agent-guide-glossary#inbox|inbox]]: an approval, showing the supplier, 45 payment days, and what the Vetter had looked at.

He approves. The mill is cleared as Tariq, and the onboarding ends at Trading. The record of the work says so in three plain lines: it asked Tariq Aziz a question because it chose to; Tariq Aziz answered after 7 days; Tariq Aziz approved, and it ran as them.

What if somebody else had said yes?#

In another run, the same [[agent-guide-glossary#proposal|proposal]] comes to Noor, because she is the one who asked. She approves it. A buyer may not clear a supplier, so nothing is cleared, and she is told: "It was approved, and could not be done."

A yes is never more than the person saying it could have done themselves. Noor is also not offered "let it do this alone from now on"; Tariq is.

Part two: the dairy#

Monday. Noor asks for Saltmarsh Dairy to be qualified. That is three questions, for three kinds of knowledge, so the Qualifier hands them on — all three in one go:

  • The Finance assessor looks the dairy up, notes "one charge outstanding", and reports: sound, with one routine charge. Done.
  • The Safety assessor reads the last inspection: the cold store passed; the dry store was not seen. It concludes that only chilled goods are shown to be safe and wants to restrict what the dairy may deliver. A restriction changes things, so it is proposed.
  • The Terms reader starts on the dairy's standard terms, which are long. Its allowance was small on purpose. It runs out, and the reading is stopped.

The page of the work shows all of that at once:

The tree of the dairy's qualification: the Qualifier waiting; the Finance assessor done; the Safety assessor waiting for a decision from Noor Haddad; the Terms reader stopped because its money ran out

One line at the top says what the whole thing is waiting for: the Safety assessor, which waits for a decision from Noor Haddad.

The proposal went to Noor, though it came from two agents down: it is put to the person the whole job is for, and says through whom it comes — "Safety assessor, working for Qualifier".

Thursday. Three days pass. Nothing runs. Noor approves the restriction: "Chilled goods only." It is written as changed by the Safety assessor, for Noor. The Safety assessor finishes; the Qualifier, which was waiting for it, goes on and decides:

  • Take the dairy on.
  • Chilled goods only, until the dry store is inspected.
  • The terms were not read: the reading ran out of its allowance. Have them read before the first order.

The same tree, finished: three pieces done, the Terms reader still stopped, and what the whole cost

The agent in charge did not hide the part that failed. It was told how that part ended and what it had found, and it said so in its answer.

Part three: a decision that belongs to Finance#

Clearing a supplier is purchasing's decision. A payment term is money, and at Crumb & Crust money is Finance's. So the Vetter's job of settling a term says where its proposals go: to Finance's inbox, not to whoever asked.

Three things follow, each tested:

  • Noor asks for the dairy's term to be settled. Nothing appears in her inbox. The work says it waits for "a decision from the Finance queue". When she tries to approve it directly she is refused: the proposal is decided by Finance.
  • In another run it is Ilse who asks. She also works Finance's inbox, so she can see the item. When she tries to approve it there she is told: "This decides something that was asked for you, so it is not yours to answer. It waits for the people of Finance."
  • Rosa, in Finance, reads what the agent proposes and what it looked at, and rejects it: "We pay this dairy in 14 days." The agent is given her reason.

Asking an agent for something is not the same as approving it.

What did it cost?#

The dairy's qualification was nine calls to an [[agent-guide-glossary#model|AI model]] across four agents, and the page above shows what each piece cost and what the whole cost. The Terms reader could spend at most its own small allowance, and was stopped there; the other pieces were not touched.

The amounts on the screens are fractions of a cent because this is a test: the model is a scripted stand-in with made-up prices. What the tests check is the arithmetic. The whole costs what its pieces cost, and no piece spends past its share.

Where is this written down?#

In the test app of the kit that joins agents to the inbox. a_supplier_is_taken_on_from_its_application_to_trading is the mill; a_supplier_is_qualified_by_an_agent_in_charge_and_three_specialists is the dairy; whoever_the_work_is_for_does_not_decide_it_from_the_queue_she_works is Ilse and Rosa. No AI model is called in any of them.

Go deeper#

Related

Agents in an Osy# app — what they are, in plain words

An app written in Osy# can have AI agents that people can trust with real work. An agent is a part of the app with a…

A supplier is qualified — five days, four agents, one that failed, and a three-day wait

A tool maker qualifies a new supplier of castings. Four agents do the reading steps of a fixed process. One of them…

A parcel that never came — a case owned until it is right, closed, and opened again

A tea shop's customer reports that her order has not arrived. The shop opens an assignment: a piece of work it owns…

Shape 2 — work done for people, with approvals

The agent may do some things alone and must propose the rest. A proposal lands in a person's inbox as an approval…

Shape 4 — a team of agents with a coordinator

One agent is in charge of a job and hands typed pieces of it to specialists, several at once. Each piece is a piece of…

An agent's proposals and questions in a person's inbox, and an inbox item in an agent's hands (Agents.HumanRequests kit)

With the Agents kit and the HumanRequests kit both in an app, this bridge is there: what an agent proposes is an…

An agent hands work on to other agents — at once, typed, and never with more than it holds (Agents kit)

An agent's class may name work it hands on: skills of other agents, or of its own done apart. Its model is offered each…

Requests to people — a question, an approval, a form, and the answer coming back (HumanRequests kit)

The `Osysharp.HumanRequests` kit puts something to a person — a question with the options it may be answered with, an…