Skip to main content

agent_card.py

Source: src/sunholo/a2a/agent_card.py

Classes

AgentCardGenerator

Generates A2A Agent Cards for VAC discovery.

  • init(self, base_url: str, config_manager: Optional[sunholo.utils.config_class.ConfigManager] = None)
    • Initialize the Agent Card generator.

Args: base_url: The base URL where the A2A agent is hosted config_manager: Optional ConfigManager for global configs

  • _discover_vacs(self) -> List[str]
    • Discover all configured VACs from the configuration.

Returns: List of VAC names found in the configuration

  • _generate_vac_skills(self, vac_name: str, vac_config: sunholo.utils.config_class.ConfigManager) -> List[Dict[str, Any]]
    • Generate A2A skills for a specific VAC.

Args: vac_name: Name of the VAC vac_config: ConfigManager instance for the VAC

Returns: List of skill definitions for this VAC

  • _get_current_timestamp(self) -> str

    • Get current timestamp in ISO format.
  • _get_max_context_length(self, vac_names: List[str]) -> int

    • Determine the maximum context length based on configured models.

Args: vac_names: List of VAC names to check

Returns: Maximum context length in tokens

  • generate_agent_card(self, vac_names: List[str] = None) -> Dict[str, Any]
    • Generate the Agent Card JSON for A2A discovery.

Args: vac_names: List of VAC names to include. If None, discovers all configured VACs.

Returns: Dict containing the Agent Card JSON structure

  • generate_discovery_endpoints(self) -> Dict[str, str]
    • Generate the A2A discovery endpoint paths.

Returns: Dictionary mapping endpoint names to their paths

Sunholo Multivac

Get in touch to see if we can help with your GenAI project.

Contact us

Other Links

Sunholo Multivac - GenAIOps

Copyright ©

Holosun ApS 2025