So you've gone and created an ACP server, and you've defined an agent running on it, and you've been able to call that to it via client. But this doesn't really demonstrate inter agent operability, does it? We've only call that to a single agent. Well, we're going to define another ACP server and begin the process of sequentially chaining these agent calls. The first thing that we need to do is create a second server. And in this case we're going to create a hospital ACP server to work with that insurance server. So we've gone and defined our first ACP server, the insurance server. What we're going to define another ACP server. But this one is going to be more focused on a hospital. If you imagine this might be a common pattern when it comes to different organizations, you might use a different ACP service to communicate across those different organizations. Maybe you might even define different ACP servers to communicate across different teams. In this case, we're going to have a hospital to ensure a type relationship when it comes to working with our different ACP servers. So we're going to start in a similar manner to what we did for the insurance server. The first thing that we're going to go ahead and do is we're going to create a server, and we're going to output this into our my ACP project repository or directory. To do that, we're going to use the write file magic function inside of our Jupyter notebook. And then we're going to export this file into the "my ACP project" directory. And the following guide will be outputting is smolagents_ server.py. Why smolagents? I'll come back to this in a sec. The next thing that we need to do is bring in a couple of dependencies. Now these dependencies are going to be pretty much the same as what we brought into our insurance server from an ACP standpoint. The agent stuff is going to be a little bit different. So, first up, what we're going to do is we're going to bring in the async generate a class from collections on ABC. This is going to be used as the type when it comes to defining our agent function. We're then going to import the message and Message part class from ACP SDK dot models. We're going to use this to structure the output that we send back from our ACP server, and specifically our agent on that ACP server. Then we're going to bring in a couple more dependencies from our ACP SDK server class. We're going to bring in run yield, run yield resume, and the server itself. Run yield, and run Yield resume are going to form part of our asynchronous generator. And the server is going to form the context of our ACP server all together. Now, why did we call it smolagent server. Well, rather than using CrewAI like we did for our insurance server, we're going to use the smolagents framework this time. These sort of shows that you've got the ability to use different agent frameworks when it comes to working with ACP. So, what do we need to bring in from A smolagent's perspective? Well, we're going to go from smolagents, we're going to import the code agent. We're going to import the DuckDuckGo search tool. So this kind of format search tool we're also going to bring in the LightLLMModel class and the visit web page tool. So the code agent is going to form the crucks of our agent. And this means that it's going to be writing up Python functions to be able to call out to different tools. The DuckDuckGo search tool and the visit web page are going to allow us to access the internet, and the light LLM model is going to form the basis for the LLM that we're going to use inside of our agent. Those are the main dependencies now imported. Now, we're going to follow pretty similar structure when it comes to defining our ACP server. So, what we're going to do is we're going to create a new server. And this is an instance of our ACP server that we define over there. We're then going to define our LLM model. So, to do that, we're going to use our light LLM model class and we're going to pass through our model ID which in this case is going to be OpenAI GPT-4. But again you could use your own LLM provider. You could use Llama, you could use local LLMs. You've got the ability to use a number of different choices. If you wanted to use WatsonX.AI or OLlama. Those are the other ones that I mainly use. Then we're going to define the maximum number of tokens for our agent. We're going to set that to 2048. We need a few extra when it comes to using smolagents. So that is our server now defined. And now our LLM now defined. Now we're going to define our agent. So to do that, we're going to use the server dot agent decorator. And then we're going to define another asynchronous function. And this time we're going to call this agent health agent. Remember when we defined our last agent, it was called policy agent. Then when we use the client we called the policy agent to be able to send our prompt to it. And again, this is going to have one argument and it's going to be the input. And this is going to be a list of messages. We're again going to return our asynchronous generator. And that's going to take in run yield and run yield resume. Then what we're going to do is begin building out our agent. And remember one of the most important things is defining our docstring, because it's going to provide metadata about the agent that we've got on our ACP server. So we are going to define docstring. So we're going to say this is a code agent which supports a hospital to handle health based questions for patients. Current our prospective patients can use it to find answers about their health and hospital treatments. Full stop. Cool. So that's our docstring now defined. Now when it comes to actually building up our agent, we're going to create a new agent and define that as our code agent from smolagents over here. We then need to pass through a couple of tools. So through the tools argument we're going to pass through two things: the DuckDuckGo search tool and the visit web page tool. Then we need to pass through our model. So we've now got our tools defined. We also need our LLM. We're going to set our model equal to model, which in this case is set to our OpenAI GPT-4 class. Then what we want to do is we want to get our prompt. And if you remember when we defined our insurance agent, we're able to unpack our input, grab the first prompt from the list, and then grab the first part from that prompt, and then grab the content value. So if we go and do that again, we should be able to grab our prompt. So we're going to create a new variable. And we're going to set that equal to prompt. And then we're going to get the input grab the first prompt, grab the first part of that prompt. And then grab the content. Then we can take that prompt and pass it through to our agent using agent dot run. And then we're going to pass our prompt over there. So now what we should be doing is we'll be getting our standardized prompt from the ACP client. We will be unpacking that so that we get it into a format that we can pass it through to our smolagents code agent, and then we're going to be running it using it Agent Dot run over here. Then we're going to return our response. And again we're going to use the message and message part format, because this is the way that we structure our outputs using ACP. So we're going to yield message. And then we're going to specify the parts. And the parts are going to be an instance of our message part. We're going to set the content value to a string. And that string is going to take in our response that we had over here. So now we've got a similar input structure. We're unpacking it over here to get our prompt. And then we've got a similar output structure which is ACP compliant to output this when an user goes and makes a call via a client. All that's left to do is go and run it. So again we're going to use a similar Python structure. So we're going to go if name is equal to main then what we're going to do is we're going to run that server and we're going to run it on port 8000. Remember, we ran the insurance server on port 8001. We don't want them to clash. So we're going to run this particular server on a separate server. Now if we go and run this, that's going to overwrite whatever we had inside of the My ACP project. And specifically it's going to overwrite the smolagents_ server dot Py file. But this is really our hospital server now defined. So, how do we go about running this? Well, similar to what we did previously for the insurance server, we're going to run this inside of a terminal. Okay so, to go ahead and start up our hospital server we're going to create a new instance of an iframe. But this time we're going to get terminal two. So previously we got terminal one to run our insurance over. We're going to run the hospital server inside of a terminal 2. So when you're doing this locally, you just create another terminal. If you're running on Mac you might create a bash terminal. If you're running on Windows, you might create another powerShell instance to run this second server. We're going to specify the height and width of this particular terminal. So we're gonna set the width to 800 and the height to 600. And if we go and run this, we should get our terminal back. Take a look. That's our terminal running. And again we're running inside of the My ACP Project file. So, if we were to go inside of that folder, we should see our insurance over but also our hospital server now. Now, if we want to go and run our hospital server, we can run uv run. And we are running. What was our file called? smolagent server.py. So if we scroll in over, you can see that we're going to be running uv run smolagents_server.py and all things holding equal. That should kick off our hospital server. And take a look. We've now got our hospital ACP server running on port eight thousand. So we've now gone and defined a second ACP server. This one's defined using smolagent. And we've now started it up running on a separate port.