Multi-Agent Network Analyzer avatar

Multi-Agent Network Analyzer

Pricing

Pay per usage

Go to Apify Store
Multi-Agent Network Analyzer

Multi-Agent Network Analyzer

Extracts topological interaction paths, communication delay, and synergic execution indices from multi-agent swarms.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

CQ

CQ

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

14 days ago

Last modified

Share

Turn a log of agent-to-agent messages into a directed interaction graph. The actor reads message records (each with a source, a target, and an optional delay), aggregates them into directed edges, and reports, for every edge:

  • source agent
  • target agent
  • count — how many messages went source -> target
  • delayMs — the mean communication latency for that edge (in milliseconds), or null if none of the messages on that edge carried a delay value

Edges are filtered by a configurable minimum transaction count and sorted by count (busiest links first).

This actor does not call any external AI/LLM service and requires no API keys. It only processes the message records you give it.


What it does (and does not do)

Does:

  • Reads message records from one of four sources (see below).
  • Normalizes flexible field names (e.g. from/to/latency or src/dst/delay).
  • Aggregates messages into directed source -> target edges with a transaction count and a mean latency.
  • Drops edges below minTransactions.
  • Pushes one dataset item per surviving edge and writes a summary to the OUTPUT key-value record.

Does not:

  • It does not infer agent roles, compute synergy/efficiency scores, or do any graph centrality / topological analysis beyond per-edge counts and average latency.
  • It does not generate or invent data. If no input source is provided, it logs an explanatory message and exits without producing a graph.

Input

Provide exactly one input source. They are checked in this priority order:

FieldTypeRequiredDescription
recordsarrayone source requiredInline array of message-record objects. Easiest for testing.
datasetIdstringone source requiredID of an Apify dataset whose items are message records.
recordsUrlstringone source requiredHTTP(S) URL returning JSON: either an array of records, or an object with the array under items / records / data / messages / edges.
kvStoreId + kvRecordKeystring + stringone source requiredRead a JSON record (array or object) from an Apify key-value store.
minTransactionsintegerno (default 5)Only keep edges with at least this many transactions.

Message record fields (flexible names)

Each record needs a source and a target; the delay is optional. Field names are normalized, so the following are all accepted:

  • sourcesource | from | src | sender | sourceAgent | source_agent
  • targettarget | to | dst | receiver | targetAgent | target_agent
  • delay (ms)delayMs | delay_ms | delay | latency | latencyMs | durationMs | duration

Records missing a source or a target are skipped. Records with a non-numeric delay are still counted toward the edge, but contribute no latency sample.


Output

Dataset — one item per edge that passed the minTransactions filter:

{
"source": "ManagerAgent",
"target": "SearchAgent",
"count": 3,
"delayMs": 50
}

The dataset is never left empty. If no input source is given, no edge meets the threshold, or a source cannot be loaded, a single informational row is pushed instead:

{
"message": "No agent links met minTransactions=5 (loaded 4 records, 4 usable messages).",
"edges": 0,
"totalMessages": 4
}

Key-value store OUTPUT — a run summary plus the full edge list:

{
"source": "inline records[] (4 records)",
"totalMessages": 4,
"distinctEdges": 2,
"edgesAfterFilter": 2,
"minTransactions": 1,
"edges": [
{ "source": "ManagerAgent", "target": "SearchAgent", "count": 3, "delayMs": 50 },
{ "source": "SearchAgent", "target": "SynthesizerAgent", "count": 1, "delayMs": 90 }
]
}

Example

Input:

{
"records": [
{ "source": "ManagerAgent", "target": "SearchAgent", "delayMs": 40 },
{ "source": "ManagerAgent", "target": "SearchAgent", "delayMs": 50 },
{ "source": "ManagerAgent", "target": "SearchAgent", "delayMs": 60 },
{ "source": "SearchAgent", "target": "SynthesizerAgent", "delayMs": 90 }
],
"minTransactions": 1
}

Result: two edges — ManagerAgent -> SearchAgent (count 3, avg latency (40+50+60)/3 = 50 ms) and SearchAgent -> SynthesizerAgent (count 1, latency 90 ms).


Setup / auth

None. No credentials or API keys are required. When run on the Apify platform, the datasetId / kvStoreId sources resolve against the storages your account can access.


Limitations

  • Averages are unweighted means of the numeric delay values present on each edge; records without a parseable delay are counted but contribute no latency sample.
  • Records are loaded fully into memory and aggregated in a single pass, so extremely large datasets (tens of millions of records) may hit memory limits.
  • recordsUrl must return JSON the actor can parse as a record array (directly or under items / records / data / messages / edges). On an unreachable URL, an HTTP error, or an inaccessible dataset / key-value store, the run fails soft: it logs the error, pushes a single informational row (with the error in message), writes the same message to OUTPUT, and completes without crashing or hard-failing the run.
  • If a source is supplied but no edge meets minTransactions, the dataset holds one informational summary row (message, edges: 0, totalMessages) rather than being empty.
  • If no input source is supplied, the run completes successfully and logs guidance on what to provide; it does not produce a graph.