IAgent Interface
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.
Represents an agent that can call the model and use tools.
public interface IAgent
type IAgent = interface
Public Interface IAgent
Properties
Capabilities |
Identifies additional agent capabilities. |
CreatedAt |
Unix timestamp (in seconds) for when the agent was created |
Description |
The description of the agent |
FileIds |
Identifiers of files associated with agent. |
Id |
The agent identifier (which can be referenced in API endpoints). |
Instructions |
The system instructions that the agent uses |
Model |
ID of the model to use |
Name |
Name of the agent |
Plugins |
Tools defined for run execution. |
Methods
AddFileAsync(String, CancellationToken) |
Associate uploaded file with the agent, by identifier. |
AsPlugin() |
Expose the agent as a plugin. |
DeleteAsync(CancellationToken) |
Delete current agent. Terminal state - Unable to perform any subsequent actions. |
DeleteThreadAsync(String, CancellationToken) |
Deletes an existing agent chat thread. |
GetThreadAsync(String, CancellationToken) |
Gets an existing agent chat thread. |
NewThreadAsync(CancellationToken) |
Creates a new agent chat thread. |
RemoveFileAsync(String, CancellationToken) |
Remove association of uploaded file with the agent, by identifier. |
Extension Methods
InvokeAsync(IAgent, String, KernelArguments, IEnumerable<String>, CancellationToken) |
Invoke agent with user input |