Interface AgentInvocationEntityManager
- All Superinterfaces:
org.flowable.common.engine.impl.persistence.entity.EntityManager<AgentInvocationEntity>
- All Known Implementing Classes:
AgentInvocationEntityManagerImpl
AgentInvocationEntity represents an interaction with an AI Agent system, typically an LLM.
An AgentInvocationEntity contains all the exchanges that were done with the LLM, the required tools, etc.
One interaction with an LLM is typically stored as minimally 3 different exchanges: a system / user / assistant,
where the system and user are prompts being passed in (the input) and the assistant being the response being generated.
These invocations could span multiple transactions and can contain multiple exchanges. e.g. the orchestrator agent would have an invocation for each communication with the LLM.
- Regular agent task invocations synchronous or asynchronous: 1 invocation will be created for the with 1 exchange and multiple exchange parts system/user/assistant part. - External agent: It depends, but often 1 exchange is created on the first touchpoint, and then the assistant message is created when the response comes in
-
Method Summary
Modifier and TypeMethodDescriptionlongcountByCriteria(AgentInvocationQuery agentInvocationQuery) Returns a builder for building the context of an agent invocation.voiddeleteByAgentInstanceId(String agentInstanceId) voiddeleteByAgentInstanceIds(Collection<String> agentInstanceIds) findByCriteria(AgentInvocationQuery agentInvocationQuery) Methods inherited from interface org.flowable.common.engine.impl.persistence.entity.EntityManager
create, delete, delete, delete, findById, insert, insert, update, update
-
Method Details
-
createAgentInvocationContextBuilder
AgentInvocationContextBuilder createAgentInvocationContextBuilder()Returns a builder for building the context of an agent invocation. A newAgentInvocationEntitywill also be created while doing so and the invocationId will be added to this context. -
findByCriteria
-
countByCriteria
-
deleteByAgentInstanceId
-
deleteByAgentInstanceIds
-