Interface AgentOrchestrator.OrchestratorContext

All Known Implementing Classes:
Agent, ConfigurableAgent
Enclosing class:
AgentOrchestrator

public static interface AgentOrchestrator.OrchestratorContext
Bridge interface implemented by Agent to provide core data and callbacks to the orchestrator.
  • Method Details

    • getAgentId

      String getAgentId()
    • getAgentName

      String getAgentName()
    • getAgentClass

      Class<?> getAgentClass()
    • getAgentLLM

      LLMClient getAgentLLM()
    • getAgentMemoryStore

      MemoryStore getAgentMemoryStore()
    • getAgentActionExecutor

      ActionExecutor getAgentActionExecutor()
    • getAgentSchemaGenerator

      ToolSchemaGenerator getAgentSchemaGenerator()
    • getAgentRoles

      List<Role> getAgentRoles()
    • getAgentKnowledgeSources

      default List<KnowledgeSourceConfig> getAgentKnowledgeSources()
      Returns:
      the sources of the agent's action-level knowledge
      Since:
      0.13.0
    • getAgentKnowledgeEntries

      default List<KnowledgeEntry> getAgentKnowledgeEntries()
      Returns:
      the agent's knowledge with each entry's use; by default every getAgentKnowledgeSources() source, searched
      Since:
      0.18.0
    • getAgentActionKnowledge

      default Map<String,List<String>> getAgentActionKnowledge()
      Returns:
      entry names by action name that replace an action's own knowledge; empty by default
      Since:
      0.18.0
    • getAgentKnowledgeScope

      default Optional<KnowledgeScope> getAgentKnowledgeScope()
    • 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
    • getMaxContextTokensDirect

      Integer getMaxContextTokensDirect()
    • getSystemPrompt

      String getSystemPrompt()
    • getErrorRecoveryScenariosDirect

      List<ErrorRecoveryScenario> getErrorRecoveryScenariosDirect()
    • getEventPublisher

      TnsAIEventPublisher getEventPublisher()
    • getEventHandlerRegistry

      EventHandlerRegistry getEventHandlerRegistry()
    • notifyActivity

      void notifyActivity()
    • restartAgent

      void restartAgent(String reason)
    • ensureEvalContext

      void ensureEvalContext()
    • getEvalContext

      EvalContext getEvalContext()
    • fireOnBeforeChat

      void fireOnBeforeChat(String message)
    • fireOnAfterChat

      void fireOnAfterChat(String result, long latencyMs)
    • fireOnError

      void fireOnError(Exception e, String context)
    • fireOnBeforeToolCall

      void fireOnBeforeToolCall(String toolName, Map<String,Object> arguments)
    • fireOnAfterToolCall

      void fireOnAfterToolCall(String toolName, Object result, boolean success, long latencyMs)
    • recordToolOutcome

      void recordToolOutcome(String toolName, Object result, boolean success, long latencyMs)
    • isReasoningEnabled

      boolean isReasoningEnabled()
    • getReasoningStrategyRaw

      ReasoningStrategyHandle getReasoningStrategyRaw()
    • setLastReasoningResult

      void setLastReasoningResult(ReasoningStrategyHandle.ReasoningResult result)
    • isContextGraphEnabled

      boolean isContextGraphEnabled()
    • getContextManagerDirect

      ContextManagerHandle getContextManagerDirect()