# ============================================
# AGENTE PLANTILLA
# ============================================
# Referencia canonica de configuracion. NO se lanza (template: true).
# Copiar y adaptar para nuevos agentes. Solo incluye campos funcionales.

agent:
  id: "_template"
  name: "Template Agent"
  version: "0.0.0"
  enabled: true
  template: true               # el launcher ignora este agente
  description: "Agente plantilla. No se lanza."
  tags: [template]

# ============================================
# PERSONALIDAD Y COMPORTAMIENTO
# ============================================
personality:
  tone: friendly               # direct | friendly | formal | casual | technical
  verbosity: concise           # minimal | concise | detailed | verbose
  language: es
  languages_supported: [es, en]
  emoji_style: minimal         # none | minimal | moderate | heavy
  prefix: ""
  error_style: helpful         # terse | helpful | detailed

  # Identidad narrativa (opcional)
  role: ""
  backstory: ""
  expertise: []
  limitations: []

  # Comunicacion avanzada (opcional)
  communication:
    formality: semiformal      # formal | semiformal | casual | coloquial
    humor: none                # none | subtle | moderate | frequent
    personality: pragmatic     # analytical | creative | pragmatic | empathetic | assertive
    response_style: structured # structured | conversational | bullet_points | narrative
    quirks: []
    avoid_topics: []
    catchphrases: []

  custom_directives: []

  templates:
    greeting: "Hola, soy {name}. En que puedo ayudarte?"
    unknown_command: "No entiendo ese comando. Usa !help."
    permission_denied: "No tienes permiso para eso."
    error: "Algo salio mal: {{.Error}}"
    success: "{{.Summary}}"
    busy: "Estoy procesando otra solicitud, un momento..."

  behavior:
    proactive: false
    ask_confirmation: false
    show_reasoning: false
    thread_replies: true
    typing_indicator: true
    acknowledge_receipt: false

# ============================================
# LLM
# ============================================
llm:
  primary:
    provider: openai           # openai | anthropic | claude-code
    model: "gpt-4o"
    api_key_env: OPENAI_API_KEY
    base_url: ""
    max_tokens: 4096
    temperature: 0.7

    # Solo si provider: claude-code
    claude_code:
      binary: "claude"
      timeout: 3m
      disable_tools: false
      allowed_tools: []
      disallowed_tools: []
      working_dir: ""          # IMPORTANTE: configurar fuera del repo
      permission_mode: "default"
      model: "sonnet"
      fallback_model: ""
      session_id: ""
      add_dirs: []

  fallback:
    provider: ""
    model: ""
    api_key_env: ""

  reasoning:
    system_prompt_file: "prompts/system.md"
    context_window: 16384
    memory_messages: 30

  tool_use:
    enabled: false
    max_iterations: 5
    parallel_calls: false

  rate_limit:
    requests_per_minute: 60
    tokens_per_minute: 200000
    concurrent_requests: 5

# ============================================
# TOOLS
# ============================================
tools:
  ssh:
    enabled: false
    allowed_targets: []
    allowed_commands: []
    forbidden_commands: []
    timeout: 30s
    max_concurrent: 3
    require_confirmation: []

  http:
    enabled: false
    allowed_domains: []
    timeout: 10s
    max_retries: 2

  scripts:
    enabled: false
    scripts_dir: "./scripts"
    allowed: []
    timeout: 60s
    sandbox: false

  file_ops:
    enabled: false
    allowed_paths: []
    read_only: true

  matrix_send:
    allowed_rooms: []

  mcp:
    enabled: false
    servers: []
    expose:
      port: 0
      tools: []

  memory:
    enabled: false

  knowledge:
    enabled: false
    dir: "./knowledge"

  shared_knowledge:
    enabled: false
    dir: "knowledges"
    db_path: "knowledges/data/knowledge.db"

  skills:
    allowed_interpreters: ["bash", "sh"]

# ============================================
# SKILLS
# ============================================
skills:
  enabled: false
  path: "skills/"
  categories: []
  timeout: 60s

# ============================================
# MEMORIA
# ============================================
memory:
  enabled: false
  window_size: 20
  db_path: ""

# ============================================
# MATRIX
# ============================================
matrix:
  homeserver: "https://matrix.example.com"
  user_id: "@template:matrix.example.com"
  access_token_env: MATRIX_TOKEN_TEMPLATE
  device_id: "DEVICEID"

  encryption:
    enabled: false
    store_path: "./agents/_template/data/crypto/"
    pickle_key_env: PICKLE_KEY_TEMPLATE
    trust_mode: tofu
    recovery_key_env: ""

  rooms:
    listen: []
    respond: []
    admin: []

  filters:
    command_prefix: "!"
    mention_respond: true
    dm_respond: true
    ignore_bots: true
    ignore_users: []
    unauthorized_response: silent
    min_power_level: 0

  threads:
    enabled: true
    auto_thread: false

# ============================================
# SSH INVENTORY
# ============================================
ssh:
  defaults:
    user: "root"
    port: 22
    key_file_env: SSH_KEY_FILE
    known_hosts: "~/.ssh/known_hosts"
    keepalive_interval: 30s
    timeout: 60s
  targets: {}

# ============================================
# SEGURIDAD
# ============================================
security:
  audit:
    enabled: false
    log_file: ""
    log_to_room: ""
    include: []

  secrets:
    provider: env

  sanitize:
    enabled: false
    mode: warn
    min_severity: medium
    disabled_patterns: []

  tool_rate_limit:
    enabled: false
    max_calls_per_min: 10
    cleanup_interval_s: 60

# ============================================
# SCHEDULING
# ============================================
schedules: []

# ============================================
# STORAGE
# ============================================
storage:
  base_path: ""
