relationship_type, target, request_count, last_seen_at) supports all three today.
As currently deployed, only agent-to-agent
delegates_to edges are actually written - derived from OpenTelemetry span parentage at ingest (see below). Model (calls_model) and provider (uses_provider) edges are supported by the schema and response shape but are not yet populated by proxy telemetry; until that write path ships, expect GET /agents/{id}/relationships and GET /relationships/graph to surface delegation edges only.How It Works
- At OTLP ingest, MeshAI walks each span’s parentage to detect cross-agent delegation and records it as a
delegates_torelationship (model/provider relationship capture from proxy telemetry is planned but not yet wired in). - Query individual agent dependencies or the full organization-wide graph.
- The graph data is structured for direct use with visualization libraries like D3.js.
Get Agent Relationships
Retrieve the models, providers, and other agents an individual agent depends on, as a flat list ordered by request count:{id, relationship_type, target, request_count, last_seen_at} - there is no separate dependencies.providers / dependencies.models grouping and no agent_name in this response.
Get Full Relationship Graph
Retrieve the complete organization-wide graph with nodes and edges, suitable for visualization:Graph Structure
The graph uses a node-edge model:Node Types and IDs
Agent-to-agent (
delegates_to) edges resolve to the real target agent’s own node id - they never get a synthetic node.
Edge Semantics
Edges represent usage relationships accumulated over time (not scoped to a queried time window). Each edge has atype (the relationship type) and a request_count - there is no weight field.
- agent -> model (
calls_model): The agent called this model N times. - agent -> provider (
uses_provider): The agent used this provider N times. - agent -> agent (
delegates_to): The source agent delegated work to the target agent N times. See below.
Agent-to-Agent Delegation
When one agent invokes another (an orchestrator handing work to a worker), MeshAI records adelegates_to edge between the two real agents. Delegation is derived from standard OpenTelemetry span parentage in your OTLP telemetry: when an agent’s LLM span sits under a span started by a different agent, that is a delegation, and the edge’s request count increments.
How it works:
- Your agents export traces with standard
parentSpanIdlinks (every OTel SDK does this by default; both JSON and protobuf exports are supported). - At ingest, MeshAI walks each LLM span’s ancestor chain. Chains are followed through the agent’s own internal spans, and parents that arrived in an earlier export batch are resolved too.
- Cross-agent links become persisted
delegates_toedges with running request counts and last-seen timestamps. Re-exported batches never double-count: only spans that pass ingest deduplication increment edges. - In the graph response, delegation edges connect the two real agent nodes, so the fleet-wide delegation topology renders directly.
Why this matters for governance: emergent multi-agent risks cannot be detected through single-agent evaluation. The delegation map shows which agents act on behalf of which, so you can scope policies, budgets, and risk classifications to the chains that actually exist rather than to agents in isolation.
D3.js Visualization
The graph response is structured for direct use with D3.js force-directed graphs:Use Cases
- Impact analysis - Before blocking a provider, see which agents depend on it.
- Cost optimization - Identify agents that use expensive models and could be routed to cheaper alternatives.
- Compliance reporting - Document all model/provider dependencies for EU AI Act Article 12.
- Incident response - Quickly trace which agents are affected by a provider outage.

