Interface ExecutingOperationContext

  • All Implemented Interfaces:
    com.embabel.agent.api.common.OperationContext , com.embabel.agent.core.Bindable , com.embabel.agent.core.Blackboard , com.embabel.agent.core.MayHaveLastResult , com.embabel.agent.core.ToolGroupConsumer , com.embabel.common.core.types.HasInfoString

    
    public interface ExecutingOperationContext
     implements OperationContext
                        

    OperationContext that execute actions. An ExecutingOperationContext can execute agents as sub-processes.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit sendMessage(Message message) Convenience method to send a message to the output channel of the process.
      Unit sendAndSave(Message message) Convenience method to send a message to the output channel of the process and save it to the conversation in the blackboard.
      Unit updateProgress(String message) Send a progress update to the output channel of the process.
      Unit sendOutputChannelEvent(OutputChannelEvent event) Send an output channel event to the output channel of the process.
      <O extends Any> O asSubProcess(Class<O> outputClass, TypedAgentScopeBuilder<O> agentScopeBuilder) Run the given agent as a sub-process of this operation context.
      <O extends Any> O asSubProcess(Class<O> outputClass, Agent agent) Run the given agent as a sub-process of this operation context.
      • Methods inherited from class com.embabel.agent.api.common.OperationContext

        agentPlatform, ai, fireAgent, getAgentProcess, getOperation, getProcessContext, parallelMap, promptRunner, promptRunner, user
      • Methods inherited from class com.embabel.agent.core.Blackboard

        clear, count, expressionEvaluationModel, get, getBlackboardId, getCondition, getObjects, getOrPut, getValue, hasValue, hide, last, lastResult, objectsOfType, setCondition, spawn
      • Methods inherited from class com.embabel.agent.core.Bindable

        addAll, addObject, bind, bindAll, bindProtected, plusAssign, plusAssign, plusAssign, set
      • Methods inherited from class com.embabel.common.core.types.HasInfoString

        infoString
      • Methods inherited from class com.embabel.agent.core.ToolGroupConsumer

        getToolGroups
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • sendMessage

         Unit sendMessage(Message message)

        Convenience method to send a message to the output channel of the process.

      • sendAndSave

         Unit sendAndSave(Message message)

        Convenience method to send a message to the output channel of the process and save it to the conversation in the blackboard.

      • asSubProcess

         <O extends Any> O asSubProcess(Class<O> outputClass, TypedAgentScopeBuilder<O> agentScopeBuilder)

        Run the given agent as a sub-process of this operation context.

        Parameters:
        outputClass - the class of the output of the agent
        agentScopeBuilder - the builder for the agent scope to run
      • asSubProcess

         <O extends Any> O asSubProcess(Class<O> outputClass, Agent agent)

        Run the given agent as a sub-process of this operation context.