Docsity

AI Agent Protocols: Model Context Protocol (MCP) and Agent-to-Agent Interoperability, Appunti di Sistemi Informativi

Toggle sidebar
bg1
Multi-Agent Interoperability (5%)
This section of the exam tests these topics:
1. Explain the purpose of Model Context Protocol (MCP) and its use cases.
2. Explain the purpose of agent to agent protocol.
3. Given a scenario, identify when it's appropriate to use Agent API.
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Anteprima parziale del testo

Scarica AI Agent Protocols: Model Context Protocol (MCP) and Agent-to-Agent Interoperability e più Appunti in PDF di Sistemi Informativi solo su Docsity!

Multi-Agent Interoperability (5%)

This section of the exam tests these topics:

  1. Explain the purpose of Model Context Protocol (MCP) and its use cases.
  2. Explain the purpose of agent to agent protocol.
  3. Given a scenario, identify when it's appropriate to use Agent API.

Explain the purpose of Model Context Protocol (MCP)

and its use cases.

AI agents are quickly becoming an essential part of the enterprise technology stack — powering everything from customer support to supply chain optimization. But for agents to be effective, they need access to the full context of your business: data, logic, and systems. That’s where MCP comes in. Model Context Protocol (MCP) is an emerging standard (an open-source protocol) that enables agents to securely and efficiently interact with enterprise systems. Before MCP, each tool needed its own custom integration code, causing tool and resource fragmentation. With MuleSoft MCP Support, organizations can now:  Expose any MuleSoft-managed API or integration as an MCP server  Enable agents to discover and invoke enterprise actions through a standardized protocol  Eliminate the need for writing custom agent-specific code to bring in critical business data By turning your existing APIs and integrations into MCP-compatible assets, you empower agents to operate with real-time business context — increasing accuracy, reducing hallucinations, and unlocking entirely new levels of workflow automation. Additionally, developers can expose existing integrations and resources for AI apps and agents using MCP. However, a major challenge for enterprises is ensuring the security of the data and tools used by MCP servers, as well as implementing the necessary policies and governance. MuleSoft’s implementation of MCP is designed for flexibility, speed, and scale. With just a few clicks, developers can transform their APIs and Mule apps into MCP servers — no complex setup or manual configuration required. Here’s what’s included:  Connector-based MCP implementation for APIs and integrations: Make your existing Mule applications agent-ready with minimal effort  Support for internal, custom, and third-party systems: From NetSuite and SAP to internal tools and databases, expose any system to your AI agents  Secure, scalable connectivity: Ensure agents only access the systems and actions they’re authorized to use — all managed through the Anypoint Platform

Connect Agentforce to any MCP server

Agentforce will include a native MCP client in Pilot with the July 2025 release, enabling agents to connect to any MCP-compliant server securely without custom code. And, Agentforce will provide an enterprise-grade MCP Server registry to enforce security policies and identity. Authorized admins will have a central registry for MCP-defined tools, with enterprise-grade policy enforcement to ensure that all agent activity adheres to strict security, rate-limiting, and access protocols. This will provide one orchestration layer for governing which agents connect, what tools they access, and how they operate. Connect AI assistants to Salesforce data with Salesforce Hosted MCP Servers Salesforce is introducing hosted MCP servers that support access to certain targeted APIs on our platform. This is currently in Pilot, and pricing is TBD. And in the future, customers and partners will also be able to build and package custom MCP servers on the Salesforce Platform for standard and custom Salesforce functionality. These MCP servers can work with AI assistants like Claude Desktop, Cursor, and more. Transform APIs to MCP servers With MuleSoft’s Anypoint Platform, you can now convert any API or an existing Mule application to an MCP server. To learn more about this feature (currently in GA), check out this article on the MuleSoft blog. Host custom MCP servers on Heroku and connect to Agentforce with AppLink Finally, if you are looking to build a complete custom MCP server in the language and SDK of your choice, Heroku provides a managed infrastructure with built-in DevOps to host the MCP server. With Heroku AppLink, you can connect to Agentforce to use the on-demand scaling capabilities of Heroku infrastructure. Delivering complete MCP support with trust

