[MS] MicroAgents: Exploring Agentic Architecture with Microservices - devamazonaws.blogspot.com
Throughout our time building Semantic Kernel and working with customers, we've introduced agents and have just started to explore the potential of autonomous AI agents. While the community is in the midst of exploring various architectures for these agents, one source we can draw inspiration from is the microservice architecture. Consider the benefits of microservices:
Partitioning by functional domain and utilizing agent composition introduces a MicroAgent pattern which associates each microagent with a service. Each microagent's system instructions can be tailored for factors specific to its service. Natural language interactions define a durable, elastic interface for combining and coordinating loosely coupled microagents to accomplish complex tasks.
While this pattern may be intriguing, it certainly isn't the only approach for defining AI agents and no single approach need be exclusive. For example, it's easy to envision persona, role, or task-based agents existing alongside and utilizing MicroAgents.
Post Updated on January 22, 2024 at 03:59PM
Thanks for reading
from devamazonaws.blogspot.com
- Ease of maintenance: feature enhancement & validation
- Reliability: fault isolation & diagnostics
- Efficiency: cost & flexibility
- Deployment agility: frequency & scaling
What is an Agent?
From the perspective of Semantic Kernel orchestration, an AI agent is a modular abstraction that can possess a persona, can perform actions in response to user input, and can easily communicate with other agents. You might also view an agent from an AI-as-a-service perspective or as an autonomous worker. The MicroAgent pattern adapts to either perspective.Microagents
Take the case of an AI personal assistant with various services: location, calendar, email, banking, shopping, travel, weather, etc... If you were to build this as a monolithic agent, it would be directly bound to its tooling. Namely, all provided functions and plugins would need to fit in that agent's model context. In addition, the agent would have to decide which among possibly thousands of services to call, making it tedious to give the agent nuanced system instructions.
Partitioning by functional domain and utilizing agent composition introduces a MicroAgent pattern which associates each microagent with a service. Each microagent's system instructions can be tailored for factors specific to its service. Natural language interactions define a durable, elastic interface for combining and coordinating loosely coupled microagents to accomplish complex tasks.
While this pattern may be intriguing, it certainly isn't the only approach for defining AI agents and no single approach need be exclusive. For example, it's easy to envision persona, role, or task-based agents existing alongside and utilizing MicroAgents.
Observations
We wanted to create a comparison between either approach for basic validation. For this experiment, eight critical APIs and twelve irrelevant APIs were defined across 5 microagents. Not the scale of hundreds or thousands of API's you might find at production scale, but sufficient surface initial qualitative differences. The user message was to book a four night vacation to Hawaii with intentional ambiguity around current date, travel dates, home location, airport codes, and need for return flight. The first thing that stood out is just how amazinggpt-4-turbo is at coordinating complex function calling. As expected, completion rates drop-off on lesser models. Our experimental completion rates for either approach were effectively equivalent: 80% - 85%. Either approach would sometimes omit adding the trip to the calendar. The monoagent approach would sometimes fail to book a return trip and even once required additional confirmation before booking. The first step either approach took was to consult the calendar on which dates might be available to travel. Each approach reliably executed the same steps:
- Determine today: GetCurrentDate()
- Retrieved the calendar events for next month by calling GetEvents(from, to)
- Reason over calendar availability
Join us in building agents!
Explore these ideas by checking out the Semantic Kernel Agents package. We'll soon release the code and a video (be sure to subscribe!) walking through the experiments listed in this blog. We'd love to hear about your experience.Post Updated on January 22, 2024 at 03:59PM
Thanks for reading
from devamazonaws.blogspot.com
Comments
Post a Comment