You are here: Building with agents › The kits › Processes
Summary#
Osysharp.Processes lists the runs of an app's business processes, draws where each one is, and tells what happened to it in order — for somebody who was not there.
A process is a workflow. One small class says which workflow is a process, what a run is called, and where its history comes from. Nothing is written in the workflow itself.
| Package | Osysharp.Processes, version 1.3.0 |
| You add it with | use Osysharp.Processes; in the app's manifest. |
| It sits on | [[agent-kit-llm|Llm]] |
| It also uses | Diagrams, Identity, Ui, Workflow — parts of the platform's own library |
| Bridges that arrive when it meets another kit | [[agent-kit-agents-processes|Agents.Processes]], [[agent-kit-human-requests-processes|HumanRequests.Processes]] |
| Its own test app | The programme office of a small film festival — kits/processes/tests |
Description#
What do you get without writing anything?#
- The list of runs: by process, by state, and which are stuck.
- One run's page: the picture with the way it went, each state and how long it stayed, what happened there.
- What a run cost against what it may.
- A reader who may not see what a run is about is told that it exists, and no more.
When do you need it?#
Shape 3. Also with no agents at all: any workflow people need to follow.
What does it expose?#
The tables below are generated from the kit itself, not written by hand: osy kits Osysharp.Processes --surface lists each of
them with the code of the kit's own test app that uses it, and the tests that show it working.
Settings — one line in the app, each field with a default.
| You write | It says |
|---|---|
app.Processes = new ProcessesSetup { Processes, RunPage, StuckCheckEvery } | How this app follows its processes. |
Types you derive from — your app writes a class of its own.
| Type | What it is |
|---|---|
Process | A process over one kind of row — the row its workflow tracks. |
Policies you answer — each is a question the kit asks your app: policy Name => …;
| Policy | The question | Until the app says otherwise |
|---|---|---|
FollowsProcesses | Who opens the list of process runs and a run's page. | nobody |
ErasesProcessRecords | Who deletes what the kit keeps of a run — its notes, and that it was seen. | nobody |
Functions you call, those its own tests show most first.
| Function | What it does | Tests that show it |
|---|---|---|
TellOfStuckRuns(DateTime now) | Tell the app of every run that is stuck at now — a run that still runs and came to its state longer ago than its process allows — once for each stay: ProcessStuck is raised for each. | 17 |
ForgetProcessRun(ProcessRun run) | Delete what the kit keeps of a run: its lines, and that it was seen. | 17 |
HistoryOf(ProcessRun run, ProcessBase? process) | A run's history as whoever is looking may read it, and whether its last line is a failure nobody handled. | 16 |
ProcessRunOf(Guid id) | One run, told from start to now: the picture, each state it was in and for how long, what happened there, what it cost, and the runs around it. | 15 |
ProcessRunsNow(ProcessFilter filter, int most = …) | The runs of the app's processes, newest first, narrowed by filter — at most most of them. | 14 |
ProcessRunAbout(string workflow, Guid item) | The kit's row for the run of workflow about item — the newest, when it ran more than once. | 13 |
SetProcessBudget(string workflow, decimal perRun, LlmOnLimit onLimit = …) | Each run of a process may spend at most this on models, in US dollars — "onboarding may spend two dollars a supplier". | 2 |
SetRunBudget(ProcessRun run, decimal limit, LlmOnLimit onLimit = …) | The same for ONE run — more room for a run that needs it, or less. | 1 |
RemoveProcessBudget(string workflow) | Take the limit off the runs of a process. | 1 |
NoteOnProcessRun(ProcessLine line) | A line about a run, from a kit that records its own steps there — Osysharp.Agents.Processes says when an agent was given work in a run, and how the work ended. | 1 |
Screens and components you mount — each is one line in a page of yours.
| Component | What it draws |
|---|---|
ProcessMomentLine(moment) | One thing that happened, as a line under the state it happened in. |
ProcessRunWatch(run, changed) | Tells its page when what the kit keeps of a run changes — the engine said it moved or ended, or a line was said about it — so the page reads the run again. |
ProcessRunPicture(view, tall) | The picture of a run: every state of its process, where the run is, and the path it took. |
ProcessRunHistory(view) | What happened to a run: each state it was in, in order, when it got there and how long it stayed, with what happened there — narrowed to the whole run, the steps other kits recorded, or what went wrong. |
ProcessRunInspector(run) | One run, read from start to now — what a person who was not there needs: what it is about and where it stands; the picture; each state it was in, when it got there and how long it stayed, with what happened there in order; what it has spent on models against what it may; the run that started it and the runs it started. |
ProcessRunLine(run, opened) | One run, as a line of the list. |
ProcessRunsWatch(changed) | Tells the list when a run starts, moves or ends, so it reads the runs again. |
ProcessRuns(opened) | The runs of the app's processes — newest first, with where each one is, how long it has run and what it has spent; narrowed by process, by what is running, stuck or ended, and by a word of the title. |
Slots you can fill — a place on the kit's screens where your app, or another kit, adds a section.
| Slot | What goes there |
|---|---|
ProcessMomentPanel(string kind, Guid subject) | What a line of a run is about, opened in place. |
ProcessRunPanel(Guid run) | More about a run, under its history — a section each from the kits that know something of it. |
Events your app can hear — [On] void Heard(EventName e) { … }
| Event | When |
|---|---|
ProcessStuck | A run has been where it is for longer than its process allows (Process.StuckAfter). |
What to read next#
- Osysharp.Agents.Processes — an agent's work as a step of a business process, seen from both sides — an agent's work as a step of a business process, seen from both sides
- Shape 3 — agents inside a business process — Shape 3 — agents inside a business process
- A supplier is qualified — five days, four agents, one that failed, and a three-day wait — a supplier is qualified — five days, four agents, one that failed, and a three-day wait
Go deeper#
- Processes — every run of a business process, listed and read from start to now (Processes kit) — the kit: runs, the picture, cost, who reads what
- Workflows (the run that outlives the request) — workflows