Search Results for

    Show / Hide Table of Contents

    Class AgentDependencies

    Optional external dependency overrides injected into an Agent at construction time. All properties are optional; each falls back to a sensible default when left null. Supply only the dependencies you need to customise; leave the rest unset.

    Inheritance
    object
    AgentDependencies
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit.Agents
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public sealed class AgentDependencies : IDisposable

    Properties

    | Edit this page View Source

    Chat

    [Optional] Custom chat API implementation to use for generating responses.

    When null, the agent automatically selects the appropriate implementation based on ChatApiType and the active model's API (e.g. Chat Completions, Assistants, Realtime).

    Declaration
    public IStreamingChatService Chat { get; set; }
    Property Value
    Type Description
    IStreamingChatService
    | Edit this page View Source

    ConversationStore

    [Optional] Conversation store implementation used to persist conversations.

    When null, conversations are not persisted and the agent runs without conversation history. Use AgentUtility.CreateConversationStore to create a store from a ConversationStoreType.

    Declaration
    public IConversationStore ConversationStore { get; set; }
    Property Value
    Type Description
    IConversationStore
    | Edit this page View Source

    EventListener

    [Optional] Listener that receives agent lifecycle and response events.

    When null, events are still dispatched internally but no external callback is invoked. Implement this interface (e.g. on a MonoBehaviour) to react to agent responses, errors, and status changes.

    Declaration
    public IAgentEventListener EventListener { get; set; }
    Property Value
    Type Description
    IAgentEventListener
    | Edit this page View Source

    ImageGeneration

    [Optional] Custom image generation service.

    Only used when HasOutputImage is true. Falls back to DefaultImageGenerationApi when null.

    Declaration
    public IImageGeneration ImageGeneration { get; set; }
    Property Value
    Type Description
    IImageGeneration
    | Edit this page View Source

    InputAudioRecorder

    [Optional] Recorder used to capture microphone input before transcription.

    Only relevant when HasInputAudio is true. When null, audio recording is disabled and the agent expects text input only.

    Declaration
    public ISpeechToTextRecorder InputAudioRecorder { get; set; }
    Property Value
    Type Description
    ISpeechToTextRecorder
    | Edit this page View Source

    InstructionsUpdater

    [Optional] Dynamic instructions provider that updates system instructions before each request based on conversation history or external context.

    When null, instructions remain static as set at construction time.

    Declaration
    public IInstructionsUpdater InstructionsUpdater { get; set; }
    Property Value
    Type Description
    IInstructionsUpdater
    | Edit this page View Source

    McpAccessToken

    [Optional] Token service used for MCP (Model Context Protocol) OAuth flows.

    Falls back to a new McpAccessTokenService instance when null. Supply a custom instance to share token state across multiple agents.

    Declaration
    public McpAccessTokenService McpAccessToken { get; set; }
    Property Value
    Type Description
    McpAccessTokenService
    | Edit this page View Source

    OutputAudioPlayer

    [Optional] Player used to play back synthesised speech output.

    Only relevant when HasOutputAudio is true. When null, audio playback is disabled and responses are text-only.

    Declaration
    public ITextToSpeechPlayer OutputAudioPlayer { get; set; }
    Property Value
    Type Description
    ITextToSpeechPlayer
    | Edit this page View Source

    SpeechToText

    [Optional] Custom speech-to-text (transcription) service.

    Only used when HasInputAudio is true. Falls back to DefaultTranscriptionApi (HTTP) or a WebSocket implementation depending on the STT endpoint protocol configured in InputAudioSettings.

    Declaration
    public ISpeechToText SpeechToText { get; set; }
    Property Value
    Type Description
    ISpeechToText
    | Edit this page View Source

    TextToSpeech

    [Optional] Custom text-to-speech (speech generation) service.

    Only used when HasOutputAudio is true. Falls back to DefaultSpeechGenerationApi when null.

    Declaration
    public ITextToSpeech TextToSpeech { get; set; }
    Property Value
    Type Description
    ITextToSpeech
    | Edit this page View Source

    ToolCallHandler

    [Optional] Custom handler that intercepts and processes tool calls before the built-in tool execution pipeline runs.

    When null, the agent uses its default ToolController logic. Useful for adding logging, validation, or routing to external executors.

    Declaration
    public IToolCallHandler ToolCallHandler { get; set; }
    Property Value
    Type Description
    IToolCallHandler
    | Edit this page View Source

    ToolRouter

    [Optional] Tool router that selects which tools are forwarded to the LLM for each request.

    When null, all registered tools are forwarded without filtering.

    Declaration
    public IToolRouter ToolRouter { get; set; }
    Property Value
    Type Description
    IToolRouter

    Methods

    | Edit this page View Source

    Dispose()

    Declaration
    public void Dispose()
    | Edit this page View Source

    InitAsync(Agent, CancellationToken)

    Declaration
    public UniTask InitAsync(Agent agent, CancellationToken ct = default)
    Parameters
    Type Name Description
    Agent agent
    CancellationToken ct
    Returns
    Type Description
    UniTask

    Implements

    IDisposable

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.TryDispose(IDisposable)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation