# Osysharp.Agents.Processes — an agent's work as a step of a business process, seen from both sides

> `Osysharp.Agents.Processes` is the bridge between agents and processes: each piece of an agent's work given in a run is told on that run, and the page of a piece of work says which run it is a step of.

<!-- id: agent-kit-agents-processes · area: agent · stability: preview · html: https://osysharp.com/reference/agent/kit-agents-processes/ -->

> **You are here:** [Building with agents](https://osysharp.com/reference/agent/guide/) › [The kits](https://osysharp.com/reference/agent/guide-kits/) › Agents.Processes

## Summary        {#summary}
`Osysharp.Agents.Processes` is the bridge between agents and processes: each piece of an agent's work given in a run is told on that run, and the page of a piece of work says which run it is a step of.

The step itself is an ordinary call in the workflow. The bridge adds the telling, and the money: every model call of the step is charged to the run, and a limit set for each run stops a step that would pass it.

|  |  |
|---|---|
| Package | `Osysharp.Agents.Processes`, version 1.1.0 |
| You add it with | Nothing. It arrives by itself in an app that uses [[agent-kit-agents\|Agents]] and [[agent-kit-processes\|Processes]]; `osy lock` says so. `without Osysharp.Agents.Processes;` in the manifest keeps it out. |
| It sits on | [[agent-kit-agents\|Agents]], [[agent-kit-agents-inspector\|Agents.Inspector]], [[agent-kit-llm\|Llm]], [[agent-kit-processes\|Processes]] |
| It also uses | `Identity`, `Ui` — parts of the platform's own library |
| Its own test app | The procurement office of a tool maker, qualifying a new supplier — `kits/agents-processes/tests` |

## Description    {#description}

### What do you get without writing anything?   {#free}
- A line on the run for each step: given, waiting on a person, finished, failed, stopped.
- A step opened in place on the run's page, as the whole inspector.
- A run listed from its first agent step, with nothing written in the workflow.
- "Agent work in this run", with what each piece cost.

### When do you need it?   {#when}
[Shape 3](https://osysharp.com/reference/agent/guide-process/). It arrives by itself.

### What does it expose?   {#exposes}
The tables below are generated from the kit itself, not written by hand: `osy kits Osysharp.Agents.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.

**Functions you call**, those its own tests show most first.

| Function | What it does | Tests that show it |
|---|---|---|
| `AgentWorkSubject()` | What a line of a run is about when it is about an agent's piece of work: the receipt, by its id. | 2 |
| `AgentWorkInRun(Guid run)` | The agent work given in a run, in order — each piece the run itself gave, with the state that gave it, how it ended and what it cost with the work it handed on. | 2 |
| `ProcessRunOfWork(Guid task)` | The run a piece of work is a step of. | 2 |

**Screens and components you mount** — each is one line in a page of yours.

| Component | What it draws |
|---|---|
| `AgentStepOpened(kind, subject)` | A line of a run that is about an agent's piece of work opens as the whole inspector, in place. |
| `AgentWorkOfRun(run)` | The agent work given in a run, with what each piece cost — under the run's history. |
| `RunOfThisWork(task)` | On a piece of work's own page: the run it is a step of, and the way to it. |

## What to read next   {#read-next}
- [Osysharp.Processes — every run of a business process, findable and readable](https://osysharp.com/reference/agent/kit-processes/) — every run of a business process, findable and readable
- [Shape 3 — agents inside a business process](https://osysharp.com/reference/agent/guide-process/) — Shape 3 — agents inside a business process
- [A supplier is qualified — five days, four agents, one that failed, and a three-day wait](https://osysharp.com/reference/agent/story-supplier/) — a supplier is qualified — five days, four agents, one that failed, and a three-day wait

## Go deeper   {#see-also}
- [Agents in business processes — an agent's work as a step of a workflow, told on the run (Agents.Processes kit)](https://osysharp.com/reference/agent/processes/) — an agent's work as a step of a workflow
- [Processes — every run of a business process, listed and read from start to now (Processes kit)](https://osysharp.com/reference/workflow/processes-kit/) — the Processes kit
