Osy#betaRun it on Osyrin: osyrin.com

Reference / Agent

Osysharp.Agents.HumanRequests — an agent's proposals and questions, in the inbox of the person they are for

`Osysharp.Agents.HumanRequests` is the bridge between agents and requests: what an agent proposes becomes an approval in a person's inbox, what it asks becomes a question there, and the person's answer is carried back to the work that waits.

previewagentsguidekit

Source on GitHub: Osysharp.Agents.HumanRequests — github.com/osysharp/agents/humanrequests ↗

You are here: Building with agents › The kits › Agents.HumanRequests

Summary#

Osysharp.Agents.HumanRequests is the bridge between agents and requests: what an agent proposes becomes an approval in a person's inbox, what it asks becomes a question there, and the person's answer is carried back to the work that waits.

Approving in the inbox is approving the proposal: it runs as whoever approved, for what was shown. A person can also hand an inbox item to an agent and take it back.

PackageOsysharp.Agents.HumanRequests, version 1.3.0
You add it withNothing. It arrives by itself in an app that uses [[agent-kit-agents|Agents]] and [[agent-kit-human-requests|HumanRequests]]; osy lock says so. without Osysharp.Agents.HumanRequests; in the manifest keeps it out.
It sits on[[agent-kit-agents|Agents]], [[agent-kit-human-requests|HumanRequests]], [[agent-kit-llm|Llm]], [[agent-kit-work-queues|WorkQueues]]
It also usesIdentity, Ui — parts of the platform's own library
Bridges that arrive when it meets another kit[[agent-kit-privacy-agents-human-requests|Privacy.Agents.HumanRequests]]
Its own test appThe purchasing office of a bakery group, taking on a new supplier — kits/agents-human-requests/tests

Description#

What do you get without writing anything?#

  • A proposal shown as the exact call, why, and what the agent had looked at first.
  • "Approve, and let it do this alone from now on", offered only to somebody who may say so.
  • A proposal routed to a queue waits in that queue, and the person who asked cannot approve it.
  • Work an agent gave up on is put to its sponsor.
  • The tree of a piece of work on a page, with who each piece is waiting for.

When do you need it?#

Shape 2. You do not write it in the app's manifest: it arrives by itself.

What does it expose?#

The tables below are generated from the kit itself, not written by hand: osy kits Osysharp.Agents.HumanRequests --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 writeIt says
app.AgentRequests = new AgentRequestsSetup { Queue, DecideWithin, AnswerWithin, GiveUpAfter, Hours, TellSponsorOfFailures }How this app puts its agents' proposals and questions to people.

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

FunctionWhat it doesTests that show it
ForgetWhoHandedWorkToAgents(Principal person)Take a person off the items they handed to agents: each handover no longer says who gave it.21
HandBack(AgentTask task, string note)The agent's work on an item ended: the item goes back to whoever handed it over, with what came of it.19
HandoversWaitingOn(Principal person)How many items an agent still holds that person handed over.19
ProposalCardOf(Guid proposal)A proposal, for the request that is about it.5
WorkTreeCardOf(Guid task)The tree of the work task is part of — the top first, each piece followed by what it handed on.2
HandoversBy(Principal person)Every handover person made, oldest first.1
ApproveAndAllowAlone(Guid proposal, Guid request)"YES — and from now on, do this alone": the standing rule first (AllowAlone: for the work the agent does for whoever says so), then the request answered with a yes, which approves the proposal …1

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

ComponentWhat it draws
ProposalOnARequest(subjectType, subjectId, request, changed)What an agent proposes, drawn on the request that asks for its approval.
ProposalBlock(card, confirming, problem, ask, back, always)The proposal itself: what will happen, to what, what the agent had looked at — and how to let it do this alone.
AgentWaitingOnPeople(agent, open)Who an agent is waiting on — every open request the agent has put to a person: its proposals to decide and its questions to answer, of whom, since when, and whether each is late.
WorkWaitingOnPeople(task, open)The same for one piece of an agent's work, by its receipt — and for everything that piece handed on: a request three pieces down is what the piece at the top is waiting on too.
AgentWorkTree(task, open)The tree of a piece of agent work, on its page: who is doing what, for whom it waits, and what it has cost.
WorkTreeBlock(card, open, refresh)The tree itself.
WorkTreeRow(line, open)One piece: indented under the piece that handed it on.

Events your app can hear — [On] void Heard(EventName e) { … }

EventWhen
WorkHandedToAgentAn item was handed to an agent.
WorkBackFromAgentAn item came back from an agent — handed back when its work ended, or taken back by a person.

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…

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…

What an agent does alone, what it proposes, what it never does — the gate and proposals (Agents kit)

An agent's class says what it may do alone, what it must propose to a person first, and what it never does — by what a…