Class AgentInvocation
What one request to an agent asks for: the settings a caller may state, and that an AgentDefinition fills in wherever the caller stayed silent (ApplyTo(AgentInvocation)).
public class AgentInvocation
- Inheritance
-
AgentInvocation
- Inherited Members
Examples
var invocation = new AgentInvocation { System = "Answer in French." };
definition.ApplyTo(invocation);
// invocation.System now starts with the definition's prompt, followed by "Answer in French."
Remarks
Null or empty means the caller stayed silent. Anything the caller states wins over the definition, except the system text, where the definition's prompt is a prelude the caller's own text follows. The type is open so a host can carry its own request fields beside these.
Properties
- HandoffDestination
Gets or sets where the host delivers a hand-off; empty records it only.
- HumanHandoff
Gets or sets whether the request's agent may hand the conversation over to a person.
- Knowledge
Gets or sets the knowledge sources the request is grounded in. Set by ApplyTo(AgentInvocation); the host resolves the sources under the caller's own rights and attaches them (ToAgentKnowledge(IKnowledgeRetriever)).
- MaxToolCalls
Gets or sets the most tool calls one turn may spend; 0 leaves the host's default.
- Memory
Gets or sets the memory id the request remembers under.
- MemoryShared
Gets or sets whether Memory is the definition's memory shared by every end user of the host's tenant (AgentMemoryScope) rather than each caller's own. Set by ApplyTo(AgentInvocation); a host never lets a request ask for it.
- MemoryStore
Gets or sets the name of the memory store (policy) the memory lives under.
- Model
Gets or sets the catalog id of the model the request answers with.
- OutputSchema
Gets or sets the JSON Schema text the answer must conform to; empty for free text.
- ProposalReport
Gets or sets where the answer reports the changes the agent proposed;
nullfor none.
- Reasoning
Gets or sets the thinking level:
none,low,medium,high, or empty for the model's default.
- RequireApproval
Gets or sets the approval rules the request's tool calls are held to, in the textual form of RequireApprovalFor(IEnumerable<string>).
- SimulateTools
Gets or sets whether tools that write are simulated rather than executed.
- Skill
Gets or sets the name of the skill pinned for the request.
- System
Gets or sets the system text. After ApplyTo(AgentInvocation), the definition's prompt followed by the caller's own.
- Tools
Gets or sets the names of the tools the request may use.
- UserQuestions
Gets or sets whether the request's agent may ask the user a question it cannot go on without.
Methods
- ComposeSystem(AgentSkill)
The effective system text with
pinnedSkill's instruction block appended: the form every host gives the model, so a pinned skill reads the same everywhere.