Skill: neo-agent-traffic-analyzer (version 1.0.0)

--- name: agent-traffic-analyzer description: Analyzes and visualizes communication patterns between OpenClaw agents to identify bottlenecks and suggest optimization strategies. version: 1.0.0 triggers: - "analyze agent communication patterns" - "visualize traffic between my agents" - "find bottlenecks in my agent workflow" - "show me how my agents are communicating" - "optimize agent interactions" - "generate communication report" - "analyze agent network topology" - "identify inefficient agent communication" --- # Agent Traffic Analyzer Analyzes and visualizes communication patterns between OpenClaw agents to identify bottlenecks and suggest optimization strategies. ## Installation ```bash npm install ``` ## Usage ```bash # Analyze a communication log file agent-traffic-analyzer analyze <logfile.json> # Generate a network visualization agent-traffic-analyzer visualize <logfile.json> --format dot # Generate a full report agent-traffic-analyzer report <logfile.json> --output report.json # Show summary statistics agent-traffic-analyzer summary <logfile.json> # Find bottlenecks agent-traffic-analyzer bottlenecks <logfile.json> ``` ## Input Format The tool expects JSON files containing an array of agent communication messages: ```json [ { "id": "msg-001", "from": "agent-alpha", "to": "agent-beta", "timestamp": "2026-01-15T10:30:00Z", "type": "request", "payload_size": 1024, "latency_ms": 45, "status": "delivered" } ] ``` ## Output Formats - **JSON** — Structured analysis results - **CSV** — Tabular data for spreadsheet import - **DOT** — Graphviz network graph definition ## Capabilities - Extract and analyze message flow patterns between OpenClaw agents - Generate visualizations of communication networks and traffic volumes - Identify bottlenecks and inefficiencies in agent interactions - Suggest optimization strategies for improved agent coordination - Export analysis reports in multiple formats (JSON, CSV, DOT) - Compare historical communication patterns over time

path: README.md
content: # agent-traffic-analyzer

![Audit](https://img.shields.io/badge/audit%3A%20PASS-brightgreen) ![License](https://img.shields.io/badge/license-MIT-blue) ![OpenClaw](https://img.shields.io/badge/OpenClaw-skill-orange)

> A skill that analyzes and visualizes the communication patterns between multiple OpenClaw agents, highlighting bottlenecks and suggesting optimization strategie

I need to see where we left off to continue. Let me check the current workspace state and any recent work.

## Installation

```bash
npm install
```

## OpenClaw Marketplace

This skill is available on [ClawHub](https://clawhub.ai) — the OpenClaw skill marketplace.
Install it in any OpenClaw agent workspace with:

```bash
clawhub install agent-traffic-analyzer
```

**Recommended price when commercial:** $29 USD

## License

MIT © NeoSkillFactory


path: docs/api.md
content: # API Documentation

## Analyzer

```js
const { Analyzer } = require('./lib/analyzer');
const analyzer = new Analyzer(messages);
```

### Constructor

- `new Analyzer(messages)` — Creates a new analyzer instance from an array of message objects.

### Message Format

```json
{
  "id": "string",
  "from": "string (required)",
  "to": "string (required)",
  "timestamp": "ISO 8601 string",
  "type": "request | response | broadcast",
  "payload_size": "number (bytes)",
  "latency_ms": "number",
  "status": "delivered | failed | timeout"
}
```

### Methods

- `getAgents()` — Returns sorted array of unique agent names.
- `getAgentStats()` — Returns per-agent statistics (sent, received, bytes, latency, failures).
- `getEdgeStats()` — Returns per-edge statistics for each communication channel.
- `getTimeline()` — Returns messages sorted chronologically.
- `getSummary()` — Returns overall summary statistics.
- `findBottlenecks(options)` — Detects bottlenecks based on configurable thresholds.
- `suggestOptimizations()` — Returns optimization strategies based on detected bottlenecks.

## Visualizer

```js
const { Visualizer } = require('./lib/visualizer');
const visualizer = new Visualizer(analyzer);
```

### Methods

- `generateDot(options)` — Generates Graphviz DOT format network graph.
- `generateTimeline(options)` — Generates ASCII timeline of message flow.
- `generateAsciiNetwork()` — Generates ASCII network topology diagram.

## Reporter

```js
const { Reporter } = require('./lib/reporter');
const reporter = new Reporter(analyzer, visualizer);
```

### Methods

- `generateJSON()` — Full report as JSON string.
- `generateCSV()` — Report as CSV format.
- `generateDot(options)` — Report as DOT graph.
- `generateReport(format, options)` — Generate report in specified format.
- `exportToFile(filepath, format, options)` — Write report to file.
- `generateTextSummary()` — Human-readable text summary.


path: docs/troubleshooting.md
content: # Troubleshooting

## Common Issues

### "File not found" error

Ensure the path to your JSON log file is correct. Use absolute paths or paths relative to your current working directory.

```bash
agent-traffic-analyzer analyze ./logs/communication.json
```

### "Invalid JSON" error

The input file must contain valid JSON. Verify with:

```bash
node -e "JSON.parse(require('fs').readFileSync('your-file.json','utf8'))"
```

### "Expected an array of messages" error

The root element of the JSON file must be an array `[...]`, not an object `{...}`.

### "Missing required from or to field" error

Every message object must have at minimum `from` and `to` string fields identifying the sender and receiver agents.

### No bottlenecks detected

The default thresholds may be too lenient for your data. Try lowering them:

```bash
agent-traffic-analyzer bottlenecks data.json --latency-threshold 50 --traffic-threshold 0.2
```

### DOT output not rendering

The DOT output is plain text in Graphviz format. To render it as an image:

```bash
agent-traffic-analyzer visualize data.json -f dot -o network.dot
dot -Tpng network.dot -o network.png
```

Requires Graphviz to be installed (`apt install graphviz` or `brew install graphviz`).

## Performance

The analyzer processes messages in-memory. For very large datasets (100k+ messages), consider splitting the log file or increasing Node.js memory:

```bash
node --max-old-space-size=4096 bin/agent-traffic-analyzer analyze large-file.json
```


Security scan verdicts — ClawScan: clean | static analysis:  | VirusTotal: malicious | SkillSpector: suspicious (MEDIUM)