Class A2AModelInvoker
java.lang.Object
com.flowable.agent.engine.impl.model.a2a.A2AModelInvoker
- All Implemented Interfaces:
AiModelInvoker
- Author:
- Filip Hrisafov
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected AgentEngineConfigurationprotected FlowableAuthenticationApiKeyprotected A2AClient -
Constructor Summary
ConstructorsConstructorDescriptionA2AModelInvoker(AgentEngineConfiguration agentEngineConfiguration, A2AClient client, FlowableAuthenticationApiKey authenticationApiKey) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.fasterxml.jackson.databind.node.ObjectNodecreateArtifactDetailsNode(Artifact artifact) protected com.fasterxml.jackson.databind.node.ObjectNodecreateDataObjectNode(DataPart dataPart) protected com.fasterxml.jackson.databind.node.ObjectNodecreateFileObjectNode(FilePart filePart) protected A2AAgentInvocationResultResponsecreateInvocationResultResponseAndAddToExchange(A2AEvent response, boolean hasOutputSchema, AgentInvocationResultResponse.Exchange exchange, AgentInvocationResultResponse.Invocation invocation) protected AgentInvocationResultcreateResultFromPart(Part part, boolean hasOutputSchema) protected A2AMessagecreateSendMessage(AgentInvocationContext agentInvocationContext) determineAdditionalHeaders(String tenantId) determineMetadata(AgentInvocationContext agentInvocationContext) protected PartfindResultPartAndAddPartsToExchange(String partType, List<Part> parts, AgentInvocationResultResponse.Exchange exchange) protected PartgetResultPartAndAddMessageToExchange(A2AMessage message, String partType, AgentInvocationResultResponse.Exchange exchange) protected Partinvoke(AgentInvocationContext agentInvocationContext)
-
Field Details
-
A2A_CONTEXT_SCOPE
- See Also:
-
agentEngineConfiguration
-
client
-
authenticationApiKey
-
-
Constructor Details
-
A2AModelInvoker
public A2AModelInvoker(AgentEngineConfiguration agentEngineConfiguration, A2AClient client, FlowableAuthenticationApiKey authenticationApiKey)
-
-
Method Details
-
invoke
- Specified by:
invokein interfaceAiModelInvoker
-
createInvocationResultResponseAndAddToExchange
protected A2AAgentInvocationResultResponse createInvocationResultResponseAndAddToExchange(A2AEvent response, boolean hasOutputSchema, AgentInvocationResultResponse.Exchange exchange, AgentInvocationResultResponse.Invocation invocation) -
createSendMessage
-
determineMetadata
-
getResultPartAndAddMessageToExchange
protected Part getResultPartAndAddMessageToExchange(A2AMessage message, String partType, AgentInvocationResultResponse.Exchange exchange) -
createResultFromPart
-
findResultPartAndAddPartsToExchange
protected Part findResultPartAndAddPartsToExchange(String partType, List<Part> parts, AgentInvocationResultResponse.Exchange exchange) -
createFileObjectNode
-
createDataObjectNode
-
createArtifactDetailsNode
protected com.fasterxml.jackson.databind.node.ObjectNode createArtifactDetailsNode(Artifact artifact) -
getResultPartAndAddTaskToExchange
protected Part getResultPartAndAddTaskToExchange(A2ATask task, AgentInvocationResultResponse.Exchange exchange) -
determineAdditionalHeaders
-
getTask
public A2AAgentInvocationResultResponse getTask(String taskId, String tenantId, boolean hasOutputSchema)
-