agentCardJson method

String agentCardJson()

Serves the Agent Card at /.well-known/agent.json.

Implementation

String agentCardJson() => jsonEncode({
  'name': agentName,
  'description': agentDescription,
  'url': '',
  'version': '1.0.0',
  'capabilities': {
    'inputModes': ['text'],
    'outputModes': ['text'],
    'streaming': false,
  },
  'skills': [
    for (final s in skills)
      {'id': s.id, 'name': s.name, 'description': s.description},
  ],
  if (token != null)
    'authentication': {
      'schemes': ['bearer'],
    },
});