Engineering · Network Engineer

AI Agent for Converting CDP Topology to Lucidchart Prompts with AWX and Gemini AI

End-to-end automation from CDP data extraction to Lucidchart prompt generation.

How it works
1 Step
Step 1: Launch AWX job
2 Step
Step 2: Parse topology
3 Step
Step 3: Generate prompt
Trigger the AWX Job Template to run network commands (e.g., show cdp neighbors detail) and produce stdout.

Overview

What this AI agent delivers end-to-end.

The AI agent retrieves Layer-2 topology data from AWX and parses CDP neighbor relationships. It passes the structured topology to Gemini AI to produce a Lucidchart-ready prompt. The result is a ready-to-paste diagram prompt that accurately reflects the network topology.


Capabilities

What AI Agent for Converting CDP Topology to Lucidchart Prompts with AWX and Gemini AI does

Core actions that transform data into a diagram-ready prompt.

01

Fetch CDP topology data from AWX and produce stdout.

02

Parse neighbor relationships using JavaScript to extract device links.

03

Transform parsed topology into a Lucidchart-ready prompt format.

04

Validate prompt structure for syntactic correctness.

05

Submit structured data to Gemini AI for final prompt generation.

06

Return a ready-to-paste Lucidchart prompt.

Why you should use AI Agent for Converting CDP Topology to Lucidchart Prompts with AWX and Gemini AI

This AI agent replaces fragmented manual work with a predictable execution flow.

Before
Manual CDP data collection from AWX is error-prone.
Parsing neighbor relationships by hand is time-consuming.
Converting topology into a Lucidchart prompt requires repetitive formatting.
Keeping prompts up to date during changes is tedious.
Delays in diagram generation hinder network planning.
After
Automated, accurate topology prompts generated consistently.
Parsing and transformation time reduced to minutes.
Prompts maintain consistent structure across diagrams.
Prompts update automatically when topology changes.
Diagrams can be produced quickly for planning and incident response.
Process

How it works

A simple 3-step flow any user can follow.

Step 01

Step 1: Launch AWX job

Trigger the AWX Job Template to run network commands (e.g., show cdp neighbors detail) and produce stdout.

Step 02

Step 2: Parse topology

n8n fetches stdout and uses a JavaScript parser to extract neighbor relationships and device links.

Step 03

Step 3: Generate prompt

Send the structured data to Gemini AI to generate a Lucidchart-ready prompt.


Example

Example AI Agent

One realistic scenario.

In a mid-size campus network of 12 devices, the AI agent triggers AWX, collects CDP neighbors, parses relationships, and returns a Lucidchart-ready prompt. This prompt yields an accurate diagram of inter-device connections that matches the physical layout. The process completes in under 6 minutes with logs available for auditing.

Engineering AWXn8nGemini AILucidchart AI Agent flow

Audience

Who can benefit

Roles that gain from automated topology prompts.

✍️ Network Engineer

Requires quick, accurate topology visuals to implement changes.

💼 Network Architect

Needs consistent, shareable topology prompts for designs.

🧠 IT Operations

Maintains up-to-date diagrams for run books and incident response.

Data Center Engineer

Documents rack-level topology for cabling and replacements.

🎯 Cloud Architect

Represents hybrid networks in diagrams generated from real topology.

📋 Security Analyst

Visualizes L2 topology to assess attack paths and access controls.

Integrations

The AI agent connects tools to automate the flow.

AWX

Runs the Job Template to gather CDP data and produces stdout read by the AI agent.

n8n

Fetches stdout, coordinates the parser, and passes structured topology to Gemini AI.

Gemini AI

Generates a Lucidchart-ready prompt from the structured topology data.

Lucidchart

Consumes the prompt to create the network diagram visually.

Applications

Best use cases

Concrete scenarios where this AI agent shines.

New network build planning with fast topology-to-diagram generation.
Topology change audits to maintain accurate diagrams.
Incident response diagrams showing affected devices and links.
Network migration and site consolidation diagrams.
Vendor evaluation and standardization of topology visuals.
Data center topology documentation for audits and maintenance.

FAQ

FAQ

Common questions about using this AI agent.

The AI agent uses AWX to execute CDP-relevant commands and capture stdout, then parses the output to extract neighbor relationships. It relies on a defined topology schema to ensure consistency. All parsing is performed in a controlled pipeline with auditable steps. If sources change or commands fail, the agent surfaces a clear error with suggested remediation.

Data is processed within your environment through AWX and your chosen LLM provider. Access to AWX and the AI tool is governed by your credentials and role-based access controls. The agent does not transmit sensitive data outside your network unless you configure it to do so. Output prompts are stored temporarily for the duration of the flow and can be purged on request.

The end-to-end flow typically completes in a few minutes, depending on network size and AWX job duration. The AWX step runs in parallel with the parsing stage, and Gemini AI completes the final prompt generation quickly once structured data is available. Logs provide visibility into timing and any bottlenecks for optimization. You can re-run the flow to regenerate prompts after topology changes.

Yes. The AI agent uses a defined prompt structure that you can modify to include or exclude specific fields. You can adjust how devices are labeled, what relationships are emphasized, and how the diagram should be organized (e.g., by site or device type). Customization can be saved as a template and reused for future topologies. Any changes are reflected in subsequent prompt generations.

If the AWX job fails, the AI agent halts the flow and surfaces a detailed failure report. It includes the command that failed, the stdout excerpt, and suggested remediation steps (e.g., retry, credentials check, or Job Template ID validation). You can re-run after addressing the root cause. The prompt generation step only executes after a successful AWX run to prevent cascading errors.

The agent is designed to operate on the topology data returned by CDP, which can include multiple sites. It can handle heterogeneous environments if the CDP data is available. For multi-vendor environments, ensure CDP equivalents or vendor-specific neighbor discovery data are used. The output prompt will reflect the topology as parsed and organized by the defined schema.

The current prompts are built from CDP-derived data, which commonly focuses on IPv4, but the parser can be extended to include IPv6 neighbor information if available. Gemini AI can incorporate IPv6 labeling in the Lucidchart prompt. If IPv6 data is critical, you can adjust the data collection commands and parsing rules accordingly. Expect prompts to represent IPv6 addresses in the same layout as IPv4 where provided.


AI Agent for Converting CDP Topology to Lucidchart Prompts with AWX and Gemini AI

End-to-end automation from CDP data extraction to Lucidchart prompt generation.

Use this template → Read the docs