Skip to content

[Bug]: Agent Card JSON representation returns "null" for undefined fields #591

@jmesnil

Description

@jmesnil

What happened?

The JSON representation of the Agent Card returns null for undefined fields.
I'm not sure if that's correct or if the fields should not be present instead.

Relevant log output

{
  "name": "Hello World Agent",
  "description": "Just a hello world agent",
  "provider": null,
  "version": "1.0.0",
  "documentationUrl": "http://example.com/docs",
  "capabilities": {
    "streaming": true,
    "pushNotifications": true,
    "stateTransitionHistory": true,
    "extensions": null
  },
  "defaultInputModes": [
    "text"
  ],
  "defaultOutputModes": [
    "text"
  ],
  "skills": [
    {
      "id": "hello_world",
      "name": "Returns hello world",
      "description": "just returns hello world",
      "tags": [
        "hello world"
      ],
      "examples": [
        "hi",
        "hello world"
      ],
      "inputModes": null,
      "outputModes": null,
      "security": null
    }
  ],
  "supportsExtendedAgentCard": true,
  "securitySchemes": {
    "google": {
      "openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration",
      "description": null
    }
  },
  "security": [
    {
      "google": [
        "openid",
        "profile",
        "email"
      ]
    }
  ],
  "iconUrl": null,
  "supportedInterfaces": [
    {
      "protocolBinding": "JSONRPC",
      "url": "http://localhost:9999",
      "tenant": ""
    },
    {
      "protocolBinding": "GRPC",
      "url": "http://localhost:9999",
      "tenant": ""
    },
    {
      "protocolBinding": "HTTP+JSON",
      "url": "http://localhost:9999",
      "tenant": ""
    }
  ],
  "protocolVersion": "1.0",
  "signatures": null
}


I was expecting something without null fields like:


{
  "name": "Hello World Agent",
  "description": "Just a hello world agent",
  "version": "1.0.0",
  "documentationUrl": "http://example.com/docs",
  "capabilities": {
    "streaming": true,
    "pushNotifications": true,
    "stateTransitionHistory": true,
  },
  "defaultInputModes": [
    "text"
  ],
  "defaultOutputModes": [
    "text"
  ],
  "skills": [
    {
      "id": "hello_world",
      "name": "Returns hello world",
      "description": "just returns hello world",
      "tags": [
        "hello world"
      ],
      "examples": [
        "hi",
        "hello world"
      ],
    }
  ],
  "supportsExtendedAgentCard": true,
  "securitySchemes": {
    "google": {
      "openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration",
    }
  },
  "security": [
    {
      "google": [
        "openid",
        "profile",
        "email"
      ]
    }
  ],
  "supportedInterfaces": [
    {
      "protocolBinding": "JSONRPC",
      "url": "http://localhost:9999",
    },
    {
      "protocolBinding": "GRPC",
      "url": "http://localhost:9999",
    },
    {
      "protocolBinding": "HTTP+JSON",
      "url": "http://localhost:9999",
    }
  ],
  "protocolVersion": "1.0"
}

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions