When to Use API Plugins
By using API plugins, you enable a declarative agent to communicate with APIs to read and modify external data. Learn how to decide when to use API plugins to extend your declarative agent.
Decision Criteria
API plugins offer powerful integration capabilities for your declarative agents. The following criteria help you determine whether API plugins are suitable for your scenario.
Data Beyond the Base Model
The first thing to understand is whether the agent can meet your needs using only the information in its base model. If it needs access to additional information, such as your internal databases, you should extend it with, for example, an API plugin.
Data Structure
Next, you need to understand the structure of the data the agent needs to access. Is the data structured, like customer records or orders, or unstructured like a document or report? If the data is structured, it is well-suited for use with an API plugin. If it is unstructured, do you have a search index and an API the agent could use? If not, you might consider using a Copilot connector to ingest the data into Microsoft 365 and benefit from its search capabilities.
Data Access
Finally, the decision to use an API plugin and the effort required depend on the plugin’s ability to access the data. Do you have an API the agent can connect to? Do you have an OpenAPI specification that describes the API? Does the API use an authentication mechanism the agent can handle? Is the API easy to understand or use, or does it involve complex queries that a language model might not be able to formulate?
Applying the Criteria
API plugins work best when you need to connect a declarative agent to structured and frequently updated data outside its base model. Since this decision involves nuance, let’s consider how to apply these criteria to our example scenario.
- Does the agent need access to data beyond the base model? Yes. The repair information is not part of the agent’s base model. It is stored in a database and exposed via an API, making the use of an API plugin relevant to provide access to this information.
- Is the information structured? Yes. The repair data is structured and exposed via an API. Since it doesn’t require additional processing, it is suitable for use with an API plugin.
- Is the information exposed via the API accessible on the internet? Yes. The repair data is exposed via an internet-accessible API secured by an API key, allowing the agent to interact with it securely.
A declarative agent with an API plugin appears to be a good solution for our scenario. It meets all our needs and even offers the possibility to extend the assistant in the future to allow users to modify repair information.

Summary of Recommendations
The following flowchart summarizes the key questions to ask yourself when considering whether to extend your declarative agent with an API plugin.
