Multiple callgents can naturally be combined to form a new composite callgent, working together to handle a complex call request.
Similar to a regular callgent, which maintains a list of functional endpoints
to automatically map each request to an endpoint, call it, and return the result, a composite callgent maintains a list of callgents. This allows each request to be automatically mapped to a callgent entry
, called, and the result returned.
Callgent entries come in two types: functional entries
and callgentive entries
. These two types of entries can be mixed together.
A callgent that contains callgentive entries
is typically referred to as a composite callgent.
When a request reaches a composite callgent, the composite callgent automatically selects a callgent entry
based on the semantic information in the request and invokes that callgent entry.
The callgent entry can be a regular callgent or another composite callgent. If the callgent entry
is another composite callgent, that composite callgent will recursively process the request until it is fully handled.
Composite callgents can be nested, forming a call tree. Each node in the call tree is a callgent, and each node can call other nodes.
A callgent automatically maps a single request to an endpoint for processing and retrieves the response result. Based on the original request, the callgent decides whether to return the response to the caller or continue calling the next endpoint. This process repeats until the final result is returned to the caller.
If the request contains collection data, the callgent may automatically perform map/reduce operations on the collection and map it to entry calls as needed.
Composite Callgent allows multiple callgents to work together while maintaining a single call entry, enabling the handling of complex call requests.
Composite Callgent allows you to interact with a single callgent to invoke multiple callgents, simplifying the call process.
If you prefer to decide which callgents handle each task, i.e., you manually orchestrate multiple callgents, you can choose not to rely on Composite Callgent.