Class SimpleAgentBuilder
-
- All Implemented Interfaces:
-
com.embabel.agent.api.common.workflow.WorkflowBuilderConsuming
public final class SimpleAgentBuilder<RESULT extends Object> implements WorkflowBuilderConsuming
Simplest way to build an agent that performs a single operation, like an LLM call.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classSimpleAgentBuilder.Emitterpublic final classSimpleAgentBuilder.SimpleAgentConsumerpublic classSimpleAgentBuilder.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static SimpleAgentBuilder.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description SimpleAgentBuilder(Class<RESULT> resultClass, Class<out Object> inputClass)
-
Method Summary
Modifier and Type Method Description <INPUT extends Any> SimpleAgentBuilder.SimpleAgentConsumer<INPUT, RESULT>consuming(Class<INPUT> inputClass)Specify the input type for this workflow. final SimpleAgentBuilder.Emitter<RESULT>running(Function1<SupplierActionContext<RESULT>, RESULT> generator)Provide a function the agent will perform to generate a draft on each iteration static <RESULT extends Any> SimpleAgentBuilder<RESULT>returning(Class<RESULT> resultClass)Creates a simple agent builder that can be used to build agents with a single action. -
-
Method Detail
-
consuming
<INPUT extends Any> SimpleAgentBuilder.SimpleAgentConsumer<INPUT, RESULT> consuming(Class<INPUT> inputClass)
Specify the input type for this workflow. Return a builder
-
running
final SimpleAgentBuilder.Emitter<RESULT> running(Function1<SupplierActionContext<RESULT>, RESULT> generator)
Provide a function the agent will perform to generate a draft on each iteration
-
-
-
-