In conclusion, Model Context Protocol is revolutionizing how AI applications connect with tools and data, and Salesforce is at the forefront of this transformation. With the introduction of pre-built MCP servers for Salesforce Developer experience, Heroku, and MuleSoft, alongside the enterprise-grade security and governance of Agentforce, developers now have a powerful and secure framework to build next-generation AI experiences. Try out these new servers in your development workflow and let us know your feedback via the trailblazer community. We are just getting started, so stay tuned for more exciting updates.

Real-world examples of agent-ready integration

With MCP support, the possibilities are wide-ranging. Here are just a few ways organizations can use MuleSoft to power more intelligent AI agent experiences: Inventory management agents with full context A company wants an inventory agent that can consolidate stock levels from Salesforce, NetSuite, and a custom on-prem database. Without MCP, the agent would only access SaaS APIs and operate with incomplete information. With MuleSoft MCP Support, all systems are surfaced through a single, secure layer — ensuring smarter restocking recommendations and fewer fulfillment delays. Customer support agents with true personalization A customer agent built on Agentforce can answer billing questions, schedule deliveries, and even create service tickets — but only if it can securely access internal APIs. With MCP-enabled integrations, the agent can execute actionability across the business, delivering highly personalized service that goes beyond the data it has been trained on. Scalable, secure agentic automation across departments IT teams can define once and reuse across many agents — ensuring consistency, scalability, and centralized governance. As organizations scale AI agent usage across teams, MuleSoft MCP Support ensures there’s no need to rebuild integrations from scratch for each use case, and that every backend system interaction is secure.

10 foundational building blocks for agent interoperability

So, how does this all work behind the scenes? To ensure that agents can interact in a scalable and trusted way, we’ve developed a set of common building blocks designed to facilitate core tasks, like helping agents locate and identify each other, communicate and process information. These 10 elements are the north star guiding our efforts to create a shared standard for agent-to- agent interoperability.

  1. Getting to know our agents (Agent Metadata Card): Imagine each agent has its own business card. This card tells you everything you need to know – who it is, what it’s good at (and not so good at!), how it fits into the bigger picture, and even some technical details about how it talks to others. This makes it clear who’s who and what they can do.
  2. Keeping things secure (Identity & Authorization – RBAC): Just like you need a keycard to get into certain parts of an office, agents also need clear access controls. This ensures that agents only have access to the information and tools they actually need to do their jobs.
  3. Helping agents find each other (Registry & Discovery): Think of this as a dynamic address book for agents. Whenever a new agent comes online or gets an update, it automatically registers itself. This makes it easy for other systems to find the right agent for the task, kind of like automatically finding the best person on your team for a specific project.
  4. Speaking the same language (Communication Patterns): Agents need to be able to talk to each other, and sometimes they need to have a quick chat (like a phone call), while other times they can just send messages back and forth. A shared protocol ensures they can communicate in different ways to handle all sorts of situations efficiently.
  5. Building trust (Agent Trust Score): To get the most out of agents, users need to be able to trust them. A “trust score” can measure factors like how ethically an agent operates, how securely they handle data, and how closely they follow important rules.
  6. Remembering what was said (State & Conversation Management): In a multi-agent landscape, continuity means everything. Using a specialized “conversation ID,” agents can keep track of ongoing interactions, even if different agents jump in to help. They’ll also be able to instantly recall past conversations.
  1. Handling different kinds of information (Multimodal Support): Agents are increasingly moving from text-only conversations to rich, multimedia interactions with voice, pictures, and videos. A shared standard can support these emerging interactive experiences in a consistent way.
  2. Keeping an eye on things (Observability & Auditability): A comprehensive monitoring system is essential as agents begin to work together on increasingly complex tasks. Organizations need a way to track how agents are performing, identify any issues and review past actions. This is crucial for regulatory compliance and maintaining reliability and efficiency.
  3. Locking down security (Security & Compliance): None of this works without enterprise-grade security. Agents should use strong encryption by default, automatically mask sensitive information and integrate robust threat detection systems.
  4. Staying responsive (Scalability & Performance): Just like a website needs to handle lots of visitors at once, agents need to be able to handle surges in demand. Through design features like horizontal scaling and queue-backed buffering, agents can scale up as needed and manage a high volume of requests without slowing down.

