Interface AgentChatOrchestrator.ChatContext

All Known Implementing Classes:
AgentOrchestrator
Enclosing class:
AgentChatOrchestrator

public static interface AgentChatOrchestrator.ChatContext
Context interface for Agent - provides access to agent internals needed for chat. This avoids circular dependency while allowing the orchestrator to access what it needs.
  • Method Details

    • getAgentId

      String getAgentId()
      Returns the agent's unique identifier
    • getAgentName

      String getAgentName()
      Returns the agent's display name
    • getAgentLLM

      LLMClient getAgentLLM()
      Returns the LLM client for chat operations
    • getAgentMemoryStore

      MemoryStore getAgentMemoryStore()
      Returns the memory store for conversation history
    • getSystemPrompt

      String getSystemPrompt()
      Returns the system prompt for the agent
    • getToolsForLLM

      List<Map<String,Object>> getToolsForLLM()
      Returns the tools available for LLM function calling (List<Map<String, Object>> JSON-Schema fragments).
    • executeToolCalls

      String executeToolCalls(ChatResponse response, boolean useHistory)
      Executes tool calls from a ChatResponse
    • executeToolCalls

      default String executeToolCalls(ChatResponse response, boolean useHistory, String retrievalQuery, ChatRetrievalContext retrievalContext)
      Executes tool calls while preserving the originating RAG turn.
    • executeWithSpinner

      <T> T executeWithSpinner(Supplier<T> operation)
      Executes an operation with a spinner (for non-LLM operations)
    • getAgentClass

      Class<?> getAgentClass()
      Returns the agent's concrete class (for annotation inspection)
    • getChatKnowledgeBinding

      default Optional<ChatKnowledgeBinding> getChatKnowledgeBinding()
      Returns the canonical chat retrieval binding, if configured.
    • getChatKnowledgeContext

      default Optional<ChatKnowledgeContext> getChatKnowledgeContext()
      Returns the DIRECT and SEQUENTIAL knowledge each chat turn gives, if the agent declares any.
      Since:
      0.18.0
    • reportKnowledgeUsage

      default void reportKnowledgeUsage(String scope, List<KnowledgeUsage> usage)
      Receives what each knowledge source gave one scope: an action name, or "chat" for a chat turn. Does nothing by default.
      Parameters:
      scope - the action name or "chat"
      usage - one row per source, in declaration order
      Since:
      0.18.0