John Capobianco • 00:00
Good morning. What we’re going to be doing is populating Netbox automatically, agentically, using a flow agent created in FlowAI from Itential. So we’re going to add a site here, and we’ll just call this Itential and Let it have the slug. So that way we have a site. So the site is empty right now. There’s no related objects. All right.
John Capobianco • 00:25
So in Flow AI. Actually, the 1st thing I need to do here is to get and refresh my API token. So we’re going to add a new token here. And because this is a sandbox, normally I wouldn’t share this information with you. But just to show you how easy this really is, and we’re going to create that key. And I am going to… Connect in and Okay, start from here Start from here.
John Capobianco • 01:26
So I’ve connected in and I’m just going to change into where the MCP servers live and I’m going to VI the.env file and again because this is a sandbox I normally wouldn’t show this information Okay, so if we go back to that site, the itential site, we’re going to keep an eye on it. So in Flow AI, I have this sync to netbox flow agent where the system message is pretty simple. Network automation agent with access to two MCP servers. Use bulk MCP to create to avoid recursion limits and some ground rules. The system prompt sort of lays out exactly deterministically with some guardrails what should be done and the final output report. Now I’m going to show you the tools which include four MCP tools, a show command and running config command for PyATS and the list objects and create bulk bulk create objects.
John Capobianco • 02:50
That’s all I’ve done. So we’re going to run this agent and go to our missions. And it really only takes 200 seconds or so, at least last time it did. And just to give you a preview on what’s going to happen here, we’re going to have that system message and the user message, right? And it’s going to create the steps: collect device data from PyATS, and it crabs the show run and show what did it run, show interfaces. Next, right, it has all the interface data. Go ahead and do the netbox stuff.
John Capobianco • 03:41
And then we get this wonderful report with hyperlinks to all of the records, all of the interfaces, and all of the IP addresses were tracked in this last run. And so let’s go back to the one that’s cooking in the oven. It’s probably halfway there, I hope. Okay, the sync is finished, and it took let’s just give it a 2nd here to refresh. Took about 3 min , or no, no, not 3 min , a little over 2 min , 143 seconds, 137,000 tokens. And let’s take a look here. So it did what we would expect it to do: run some PyATS show commands, get some information from Netbox.
John Capobianco • 04:29
Sorry about that. And then do some bulk creates. And everything is in. Here’s the device. And in the device, you can see that we have 54 interfaces now. All of the sub-interfaces, the loopbacks, everything. Isn’t that quite remarkable?
John Capobianco • 04:56
That’s pretty cool. Pretty cool. Let’s go back to the report. And we have individual links for everything. Let’s just sample one of them. And it has the description too. So, all the descriptions were scraped and added as well from the table of interfaces and then the IP addresses.
John Capobianco • 05:25
Let’s just check the IPAM. Yeah, who it’s for and what it’s assigned to. So, in 143 seconds, all agentically, you saw the prompts, you saw the four tools I used. We were able to completely update all by itself, autonomously, agentically, the entire Netbox right source of records. Pretty cool stuff. Pretty cool stuff. So, the next thing I’m going to do is try to do it in the reverse direction.
John Capobianco • 06:03
So, let me set that up and I will add that to the next part of the video: is doing it in the other direction. Okay, stay tuned. A loopback 100 interface and assigned it a random IP address with a description of netbox says this should exist. Okay? So let’s go into Flow AI and I’m actually going to do sync to netbox and I’m going to duplicate this tab and we’re going to build a new agent called sync what was it called? Sync from Netbox. And just to give myself a starter, I’m going to reverse this.
John Capobianco • 07:11
I’m going to say use this as a source of truth. Use this to drive configuration. Check all of these interfaces in the source of truth and confirm they exist on the device if they do not use I guess to configure them. We don’t need bulk operations here. And now the instructions would be the box or if you want to give the species to make it accessible. Gather IP interface IP info from netbox add to device if interface IP doesn’t exist or is in discrepancy report with all links, all created resources. Okay, same idea.
John Capobianco • 09:02
Okay, so now the tools. I want to grab Py EPS show run configure device show run so run a show command run the show command for show running config and the configure device and then I also want netbox netbox Uh list objects. I think that’s all I really need is list objects. Okay. Claude 4 is fine. Create the agent and sync from Netbox.
John Capobianco • 10:24
Let’s run this agent and keep an eye on this agent. Now I guess If I CD into the PyATS MCP and cat out the test bed, well, let’s just let it run. Let’s let it run. If we need to prove that it did set that up, I can always sign into the box to prove it later. But let’s just see. It shouldn’t take all that long.
John Capobianco • 11:22
We’ll give it a couple of minutes here. And I’ll come back to you with the results. Okay, it does say it’s finished here. And it did work. No, it didn’t push all of that. It pushed this loop back 100 . There was one configuration step here.
John Capobianco • 12:15
Alright, it actually did push everything from the source of truth, not just the one missing interface. Okay. So it is item potent with the I thought it would have just pushed the missing. Maybe that’s my fault in my human language that I should have. So let’s go see if it exists here. Show run into loop 100. Yeah, look at very cool.
John Capobianco • 12:45
Bi-directional. So we can sync to and sync from our source of truth in this case to a source of reality.