# Solace AI Connector Example: A2A ADK Agent Host Configuration
#
# This file demonstrates how to configure an A2A ADK Agent Host application.
# It uses the custom A2A_ADK_App class defined in src.solace_agent_mesh.agent.sac.app.
#
# Required Environment Variables:
# - NAMESPACE: The A2A topic namespace (e.g., "myorg/dev").
# - SOLACE_BROKER_URL: URL of the Solace broker (e.g., "ws://localhost:8080").
# - SOLACE_BROKER_USERNAME: Username for the Solace broker.
# - SOLACE_BROKER_PASSWORD: Password for the Solace broker.
# - SOLACE_BROKER_VPN: VPN name for the Solace broker.
# - ARTIFACT_BASE_PATH: Base path for the filesystem artifact service (e.g., "/mnt/shared_artifacts" or "/tmp/a2a_artifacts").
# - OPENAI_API_KEY: Your OpenAI API key (if using OpenAI model).

log:
  stdout_log_level: INFO
  log_file_level: DEBUG
  log_file: agent_host.log

# Shared SAM config
!include shared_config.yaml

apps:
  - name: my_adk_agent_host_app # Name for this specific SAC application instance
    app_base_path: . # Assuming running from project root where src/ is located
    app_module: src.solace_agent_mesh.agent.sac.app # Use the custom App class

    broker:
      <<: *broker_connection
      # Queue name and subscriptions are automatically generated by A2A_ADK_App

    # App Level Config - Validated by A2A_ADK_App.app_schema
    app_config:
      # --- A2A Config ---
      namespace: ${NAMESPACE, myorg/dev} 
      supports_streaming: true

      # --- Core ADK Agent Definition ---
      agent_name: "CustomLLMAgent" # Must match default_agent_name in gateway if used
      display_name: "Custom LLM"
      model: *planning_model # Use the planning model for this agent

      instruction: |
        You are a helpful AI assistant.
        Be concise and helpful.
        You have access to file management tools.

      # global_instruction: "Always respond in a friendly tone."

      tools:
        - tool_type: builtin-group
          group_name: "artifact_management"
        # - tool_type: builtin-group
        #   group_name: "data_analysis" # Data tools are disabled by default, enable if needed.

      # data_tools_config:
      #   sqlite_memory_threshold_mb: 50

      # --- ADK Services Configuration ---
      session_service:
        type: "memory"
        default_behavior: "PERSISTENT" # Or "RUN_BASED"
      artifact_service:
        type: "filesystem"
        base_path: ${ARTIFACT_BASE_PATH, /tmp/a2a_agent_artifacts} 
        artifact_scope: "namespace" # Match gateway scope for sharing
      memory_service:
        type: "memory"

      # --- Artifact Handling ---
      artifact_handling_mode: "reference" # 'embed', 'reference', or 'ignore'

      # --- Embed Resolution & Instruction Injection ---
      enable_embed_resolution: true
      enable_artifact_content_instruction: true

      # --- Agent Card Definition ---
      agent_card:
        description: "A custom LLM agent hosted by Solace AI Connector, capable of file operations."
        defaultInputModes: ["text", "file"]
        defaultOutputModes: ["text", "file", "data"]
        skills:
          - id: "general_conversation"
            name: "General Conversation"
            description: "Can engage in general conversation and answer questions."
          - id: "file_management"
            name: "File Management"
            description: "Can create, list, and load files in its workspace."
        provider:
          organization: "Solace Examples"

      # --- Agent Discovery & Communication ---
      agent_card_publishing:
        interval_seconds: 60
      agent_discovery:
        enabled: true
      inter_agent_communication:
        allow_list: ["*"] # Allow delegation to any discovered agent
        # deny_list: ["some_specific_agent_to_block"]
        request_timeout_seconds: 45
