Table of Contents

Class SKAiAgent<T>

Namespace
Microsoft.AutoGen.Agents
Assembly
Microsoft.AutoGen.Agents.dll
public abstract class SKAiAgent<T> : Agent, IHandle where T : class, new()

Type Parameters

T
Inheritance
SKAiAgent<T>
Implements
Inherited Members

Constructors

SKAiAgent(IAgentWorker, ISemanticTextMemory, Kernel, EventTypes)

protected SKAiAgent(IAgentWorker worker, ISemanticTextMemory memory, Kernel kernel, EventTypes typeRegistry)

Parameters

worker IAgentWorker
memory ISemanticTextMemory
kernel Kernel
typeRegistry EventTypes

Fields

_kernel

protected Kernel _kernel

Field Value

Kernel

_state

protected AgentState<T> _state

Field Value

AgentState<T>

Methods

AddKnowledge(string, string, KernelArguments)

Adds knowledge to the

public Task<KernelArguments> AddKnowledge(string instruction, string index, KernelArguments arguments)

Parameters

instruction string

The instruction string that uses the value of !index! as a placeholder to inject the data. Example:"Consider the following architectural guidelines: {waf}"

index string

Knowledge index

arguments KernelArguments

The sk arguments, "input" is the argument

Returns

Task<KernelArguments>

AddToHistory(string, ChatUserType)

public void AddToHistory(string message, ChatUserType userType)

Parameters

message string
userType ChatUserType

AppendChatHistory(string)

public string AppendChatHistory(string ask)

Parameters

ask string

Returns

string

CallFunction(string, KernelArguments, OpenAIPromptExecutionSettings?)

public virtual Task<string> CallFunction(string template, KernelArguments arguments, OpenAIPromptExecutionSettings? settings = null)

Parameters

template string
arguments KernelArguments
settings OpenAIPromptExecutionSettings

Returns

Task<string>