{
  "version": 1,
  "structures": [
    {
      "name": "faq_answer_response",
      "description": "Answer and confidence for the customer question",
      "example": {
        "answer": "You can reset your password from the login page.",
        "confidence": 0.92,
        "topic": "account",
        "needs_human": false
      },
      "schema": {
        "type": "object",
        "properties": {
          "answer": {
            "type": "string"
          },
          "confidence": {
            "type": "number"
          },
          "topic": {
            "type": "string"
          },
          "needs_human": {
            "type": "boolean"
          }
        },
        "required": [
          "answer",
          "confidence",
          "topic",
          "needs_human"
        ],
        "additionalProperties": false
      }
    }
  ],
  "workflows": [
    {
      "name": "faq_knowledge_workflow",
      "description": "Answers questions from the knowledge base",
      "provider": "xai",
      "model": "grok-4.5",
      "backups": [
        {
          "provider": "anthropic",
          "model": "claude-haiku-4-5-20251001"
        }
      ],
      "request_type": "chat",
      "system_instructions": "Answer the customer question using the knowledge base in the system instructions. Give a clear, friendly answer, rate your confidence, and flag questions that need a human agent. Never invent policies.",
      "structure": "faq_answer_response",
      "customer_fields": [
        "customer_name",
        "question"
      ],
      "test_mode": false,
      "cache_window_seconds": 1800,
      "backend_pipeline": {
        "enabled": true,
        "events": [
          {
            "name": "question_received"
          },
          {
            "name": "answer_ready"
          }
        ]
      }
    }
  ]
}
