Osy#betaRun it on Osyrin: osyrin.com

Reference / Agent

Choosing — I want X, so use Y, not Z, because

Seven tables for the choices that come up in every app with agents in it: an agent or a plain model call or a workflow step; alone, propose, or a standing rule; an assignment or a process; one agent with more tools or delegation; a queue or a person for approvals; when each Privacy kit arrives; and how to test without a model. Each row says what to use, what not to, and why.

previewagentsguide

You are here: Building with agents › Choosing

Summary#

Find the row that says what you want. Each one names what to use, what to leave, and the reason in a sentence. Every "use" is a link to the page that shows it working.

Description#

Do I need an agent, a model call, or a workflow step?#

I wantUseNotBecause
one answer from a model: a summary, a draft, a translation[[agent-llm-calls|Llm.Complete]]an agentnothing has to be looked up or changed, so there is nothing for an agent's account, gate or record to do. The call is still routed, limited and metered.
fields read out of a text, or one decision among a few[[agent-llm-typed-answers|Llm.Extract<T> · Llm.Decide<T>]]an agentthe answer is typed and checked against its class already
the model to look things up in my app, or change something in itan [[agent-agents|agent]] with a [[agent-skills|skill]]a model call with my own loop around ittools then run as an account with rights, under a gate, within a limit, on a record
the same steps every time, with no judgement in thema plain function or a [[workflow-index|workflow]]an agentit is cheaper, exact, and needs no model
steps over several days, with people between them, and judgement in one or two of thema workflow with an [[agent-processes|agent step]]one long agent jobthe process owns the order and the waiting; the agent does only the step that needs judgement
a conversation with a person[[agent-ask#ask|Ask or Stream]] on an agentDothe answer is words, not a typed result

Should it act alone, propose, or get a standing rule?#

The toolUseNotBecause
only readsnothing: it runs alone—a tool marked Query is never proposed
changes the app's own data, and a person reads the result anywayAlone, or [[agent-autonomy#gate|Permits.ChangesAlone()]]proposing each onean approval nobody ever refuses teaches people to press yes
sends something, spends money, or reaches outside the app[[agent-autonomy#proposal|propose]] — the defaultPermits.Everything()it cannot be taken back, and a person's yes runs it with that person's rights
must be seen by a person every single timeProposeEveryTimea standing rulea tool listed there takes no "from now on, alone"
must never be done by this agentNevertrusting the instructionsthe tool is not offered to the model at all, and cannot be approved
is approved again and again by the same persona [[agent-autonomy#standing|standing rule]]changing the codeit covers only the work done for the person who gave it, counts its own use, and can be taken back
belongs to another departmenta skill's [[agent-autonomy#route|DecidedBy]], to a restricted queuethe defaultthe person who asked then cannot approve it themselves

Is this an assignment or a process?#

The workUseNotBecause
has the same steps each time, known in advancea [[agent-processes|process]]an assignmentthe steps are the point: they can be drawn, timed and followed
has a known outcome and an unknown way therean [[agent-assignments|assignment]]a processit is done when its criteria are met, not when everything attached to it has finished
may come back after it was closedan [[agent-assignments#reopen|assignment]]a new process runit reopens and keeps everything it had
is one question or one approvala [[agent-human-requests|request]]eithera request is answered once and is done
gathers evidence, letters and findings as it goesan assignment with a [[agent-work-repositories|work repository]]lines in a logeach item keeps who added it, from where, and every version

The two combine. An assignment can have agent work, requests and a process attached to it; any of them can fail or be replaced and the assignment stays. See [[agent-assignments#work]].

One agent with more tools, or delegation?#

The jobUseNotBecause
is small, and needs one set of rightsone agent, more toolsdelegationevery piece handed on is a piece of work of its own, with its own model calls
has parts that need different rights[[agent-delegation|delegation]]one agent with every rolea specialist acts with its own agent's roles, so no agent holds more than its part needs
has parts that can be done at the same timedelegationone agent doing them in turnpieces asked for in one turn run side by side
has a part that must not spend past a sharedelegation with budget:one limit for everythinga piece that runs out is stopped alone; the rest goes on
has parts that people correct separatelya skill each, or an agent eachone large skillcorrections and instructions are kept for each agent and skill

Who approves: a queue or a person?#

The decisionUseNotBecause
is the asker's own to makenothing: it goes to the person the work is fora queuetheir yes runs it with their own rights
is made in a process, where nobody is signed innothing: it goes to the agent's sponsor — or .For(person) on the stepa queue nobody watchessomebody always answers for an agent
belongs to a role with several holders[[agent-autonomy#route|ProposalRoute.ToQueue("Finance")]], a restricted queuethe person who askedwhoever works that queue decides, and the asker is refused even when they work it too
belongs to exactly one office holderProposalRoute.ToPerson(account)a queue of oneit is put to them by name
must not wait when that person is awaythe policy [[agent-roles#deciders|DecidesAgentProposals]]sharing an accountwhoever it admits may decide a proposal put to somebody else

A queue that is not restricted is worked by everybody who works the inbox. Restrict the queue a routed proposal goes to. See The WorkQueues kit — queues, who holds what, and the service levels promised on any item.

When does each Privacy kit arrive?#

You add Osysharp.Privacy when the app holds personal data and must answer a person who asks what is held, or asks to be erased. The four below are never written in a manifest: each arrives by itself when the app uses both kits it sits between.

The app uses Privacy andIt getsIt coversYou write
[[agent-kit-agents|Agents]][[agent-kit-privacy-agents|Privacy.Agents]]what agents did for a person and about a personMarkAgentWorkAbout(task, subject) for work about somebody
[[agent-kit-llm|Llm]][[agent-kit-privacy-llm|Privacy.Llm]]the model calls made for a person; the meter keeps no textnothing
[[agent-kit-assignments|Assignments]][[agent-kit-privacy-assignments|Privacy.Assignments]]the people on an assignment and the person it is aboutMarkAssignmentAbout(a, subject)
[[agent-kit-work-repositories|WorkRepositories]][[agent-kit-privacy-work-repositories|Privacy.WorkRepositories]]the items a piece of work keeps about a person, each kind for its own timeMarkItemAbout(item, subject)

More: Privacy for the agent family — agents, the model meter, assignments and work repositories under a person's request.

How do I test without a model?#

I want to testUseBecause
one model call[[agent-llm-scripted-model|ScriptedModel and ScriptedAnswer.Stub]]routing, limits and the meter are the real ones; only the provider is scripted
what an agent does[[agent-testing|AgentScript.Of(Says.Tool(…), Says.HandBack(…))]], then Trajectory.Of(task)the script says what the model answers turn by turn; the test reads back what the agent then did
several agents at once[[agent-testing#cast|AgentCast]]each agent gets its own script; Trajectory.Tree reads the tree back
a whole process[[agent-testing#process|ProcessTrail]]which skills ran, in which states, how each ended, what it cost
a person's answerrunas (Person) { ApproveAgentProposal(…) } or AnswerRequest(…)the yes runs as that person, exactly as on screen
a wait of daysTestClock.Advance(TimeSpan.FromDays(3))nothing sleeps; the test asserts no model was asked meanwhile
a provider that is downthrow ExternalServiceException from the scriptfallback, retries and the failure branch are then real

None of it costs anything or needs a key. Every example in this guide is tested this way.

Go deeper#

Related

Building with agents — the developer's guide

Where a developer starts with agents in an Osy# app. Decide what you are building, read the smallest working app for…

Deciding what to build — four shapes of app with agents in it

Start from what the app is for, not from the kits. There are four shapes: an assistant for one person, work done for…

The six decisions — what you say about an agent, and what holds if you say nothing

Every app with an agent in it decides six things: who the agent acts as and for whom; what it may do alone, proposes…

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…

An agent hands work on to other agents — at once, typed, and never with more than it holds (Agents kit)

An agent's class may name work it hands on: skills of other agents, or of its own done apart. Its model is offered each…

Assignments — a piece of work owned until its outcome is reached (Assignments kit)

An assignment of the `Osysharp.Assignments` kit says who asked, the outcome wanted and what must be true for it to be…

Agents in business processes — an agent's work as a step of a workflow, told on the run (Agents.Processes kit)

An agent's work is a step of a business process by being called from the process's workflow: an awaited call in a…

Privacy for the agent family — agents, the model meter, assignments and work repositories under a person's request

An app that uses `Osysharp.Privacy` beside the agent kits gets a holder for each without writing one:…

Testing an agent without a model — Says, AgentScript and Trajectory (Agents.Testing kit)

`Osysharp.Agents.Testing` scripts what the model answers, turn by turn, and reads back what the agent then did. Only…

The Llm kit — call a model, and know what each call cost

`Osysharp.Llm` is the road every model call takes, written in Osy#: the operator's AI switch, the app's router, a…