mirror of
				https://github.com/MindWorkAI/AI-Studio.git
				synced 2025-11-04 02:00:20 +00:00 
			
		
		
		
	
		
			Some checks are pending
		
		
	
	Build and Release / Read metadata (push) Waiting to run
				
			Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Blocked by required conditions
				
			Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
				
			Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
				
			Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Blocked by required conditions
				
			Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
				
			Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
				
			Build and Release / Prepare & create release (push) Blocked by required conditions
				
			Build and Release / Publish release (push) Blocked by required conditions
				
			
		
			
				
	
	
		
			55 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
using AIStudio.Chat;
 | 
						|
 | 
						|
namespace AIStudio.Agents;
 | 
						|
 | 
						|
public interface IAgent
 | 
						|
{
 | 
						|
    /// <summary>
 | 
						|
    /// Gets the name of the agent.
 | 
						|
    /// </summary>
 | 
						|
    public string Id { get; }
 | 
						|
 | 
						|
    /// <summary>
 | 
						|
    /// The provider to use for this agent.
 | 
						|
    /// </summary>
 | 
						|
    public Settings.Provider ProviderSettings { get; set; }
 | 
						|
 | 
						|
    /// <summary>
 | 
						|
    /// Processes a chat thread (i.e., context) and returns the updated thread.
 | 
						|
    /// </summary>
 | 
						|
    /// <param name="chatThread">The chat thread to process. The thread is the context for the agent.</param>
 | 
						|
    /// <param name="additionalData">Additional data to use for processing the chat thread.</param>
 | 
						|
    /// <returns>The updated chat thread. The last content block of the thread is the agent's response.</returns>
 | 
						|
    public Task<ChatThread> ProcessContext(ChatThread chatThread, IDictionary<string, string> additionalData);
 | 
						|
 | 
						|
    /// <summary>
 | 
						|
    /// Processes the input content block and returns the agent's response.
 | 
						|
    /// </summary>
 | 
						|
    /// <param name="input">The content block to process. It represents the input.</param>
 | 
						|
    /// <param name="additionalData">Additional data to use for processing the input.</param>
 | 
						|
    /// <returns>The content block representing the agent's response.</returns>
 | 
						|
    public Task<ContentBlock> ProcessInput(ContentBlock input, IDictionary<string, string> additionalData);
 | 
						|
 | 
						|
    /// <summary>
 | 
						|
    /// The agent makes a decision based on the input.
 | 
						|
    /// </summary>
 | 
						|
    /// <param name="input">The content block to process. Should be a question or a request.</param>
 | 
						|
    /// <returns>
 | 
						|
    /// True if a decision has been made based on the input, false otherwise.
 | 
						|
    /// </returns>
 | 
						|
    public Task<bool> MadeDecision(ContentBlock input);
 | 
						|
 | 
						|
    /// <summary>
 | 
						|
    /// Retrieves the context of the agent.
 | 
						|
    /// </summary>
 | 
						|
    /// <returns>The collection of content blocks representing the agent's context. This includes the user's and the other agent's messages.</returns>
 | 
						|
    public IReadOnlyCollection<ContentBlock> GetContext();
 | 
						|
 | 
						|
    /// <summary>
 | 
						|
    /// Retrieves the answers from the agent's context.
 | 
						|
    /// </summary>
 | 
						|
    /// <returns>
 | 
						|
    /// The collection of content blocks representing the answers provided by this agent.
 | 
						|
    /// </returns>
 | 
						|
    public IReadOnlyCollection<ContentBlock> GetAnswers();
 | 
						|
} |