AgentInlineSkill Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| AgentInlineSkill(AgentSkillFrontmatter, String, JsonSerializerOptions, Func<Nullable<JsonElement>,AIFunctionArguments>) |
Initializes a new instance of the AgentInlineSkill class with a pre-built AgentSkillFrontmatter. |
| AgentInlineSkill(String, String, String, String, String, String, AdditionalPropertiesDictionary, JsonSerializerOptions, Func<Nullable<JsonElement>, AIFunctionArguments>) |
Initializes a new instance of the AgentInlineSkill class with all frontmatter properties specified individually. |
AgentInlineSkill(AgentSkillFrontmatter, String, JsonSerializerOptions, Func<Nullable<JsonElement>,AIFunctionArguments>)
Initializes a new instance of the AgentInlineSkill class with a pre-built AgentSkillFrontmatter.
public AgentInlineSkill(Microsoft.Agents.AI.AgentSkillFrontmatter frontmatter, string instructions, System.Text.Json.JsonSerializerOptions? serializerOptions = default, Func<System.Text.Json.JsonElement?,Microsoft.Extensions.AI.AIFunctionArguments>? argumentMarshaler = default);
new Microsoft.Agents.AI.AgentInlineSkill : Microsoft.Agents.AI.AgentSkillFrontmatter * string * System.Text.Json.JsonSerializerOptions * Func<Nullable<System.Text.Json.JsonElement>, Microsoft.Extensions.AI.AIFunctionArguments> -> Microsoft.Agents.AI.AgentInlineSkill
Public Sub New (frontmatter As AgentSkillFrontmatter, instructions As String, Optional serializerOptions As JsonSerializerOptions = Nothing, Optional argumentMarshaler As Func(Of Nullable(Of JsonElement), AIFunctionArguments) = Nothing)
Parameters
- frontmatter
- AgentSkillFrontmatter
The skill frontmatter containing name, description, and other metadata.
- instructions
- String
Skill instructions text.
- serializerOptions
- JsonSerializerOptions
Optional JsonSerializerOptions applied by default to all scripts and delegate resources
added to this skill. Individual AddScript(String, Delegate, String, JsonSerializerOptions) and AddResource(String, Delegate, String, JsonSerializerOptions)
calls can override this default. When null, DefaultOptions is used.
- argumentMarshaler
- Func<Nullable<JsonElement>,AIFunctionArguments>
Optional argument marshaler applied by default to all scripts added to this skill.
When null, the default marshaler is used which expects arguments as a JSON object.
Applies to
AgentInlineSkill(String, String, String, String, String, String, AdditionalPropertiesDictionary, JsonSerializerOptions, Func<Nullable<JsonElement>, AIFunctionArguments>)
Initializes a new instance of the AgentInlineSkill class with all frontmatter properties specified individually.
public AgentInlineSkill(string name, string description, string instructions, string? license = default, string? compatibility = default, string? allowedTools = default, Microsoft.Extensions.AI.AdditionalPropertiesDictionary? metadata = default, System.Text.Json.JsonSerializerOptions? serializerOptions = default, Func<System.Text.Json.JsonElement?,Microsoft.Extensions.AI.AIFunctionArguments>? argumentMarshaler = default);
new Microsoft.Agents.AI.AgentInlineSkill : string * string * string * string * string * string * Microsoft.Extensions.AI.AdditionalPropertiesDictionary * System.Text.Json.JsonSerializerOptions * Func<Nullable<System.Text.Json.JsonElement>, Microsoft.Extensions.AI.AIFunctionArguments> -> Microsoft.Agents.AI.AgentInlineSkill
Public Sub New (name As String, description As String, instructions As String, Optional license As String = Nothing, Optional compatibility As String = Nothing, Optional allowedTools As String = Nothing, Optional metadata As AdditionalPropertiesDictionary = Nothing, Optional serializerOptions As JsonSerializerOptions = Nothing, Optional argumentMarshaler As Func(Of Nullable(Of JsonElement), AIFunctionArguments) = Nothing)
Parameters
- name
- String
Skill name in kebab-case.
- description
- String
Skill description for discovery.
- instructions
- String
Skill instructions text.
- license
- String
Optional license name or reference.
- compatibility
- String
Optional compatibility information (max 500 chars).
- allowedTools
- String
Optional space-delimited list of pre-approved tools.
- metadata
- AdditionalPropertiesDictionary
Optional arbitrary key-value metadata.
- serializerOptions
- JsonSerializerOptions
Optional JsonSerializerOptions applied by default to all scripts and delegate resources
added to this skill. Individual AddScript(String, Delegate, String, JsonSerializerOptions) and AddResource(String, Delegate, String, JsonSerializerOptions)
calls can override this default. When null, DefaultOptions is used.
- argumentMarshaler
- Func<Nullable<JsonElement>,AIFunctionArguments>
Optional argument marshaler applied by default to all scripts added to this skill.
When null, the default marshaler is used which expects arguments as a JSON object.