{
  "type": "record",
  "Aspect": {
    "name": "aiAgentInfo"
  },
  "name": "AIAgentInfo",
  "namespace": "com.linkedin.pegasus2avro.agent",
  "fields": [
    {
      "Searchable": {
        "boostScore": 10.0,
        "enableAutocomplete": true,
        "fieldNameAliases": [
          "_entityName"
        ],
        "fieldType": "WORD_GRAM"
      },
      "type": "string",
      "name": "name",
      "doc": "Display name of the agent"
    },
    {
      "Searchable": {
        "fieldType": "TEXT",
        "hasValuesFieldName": "hasDescription"
      },
      "type": [
        "null",
        "string"
      ],
      "name": "description",
      "default": null,
      "doc": "Human-readable description of what this agent does"
    },
    {
      "type": [
        "null",
        "string"
      ],
      "name": "instructions",
      "default": null,
      "doc": "Custom base instructions for the agent, beyond the standard DataHub boilerplate.\nInjected into the agent's system prompt."
    },
    {
      "type": [
        "null",
        {
          "type": "record",
          "name": "DataHubAgentSettings",
          "namespace": "com.linkedin.pegasus2avro.agent",
          "fields": [
            {
              "Searchable": {
                "fieldName": "showInChat",
                "fieldType": "BOOLEAN",
                "queryByDefault": false
              },
              "type": [
                "null",
                "boolean"
              ],
              "name": "showInChat",
              "default": null,
              "doc": "When true, this agent appears as a selectable mode in the\nAsk DataHub chat interface alongside the built-in modes."
            },
            {
              "type": [
                "null",
                {
                  "type": "array",
                  "items": {
                    "type": "record",
                    "name": "AIAgentToolRef",
                    "namespace": "com.linkedin.pegasus2avro.agent",
                    "fields": [
                      {
                        "type": "string",
                        "name": "toolId",
                        "doc": "Identifier of the tool, matching the tool name in the MCP tool registry."
                      },
                      {
                        "type": "boolean",
                        "name": "enabled",
                        "default": true,
                        "doc": "Whether this tool is enabled for the agent. Defaults to true."
                      }
                    ],
                    "doc": "A reference to a specific tool in the MCP tool registry.\n\nWhen an agent's tools list is null/absent, all available tools are enabled.\nUse tool refs only to restrict an agent to a subset of tools."
                  }
                }
              ],
              "name": "tools",
              "default": null,
              "doc": "Tools available to this agent, selected from the MCP tool registry.\nWhen null/absent, all available tools are enabled.\nSpecify to restrict the agent to a subset of tools."
            },
            {
              "Relationship": {
                "/*": {
                  "entityTypes": [
                    "service"
                  ],
                  "name": "AgentPlugin"
                }
              },
              "type": [
                "null",
                {
                  "type": "array",
                  "items": "string"
                }
              ],
              "name": "plugins",
              "default": null,
              "doc": "URNs of service entities (MCP plugins) available to this agent",
              "Urn": "Urn",
              "urn_is_array": true
            },
            {
              "Relationship": {
                "entityTypes": [
                  "dataHubView"
                ],
                "name": "AgentView"
              },
              "java": {
                "class": "com.linkedin.pegasus2avro.common.urn.Urn"
              },
              "type": [
                "null",
                "string"
              ],
              "name": "view",
              "default": null,
              "doc": "URN of a DataHub View that scopes which assets are accessible to this agent",
              "Urn": "Urn",
              "entityTypes": [
                "dataHubView"
              ]
            }
          ],
          "doc": "Settings specific to DataHub-native agents. These fields configure how\nthe agent integrates with DataHub's built-in features (chat, tools, plugins,\nviews). They are not expected to be populated for external agents."
        }
      ],
      "name": "settings",
      "default": null,
      "doc": "DataHub-native agent settings (tools, plugins, view, chat visibility).\nOnly populated for NATIVE and SYSTEM agents; not used by EXTERNAL agents."
    },
    {
      "type": [
        "null",
        {
          "type": "record",
          "name": "AIAgentSource",
          "namespace": "com.linkedin.pegasus2avro.agent",
          "fields": [
            {
              "Searchable": {
                "addToFilters": true,
                "fieldName": "sourceType",
                "fieldType": "KEYWORD"
              },
              "type": {
                "type": "enum",
                "symbolDocs": {
                  "EXTERNAL": "An agent defined and managed externally, cataloged on DataHub.",
                  "NATIVE": "An agent defined and managed natively on DataHub by end users.",
                  "SYSTEM": "A system-internal agent, bootstrapped at deployment time.\nSystem agents are not editable by end users."
                },
                "name": "AIAgentSourceType",
                "namespace": "com.linkedin.pegasus2avro.agent",
                "symbols": [
                  "SYSTEM",
                  "NATIVE",
                  "EXTERNAL"
                ],
                "doc": "The source type of an AI agent definition.\n\nFollows the same pattern as AssertionSourceType: NATIVE agents are\ndefined and managed on DataHub, while EXTERNAL agents are cataloged\nbut managed outside DataHub."
              },
              "name": "type",
              "doc": "The source type of the agent"
            }
          ],
          "doc": "The source or origin of an AI agent definition.\nFollows the same pattern as AssertionSource."
        }
      ],
      "name": "source",
      "default": null,
      "doc": "The source or origin of the agent definition.\nSystem agents (source.type = SYSTEM) are bootstrapped at deployment time\nand are not editable by end users."
    },
    {
      "Searchable": {
        "/time": {
          "fieldName": "createdAt",
          "fieldType": "DATETIME",
          "queryByDefault": false
        }
      },
      "type": {
        "type": "record",
        "name": "AuditStamp",
        "namespace": "com.linkedin.pegasus2avro.common",
        "fields": [
          {
            "type": "long",
            "name": "time",
            "doc": "When did the resource/association/sub-resource move into the specific lifecycle stage represented by this AuditEvent."
          },
          {
            "java": {
              "class": "com.linkedin.pegasus2avro.common.urn.Urn"
            },
            "type": "string",
            "name": "actor",
            "doc": "The entity (e.g. a member URN) which will be credited for moving the resource/association/sub-resource into the specific lifecycle stage. It is also the one used to authorize the change.",
            "Urn": "Urn"
          },
          {
            "java": {
              "class": "com.linkedin.pegasus2avro.common.urn.Urn"
            },
            "type": [
              "null",
              "string"
            ],
            "name": "impersonator",
            "default": null,
            "doc": "The entity (e.g. a service URN) which performs the change on behalf of the Actor and must be authorized to act as the Actor.",
            "Urn": "Urn"
          },
          {
            "type": [
              "null",
              "string"
            ],
            "name": "message",
            "default": null,
            "doc": "Additional context around how DataHub was informed of the particular change. For example: was the change created by an automated process, or manually."
          }
        ],
        "doc": "Data captured on a resource/association/sub-resource level giving insight into when that resource/association/sub-resource moved into a particular lifecycle stage, and who acted to move it into that specific lifecycle stage."
      },
      "name": "created",
      "doc": "When this agent was created"
    },
    {
      "Searchable": {
        "/time": {
          "fieldName": "lastModifiedAt",
          "fieldType": "DATETIME",
          "queryByDefault": false
        }
      },
      "type": "com.linkedin.pegasus2avro.common.AuditStamp",
      "name": "lastModified",
      "doc": "When this agent was last modified"
    }
  ],
  "doc": "Configuration and metadata for an AI agent.\n\nAgents can be:\n1. System (SYSTEM): bootstrapped at deployment time via YAML, not editable\n2. Native (NATIVE): created by end users through the UI or API\n3. External (EXTERNAL): cataloged on DataHub but managed externally\n\nDataHub-native configuration (tools, plugins, view, chat visibility)\nlives in the nested DataHubAgentSettings record."
}