Package com.embabel.agent.api.annotation
Object RunSubagent
-
- All Implemented Interfaces:
public class RunSubagentConvenience methods for nesting agents for use with annotation model.
-
-
Field Summary
Fields Modifier and Type Field Description public final static RunSubagentINSTANCE
-
Method Summary
Modifier and Type Method Description final static <T extends Any> Tinstance(Agent agent, Class<T> type)Run the agent instance as a subagent and return the result. final <T extends Any> Tinstance(Agent instance)final static <T extends Any> TfromAnnotatedInstance(Object instance, Class<T> type)Run the @Agent annotated instance as a subagent and return the result. final <T extends Any> TfromAnnotatedInstance(Object instance)-
-
Method Detail
-
instance
final static <T extends Any> T instance(Agent agent, Class<T> type)
Run the agent instance as a subagent and return the result.
- Parameters:
agent- The agent instance to run as a subagent.type- The expected return type.
-
fromAnnotatedInstance
final static <T extends Any> T fromAnnotatedInstance(Object instance, Class<T> type)
Run the @Agent annotated instance as a subagent and return the result.
- Parameters:
instance- The @Agent annotated instance to run as a subagent.type- The expected return type.
-
fromAnnotatedInstance
final <T extends Any> T fromAnnotatedInstance(Object instance)
-
-
-
-