How does agent interoperability work in practice?

Let’s take a look at some real-world scenarios to get a sense of how agent interoperability would work in areas like customer service and sales. Customer Service : Imagine a customer needs to return a damaged product. The retailer’s Agentforce Service Agent handles the initial request and communicates with the manufacturer’s Agentforce Return Specialist Agent to assess the damage based on customer-provided photos. Simultaneously, it consults the logistics partner’s Agentforce Policy Agent to determine return shipping protocols. This coordinated effort ensures a swift and efficient resolution for the customer.

Given a scenario, identify when it's appropriate to

use Agent API.

  • The Agent API allows an external application or another agent to invoke an action or conversation from a Salesforce agent. It supports context passing, which is the passing of conversational context (prompt, variables, result) between agents. Bring the power of generative AI to your business with Agentforce. Build intelligent, trusted, and customizable AI agents and empower your users to get more done with Salesforce. Use the Agent API to communicate with AI agents directly from a REST API. Start sessions, send messages to the AI agent, receive messages, and end sessions using the API. To access the Agent API, you must set up a connected app that supports the client credential flow. These instructions show you how to get your environment set up for use with the API and demonstrate how to make your first call to the API.
  1. Prerequisites: You must have Agentforce enabled with at least one agent activated.
  2. Create a Connected App and enable OAuth Agent: To use the Agent API, you must create a Connected App. We suggest you set up the app to support the client credentials flow, although you can use any flow that provides a JWT-based access token. Use the connected app to create a token.
  3. Add Connected App to Agent: Before calling the API, add your connected app to your agent.
  4. Obtain Credentials: To create a token, you need the consumer key and consumer secret from your connected app.
  5. Create a Token: All calls to the Agent API require a token. Create a token by using the consumer key, consumer secret, and your domain name.

Call the API: After you set up your connected app and created a token, you’re ready to call the API. Before making the call, gather this information.  AGENT_ID: The ID of the agent that you want to interact with. You can find this ID in the URL of the Agent Overview Page. When you select the agent from Setup, use the 18-character ID at the end of the URL. For example, when viewing this URL, https://mydomain.test1.my.pc- rnd.salesforce-setup.com/lightning/setup/EinsteinCopilot/ 0XxSB000000IPCr0AO/edit, the agent ID is 0XxSB000000IPCr0AO.  ACCESS_TOKEN: The token that you created in Create a Token.  RANDOM_UUID: A random UUID value that you provide to represent the session key. You can use this parameter to trace the conversation in your agent’s event logs.  MY_DOMAIN_URL: From Setup, search for My Domain. Copy the value shown in the Current My Domain URL field. What to Consider  Data usage: Each call to the Agent API consumes Einstein Requests. The number of requests used depends on the API call size and the large language model (LLM) usage type multiplier.  API timeouts: The Agent API has a 120-second timeout. If a call times out, you receive an HTTP 500 response. Agent API Overview  Allows external systems or other agents to invoke Agentforce functions.  Uses shared context (input/output) between agents.  Ideal for orchestrating cross-agent flows or triggering custom actions from external apps.

c) Embed a third-party chatbot solution and connect it to Salesforce using a middleware integration. Universal Containers uses a third-party ticketing system but wants to leverage a Salesforce Agentforce agent to enrich new tickets with customer data from Salesforce. When a ticket is created in the external system, an agent should be invoked to find the related contact in Salesforce, retrieve their recent case history, and post it as an internal note on the ticket. Which scenario makes the use of the Agent API necessary? a) When the external system needs to start a session and send instructions to the agent. Correct. The Agent API is necessary when the external system needs to programmatically interact with the Agentforce agent, including starting a session and sending instructions to perform tasks like finding contacts and retrieving case history. b) When users in the third-party system need to log into Salesforce. c) When the agent needs a UI to display the customer data.