Package com.embabel.agent.api.common
Interface ActionContext
-
- All Implemented Interfaces:
-
com.embabel.agent.api.common.ExecutingOperationContext,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 ActionContext implements ExecutingOperationContext
Context for actions
-
-
Method Summary
Modifier and Type Method Description PromptRunnerpromptRunner(LlmOptions llm, Set<ToolGroupRequirement> toolGroups, List<ToolObject> toolObjects, List<PromptContributor> promptContributors, List<ContextualPromptElement> contextualPromptContributors, Boolean generateExamples)Create a prompt runner for this context. abstract List<Object>domainObjectInstances()Return the domain object instances that are relevant for this action context. abstract ProcessContextgetProcessContext()abstract ActiongetAction()-
Methods inherited from class com.embabel.agent.api.common.OperationContext
agentPlatform, ai, fireAgent, getAgentProcess, getOperation, parallelMap, promptRunner, user -
Methods inherited from class com.embabel.agent.api.common.ExecutingOperationContext
asSubProcess, asSubProcess, sendAndSave, sendMessage, sendOutputChannelEvent, updateProgress -
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
-
-
Method Detail
-
promptRunner
PromptRunner promptRunner(LlmOptions llm, Set<ToolGroupRequirement> toolGroups, List<ToolObject> toolObjects, List<PromptContributor> promptContributors, List<ContextualPromptElement> contextualPromptContributors, Boolean generateExamples)
Create a prompt runner for this context. Application code should always go through this method to run LLM operations.
- Parameters:
llm- the LLM options to usetoolGroups- extra local tool groups to use, in addition to those declared on the action if we're in an actionpromptContributors- extra prompt contributors to use, in addition to those declared on the action if we're in an action, or at agent level
-
domainObjectInstances
abstract List<Object> domainObjectInstances()
Return the domain object instances that are relevant for this action context. They may expose tools.
-
getProcessContext
abstract ProcessContext getProcessContext()
-
-
-
-