Namespace AutoGen.Core
Classes
- FunctionCallMiddleware
The middleware that process function call message that both send to an agent or reply from an agent.
If the last message is ToolCallMessage and the tool calls is available in this middleware's function map, the tools from the last message will be invoked and a ToolCallResultMessage will be returned. In this situation, the inner agent will be short-cut and won't be invoked.
Otherwise, the message will be sent to the inner agent. In this situation
if the reply from the inner agent is ToolCallMessage, and the tool calls is available in this middleware's function map, the tools from the reply will be invoked, and a ToolCallAggregateMessage will be returned.
If the reply from the inner agent is ToolCallMessage but the tool calls is not available in this middleware's function map, or the reply from the inner agent is not ToolCallMessage, the original reply from the inner agent will be returned.
When used as a streaming middleware, if the streaming reply from the inner agent is ToolCallMessageUpdate or TextMessageUpdate, This middleware will update the message accordingly and invoke the function if the tool call is available in this middleware's function map. If the streaming reply from the inner agent is other types of message, the most recent message will be used to invoke the function.
- MiddlewareAgent
An agent that allows you to add middleware and modify the behavior of an existing agent.
- PrintMessageMiddleware
The middleware that prints the reply from agent to the console.
- RoundRobinGroupChat
A group chat that allows agents to talk in a round-robin manner.
- RoundRobinOrchestrator
Return the next agent in a round-robin fashion.
If the last message is from one of the candidates, the next agent will be the next candidate in the list.
Otherwise, the first agent in Candidates will be returned.
- SequentialGroupChat
Obsolete: please use RoundRobinGroupChat
- ToolCallAggregateMessage
An aggregate message that contains a tool call message and a tool call result message. This message type is used by FunctionCallMiddleware to return both ToolCallMessage and ToolCallResultMessage.
- Transition
Represents a transition between two agents.
Structs
Interfaces
- ICanGetTextContent
The interface for messages that can get text content. This interface will be used by GetContent(IMessage) to get the content from the message.
- ICanGetToolCalls
The interface for messages that can get a list of ToolCall
- IMessage
The universal message interface for all message types in AutoGen.
Related PR: https://github.com/microsoft/autogen/pull/1676
Built-in message types
- TextMessage: plain text message.
- ImageMessage: image message.
- MultiModalMessage: message type for multimodal message. The current support message items are TextMessage and ImageMessage.
- ToolCallMessage: message type for tool call. This message supports both single and parallel tool call.
- ToolCallResultMessage: message type for tool call result.
- Message: This type is used by previous version of AutoGen. And it's reserved for backward compatibility.
- AggregateMessage<TMessage1, TMessage2>: an aggregate message type that contains two message types. This type is useful when you want to combine two message types into one unique message type. One example is when invoking a tool call and you want to return both ToolCallMessage and ToolCallResultMessage. One example of how this type is used in AutoGen is FunctionCallMiddleware and its return message ToolCallAggregateMessage
- IMiddleware
The middleware interface. For streaming-version middleware, check IStreamingMiddleware.
- IStreamingAgent
agent that supports streaming reply
- IStreamingMiddleware
The streaming middleware interface. For non-streaming version middleware, check IMiddleware.