AbstractProtectedadditionalThe list of local variable identifiers that can be made available to this agent during execution, these variables are context specific and do not exist for other agents.
This array is primarily used for documentation purposes in the AI Configuration View to show which variables can be made available to the agent. Referenced variables are NOT automatically handed over by the framework, this must be explicitly done in the agent implementation or in prompts.
ProtectedchatProtectedcontentProtectedcontentProtecteddefaultProtected Abstract ReadonlydefaultA markdown description of its functionality and its privacy-relevant requirements, including function call handlers that access some data autonomously.
The list of global function identifiers that are always available to this agent during execution, regardless of whether they are referenced in prompts.
This array is primarily used for documentation purposes in the AI Configuration View to show which functions are guaranteed to be available to the agent. Referenced functions are NOT automatically handed over by the framework, this must be explicitly done in the agent implementation.
Abstract ReadonlyidUsed to identify an agent, e.g. when it is requesting language models, etc.
ProtectedlanguageAbstract ReadonlylanguageRequired language models. This includes the purpose and optional language model selector arguments. See #47.
ProtectedlanguageProtectedloggerProtected Abstract ReadonlymodeMode definitions without the isDefault property.
Subclasses must provide their specific mode definitions.
Each mode's id should correspond to a prompt variant ID.
Abstract ReadonlynameHuman-readable name shown to users to identify the agent. Must be unique.
Use short names without "Agent" or "Chat" (see tags for adding further properties).
The prompts introduced and used by this agent.
ProtectedpromptProtectedsystemA list of tags to filter agents and to display capabilities in the UI
ProtectedtoolThe list of global variable identifiers that are always available to this agent during execution, regardless of whether they are referenced in prompts.
This array is primarily used for documentation purposes in the AI Configuration View to show which variables are guaranteed to be available to the agent. Referenced variables are NOT automatically handed over by the framework, this must be explicitly done in the agent implementation.
Returns the available modes with isDefault computed based on current settings.
ProtectedpromptThe ID of the prompt variant set used for mode selection.
Defaults to systemPromptId. Override if a different variant set should be used.
ProtectedaddProtectedaddProtectedcreateCreates a ToolCallChatResponseContent instance from the provided tool call data.
This method is called when parsing stream response tokens that contain tool call data. Subclasses can override this method to customize the creation of tool call response contents.
The ToolCall.
A ChatResponseContent representing the tool call.
ProtecteddeduplicateDeduplicate tools by name (falling back to id) while preserving the first occurrence and order.
ProtectedgetDetermines the effective variant ID, considering mode override. If modeId is provided and is a valid variant for the prompt set, it takes precedence. Otherwise falls back to settings-based selection.
OptionalmodeId: stringProtectedgetProtectedgetProtectedgetthe settings, such as temperature, to be used in all language model requests. Returns undefined by default.
ProtectedgetOptionalincludeResponseInProgress: booleanProtectedgetProtectedhandleProtectedinitializeProtectedisProtectedonInvoked after the response by the LLM completed successfully.
The default implementation sets the state of the response to complete.
Subclasses may override this method to perform additional actions or keep the response open for processing further requests.
ProtectedparseProtectedparseProtectedselectProtectedsend
An abstract chat agent that supports mode selection for selecting prompt variants.
Agents extending this class define their available modes via
modeDefinitions. Themodesgetter dynamically computes which mode is the default based on the current prompt variant settings. When a request is made with a specificmodeId, that mode's prompt variant is used instead of the settings-configured default.