AI agents will become the heaviest consumers of APIs in the future, and hence, it’s more important than ever to design APIs that are both discoverable and agent-ready. That’s exactly where MuleSoft for Agentforce: Topic Center and API Catalog come into play.
In this blog post, we’ll show how you can leverage MuleSoft’s Topic Center and API Catalog to build, govern, and expose your APIs for seamless agent consumption.
Design and build your agent-enabled API
In this section, you will learn how to define Agent Topics and Actions while designing your Mule APIs.
Step 1: Define your API’s purpose with Topic Center:
- Using Anypoint Code Builder (ACB): While designing your API, use MuleSoft’s Topic Center to define relevant topics, the actions an agent can perform related to those topics, and clear instructions for each action.
- Using the GUI: You can also utilize Topic Center’s graphical user interface to define these topics, actions, and instructions, which will then be integrated into your API.
Step 2: Complete the API development lifecycle:
- Proceed with building and implementing your API based on the design and the agent-specific definitions you’ve established in Topic Center. Ensure that all core API logic is in place.
Step 3: Benefit from automatic governance:
- Once you’ve enabled your APIs for Agent Topics and Actions, observe how governance rulesets specific to Topic Center and the upcoming API Catalog are automatically applied. This helps ensure that your API meets security and compliance standards from the outset.
Publish and Synchronize for Agent Access
Once you’re done designing and implementing the APIs, make sure you publish your API to Anypoint Exchange and synchronize them with API Catalog.
Step 4: Publish to Anypoint Exchange:
- After development and initial governance checks, publish your topic-enabled API to Anypoint Exchange, making it discoverable within your organization.
Step 5: Synchronize with API Catalog on the Salesforce Platform:
- Utilize the API Catalog feature on the Salesforce Platform to synchronize your newly published MuleSoft API.
Note: API Catalog also allows synchronization of your Heroku and existing Salesforce APIs, providing a unified view.
Step 6: Leverage automated backend configuration:
- Recognize that once your APIs are synchronized with API Catalog, named credentials and external services will be automatically created in the Salesforce backend. This significantly simplifies the integration process.
Invoke your API via Agentforce (and other Salesforce tools)
After synchronising your APIs in Salesforce platform with the help of API Catalog, you can now go ahead invoke your APIs from Agentforce using Agent Builder
Step 7: Empower Agentforce:
- Invoke via AI agents: With your API now discoverable and configured in API Catalog, Salesforce Developers can easily invoke it via AI agents.
- Extend invocation: Beyond agents, your synchronized APIs can also be invoked using Flow, Apex classes, and other Salesforce Platform tools.
To see all the above steps in action, check out the following Agentforce Decoded video.
https://www.youtube.com/watch?v=_rkKH_pokj4
Resources
- How to Integrate MuleSoft APIs With API Catalog
- Enabling an API Project for Topics and Agent Actions
- Introducing MuleSoft for Agentforce: API Catalog
About the author
Akshata Sawant, Senior Developer Advocate at Salesforce and co-authored book titled “MuleSoft for Salesforce Developers” published by Packt Publication. She’s a global speaker and her notable speaking engagements include Dreamforce, TDX, London’s Calling, Devoxx Belgium, DevopsDays Geneva, APIDays, and more. She is an active member of the MuleSoft and Salesforce Community and awarded as the “Rising Star of the year 2024” by Digital Revolution Awards. Follow her on LinkedIn.
The post Explore MuleSoft for Agentforce with Topic Center and API Catalog appeared first on Salesforce Developers Blog.