{
  "version": 1,
  "structures": [
    {
      "name": "lead_qualification_response",
      "description": "Lead score, intent, and next action",
      "example": {
        "fit_score": 82,
        "intent": "ready_to_buy",
        "lead_category": "high_value",
        "next_action": "book a demo call"
      },
      "schema": {
        "type": "object",
        "properties": {
          "fit_score": {
            "type": "number"
          },
          "intent": {
            "type": "string",
            "enum": [
              "ready_to_buy",
              "researching",
              "not_interested",
              "unknown"
            ]
          },
          "lead_category": {
            "type": "string",
            "enum": [
              "high_value",
              "medium",
              "low"
            ]
          },
          "next_action": {
            "type": "string"
          }
        },
        "required": [
          "fit_score",
          "intent",
          "lead_category",
          "next_action"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "lead_follow_up_response",
      "description": "Personal follow-up email for the lead",
      "example": {
        "email_subject": "Re: your inquiry about ModelRiver",
        "email_body": "Hi Alex, thanks for reaching out - happy to answer your questions.",
        "send_follow_up": true
      },
      "schema": {
        "type": "object",
        "properties": {
          "email_subject": {
            "type": "string"
          },
          "email_body": {
            "type": "string"
          },
          "send_follow_up": {
            "type": "boolean"
          }
        },
        "required": [
          "email_subject",
          "email_body",
          "send_follow_up"
        ],
        "additionalProperties": false
      }
    }
  ],
  "workflows": [
    {
      "name": "lead_qualification_workflow",
      "description": "Scores the lead and starts the follow-up pipeline",
      "provider": "openai",
      "model": "gpt-5.6-terra",
      "backups": [
        {
          "provider": "anthropic",
          "model": "claude-haiku-4-5-20251001"
        }
      ],
      "request_type": "chat",
      "system_instructions": "Score the inbound lead from 0 to 100 based on fit and intent. Choose the lead category, identify what they want next, and flag the best next action for the sales team.",
      "structure": "lead_qualification_response",
      "customer_fields": [
        "lead_name",
        "lead_email",
        "company",
        "lead_message"
      ],
      "test_mode": false,
      "cache_window_seconds": 600,
      "backend_pipeline": {
        "enabled": true,
        "events": [
          {
            "name": "lead_captured"
          },
          {
            "name": "draft_follow_up",
            "target_workflow": "lead_follow_up_workflow"
          },
          {
            "name": "follow_up_queued"
          }
        ]
      }
    },
    {
      "name": "lead_follow_up_workflow",
      "description": "Drafts a personal follow-up email",
      "provider": "anthropic",
      "model": "claude-haiku-4-5-20251001",
      "backups": [
        {
          "provider": "openai",
          "model": "gpt-5.6-terra"
        }
      ],
      "request_type": "chat",
      "system_instructions": "Write a short, personal follow-up email for the lead based on their message and company. Keep it warm, specific, and easy to reply to.",
      "structure": "lead_follow_up_response",
      "customer_fields": [
        "lead_name",
        "lead_email",
        "company",
        "lead_message"
      ],
      "test_mode": false
    }
  ]
}
