{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agoragentic.com/schema/finance-agent-policy.v1.json",
  "title": "Finance Agent Policy V1",
  "type": "object",
  "required": ["version", "default_mode", "connectors"],
  "properties": {
    "version": { "type": "string" },
    "default_mode": {
      "type": "string",
      "enum": [
        "research_only",
        "research_plus_order_review",
        "research_plus_approved_trading",
        "research_plus_approved_trading_and_approved_card"
      ]
    },
    "connectors": {
      "type": "object",
      "required": ["robinhood_trading", "robinhood_banking", "financial_research"],
      "properties": {
        "robinhood_trading": {
          "type": "object",
          "required": ["enabled", "mcp_server_name", "endpoint", "risk_level", "rules"],
          "properties": {
            "enabled": { "type": "boolean" },
            "mcp_server_name": { "const": "robinhood-trading" },
            "endpoint": { "const": "https://agent.robinhood.com/mcp/trading" },
            "risk_level": { "const": "high" },
            "allowed_tools": { "type": "array", "items": { "type": "string" } },
            "rules": {
              "type": "object",
              "required": ["long_only", "require_review_before_place", "manual_approval_required_for_place_order"],
              "properties": {
                "long_only": { "type": "boolean" },
                "require_review_before_place": { "type": "boolean" },
                "manual_approval_required_for_place_order": { "type": "boolean" },
                "manual_approval_required_for_cancel_order": { "type": "boolean" },
                "max_single_order_notional_usd": { "type": "number", "minimum": 0 },
                "max_daily_order_notional_usd": { "type": "number", "minimum": 0 },
                "max_open_orders": { "type": "integer", "minimum": 0 },
                "symbol_allowlist": { "type": "array", "items": { "type": "string" } },
                "symbol_blocklist": { "type": "array", "items": { "type": "string" } },
                "blocked_order_intents": { "type": "array", "items": { "type": "string" } }
              },
              "additionalProperties": true
            }
          },
          "additionalProperties": true
        },
        "robinhood_banking": {
          "type": "object",
          "required": ["enabled", "mcp_server_name", "endpoint", "risk_level", "rules"],
          "properties": {
            "enabled": { "type": "boolean" },
            "mcp_server_name": { "const": "robinhood-banking" },
            "endpoint": { "const": "https://banking-agent.robinhood.com/mcp/banking" },
            "risk_level": { "const": "high" },
            "allowed_operations": { "type": "array", "items": { "type": "string" } },
            "rules": {
              "type": "object",
              "required": ["require_checkout_context", "manual_approval_required_for_purchase"],
              "properties": {
                "require_checkout_context": { "type": "boolean" },
                "manual_approval_required_for_purchase": { "type": "boolean" },
                "purchase_approval_mode": {
                  "type": "string",
                  "enum": ["manual_approval", "monthly_limit_auto_approval"]
                },
                "monthly_limit_required_if_auto_approval_enabled": { "type": "boolean" },
                "max_single_purchase_usd": { "type": "number", "minimum": 0 },
                "max_monthly_purchase_usd": { "type": "number", "minimum": 0 },
                "merchant_domain_allowlist": { "type": "array", "items": { "type": "string" } },
                "merchant_domain_blocklist": { "type": "array", "items": { "type": "string" } },
                "persist_payment_details": { "const": false }
              },
              "additionalProperties": true
            }
          },
          "additionalProperties": true
        },
        "financial_research": {
          "type": "object",
          "required": ["enabled", "risk_level", "rules"],
          "properties": {
            "enabled": { "type": "boolean" },
            "risk_level": { "enum": ["low", "medium", "high"] },
            "rules": {
              "type": "object",
              "properties": {
                "require_citations": { "type": "boolean" },
                "require_non_advice_disclaimer": { "type": "boolean" },
                "candidate_actions_cannot_execute_directly": { "type": "boolean" },
                "max_job_budget_usdc": { "type": "number", "minimum": 0 }
              },
              "additionalProperties": true
            }
          },
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}
