Osy#betaRun it on Osyrin: osyrin.com

Reference / Agent

Osysharp.Shop.Agents — a description writer on the shop's desk

`Osysharp.Shop.Agents` is the bridge between the shop and agents: a description writer that drafts a product's description from its details when staff ask, offered in the product editor to change and save, and never used by itself.

previewagentsguidekitshop

Source on GitHub: Osysharp.Shop.Agents — github.com/osysharp/shop/agents ↗

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.

PackageOsysharp.Shop.Agents, version 1.0.0
You add it withNothing. 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 appA 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.

Go deeper#

Related

The map of the kits — which sits on which, and what each one is for

The agents family is 29 kits. Two are under everything: `Osysharp.Llm` for every model call and `Osysharp.Agents` for…

Osysharp.Agents — an agent given a real job inside an app, and trusted with it

`Osysharp.Agents` is the core: an agent is a class with an account of its own, a skill is a typed job whose tools are…

The Shop kit's listing — search, sizes and sorting, with a card of your own

`ShopSearchPage` is the Shop kit's listing: every listed product as a card with its photograph, its price and how much…