You are here: Building with agents › The kits › Shop.Agents
Summary#
Osysharp.Shop.Agents is the bridge between the shop and agents. Its first agent is a description writer: on a
product in the desk, "Draft a description" asks it for one, written from the product's name, brand, category, sizes,
colours, spec sheet and the words it already has.
What it writes is offered under "Prepared by Description writer". Staff take it into the description, change it and save the product, or discard it. Nothing it writes reaches the shop floor by itself.
| Package | Osysharp.Shop.Agents, version 1.0.0 |
| You add it with | Nothing. It arrives by itself in an app that uses [[agent-kit-agents|Agents]] and the Shop; osy lock says so. You list the writer in app.Agents. |
| It sits on | [[agent-kit-agents|Agents]], [[agent-kit-llm|Llm]], Osysharp.Shop 1.4 |
| Its own test app | A small clothes shop with one coat — kits/shop-agents/tests |
Description#
What do you write?#
List the writer among the app's agents — app.Agents = new AgentsSetup { Agents = [new DescriptionWriter()] }; — and
say who uses and supervises agents: policy UsesAgents => IsShopStaff; and policy SupervisesAgents => IsShopStaff;.
The model and its price are the app's app.Llm, as for every agent; declare its Price so each receipt says what a
draft cost. The kit's own test app (kits/shop-agents/tests/model/setup.osy) is the whole of it.
What do you get without writing anything?#
- Off until staff switch it on. The desk's Settings show the writer, who answers for it, and the last 30 days of drafts and what they cost. Whoever switches it on answers for it; switching it off pauses it.
- No tools and no role. The writer is told the product's details, read with the asking staff member's own access. It reads nothing they could not, and changes nothing.
- A capped cost. One draft may spend at most 5 cents, and its receipt says what it cost at the model's list price.
- Offered, never used. A draft waits in the product editor until somebody takes it or discards it. A new draft replaces the last.
- Plain words when it fails. A draft the model could not write says "Try again, or write it yourself."
Can something else write the drafts?#
The shop finds its writer as it finds an add-on: any class that implements IProductWriter (Osysharp.Shop). A kit
of your own can be one — a supplier's catalogue, a translation service — and the editor and the settings work the same.
What to read next#
- Osysharp.Agents — an agent given a real job inside an app, and trusted with it — agents as typed classes, with a receipt for every piece of work
- The Shop kit's listing — search, sizes and sorting, with a card of your own — the Shop kit's listing
Go deeper#
- Osysharp.Assignments.Agents — an agent's work, attached to the assignment it is for — another bridge between a kit and agents