Agent Network Best Practices

(0 reviews)

limit-agent-links

general > limit-agent-links


Guidance

This rule validates that external agents don't exceed the recommended maximum of 10 agent links in their metadata configuration. Agent links define connections to other agents within the network. Excessive links create management complexity, performance degradation, and difficult-to-debug orchestration flows. Limiting agent links enforces focused agent design where each agent has a clear, manageable set of dependencies instead of an overly connected hub that couples too many concerns. This constraint requires the decomposition of complex workflows into multiple specialized agents instead of monolithic agents with too many connections. The rule applies to external agent metadata configurations in Agent Network specifications. It provides an architectural guideline for scalable, maintainable agent networks.

Message

Agent has too many agent links defined. Limit the number of links to 10 or fewer to maintain optimal performance and reduce management complexity.

Examples

valid

schemaVersion: 1.0.0
agents:
  customer-service-agent:
    metadata:
      platform: agentforce
      protocol: a2a
      # 3 agent links - within the maxCount: 10 limit
      links:
        - agent:
            ref:
              name: crm-agent
        - agent:
            ref:
              name: analytics-agent
        - agent:
            ref:
              name: notification-agent

invalid

schemaVersion: 1.0.0
agents:
  customer-service-agent:
    metadata:
      platform: agentforce
      protocol: a2a
      # 12 agent links - exceeds the maxCount: 10 limit
      links:
        - agent:
            ref:
              name: crm-agent
        - agent:
            ref:
              name: analytics-agent
        - agent:
            ref:
              name: notification-agent
        - agent:
            ref:
              name: integration-agent
        - agent:
            ref:
              name: database-agent
        - agent:
            ref:
              name: file-agent
        - agent:
            ref:
              name: email-agent
        - agent:
            ref:
              name: calendar-agent
        - agent:
            ref:
              name: payment-agent
        - agent:
            ref:
              name: inventory-agent
        - agent:
            ref:
              name: reporting-agent
        - agent:
            ref:
              name: security-agent

Applies to metadata

Constraint

Type: Declarative Validation

Reviews

TypeRuleset
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onNov 20, 2025
Asset overview

Asset versions for 1.0.x

Asset versions
VersionActions
1.0.0

Tags