If it's not done, it goes into the next loop until it is finished and then has the final response. So, if the LLM decides it's done, it gives you the final response. In our example, what we had, if we now give the exact same prompt like implemented open-map-request for the first issue I have assigned to me, it now responds a little bit different. It says, sure thing, but now has three steps. The first step is look at the issues assigned to you, write code to implement the issue. And the third one, the last one is to open up the pull request. So, it's really going through everything based on what you wrote. So, in the loop, the first one, it says look at the issue assigned to you. Done. It has it in the context. The next one says write code to implement the issue. Once the code is written and code is done, it's actually saying, I will open the pull request. And now it's getting smart, because what you want to have as a user is you want to have a pull request opened. So, the LLM would reason about maybe it's the best to also give a button where the user can basically go to the pull request itself, which is amazing. So, in this case, the agentic loop makes everything smaller, or not smaller by meaning of context, but it's making it smaller in terms of how much you have to prompt or to get basically the last result. So, it could potentially take longer because you don't get guided through it step by step, but it reasons on its own, and this makes everything super powerful.
I talked about the model context protocol, or MCP in short, for a very short second. So, for everybody who doesn't know it, this is how an MCP looks like. So, MCP is mostly in the form of an MCP server, and it's nothing else than just a normal API server, but specifically for LLMs. Which means, in this case, if I have an LLM and LLM says, okay, I have a pull call, it will go to the MCP server call it, where you register one of those three things, two or three sorts of prompts. And then once it receives it based on the API, you can do basically whatever you want. So, you can call an API like another API, you can call a database, you can do whatever you would do in a normal API. Once this is done, you have MCP specific output and you return it to LLM. Most of the time, this is in the form of a JSON, but you can do whatever you want, basically what the MCP allows you to do.
How would it now look like if you would self-host your agent? Well, let's assume you're in a Kubernetes cluster, of course you need to host the Kubernetes, you need to maintain the Kubernetes cluster, and so on. But on top of that, you need to have a React application, which runs on Docker. You have an agent, which has basically the agent group, which runs on Docker and on Node.js. You maybe have an LLM, which you self-host, which is super hard to do, because you need a lot of cheap use, you need distributed data. So, most of the time you have this third party somewhere. But on top, you need the MCP on a Docker container and your database.
Comments