Skip to main content

hackagent.utils

display_hackagent_splash

def display_hackagent_splash() -> None

Display the HackAgent splash screen using the pre-defined ASCII art.

resolve_agent_type

def resolve_agent_type(
agent_type_input: Union[AgentTypeEnum, str]) -> AgentTypeEnum

Resolve the agent type from a string or AgentTypeEnum member.

resolve_api_token

def resolve_api_token(direct_api_key_param: Optional[str] = None,
config_file_path: Optional[str] = None) -> Optional[str]

Resolve API token with standardized priority order.

Priority:

  1. direct api_key parameter
  2. HACKAGENT_API_KEY environment variable
  3. config file (~/.config/hackagent/config.json or specified path)
  4. None => local mode