{
  "openapi": "3.1.0",
  "info": {
    "title": "Leo Sarzi Braga's agent",
    "version": "1.0.0",
    "description": "REST twin of the MCP server at https://www.sarzi.co/mcp. Facts only. Rate limited. leave_message stores an unverified intro and sends nothing."
  },
  "servers": [
    {
      "url": "https://www.sarzi.co"
    }
  ],
  "paths": {
    "/api/agent/profile": {
      "get": {
        "operationId": "get_profile",
        "summary": "Who Leo is: summary, education, languages, base, contact, links.",
        "responses": {
          "200": {
            "description": "profile"
          }
        }
      }
    },
    "/api/agent/projects": {
      "get": {
        "operationId": "list_projects",
        "summary": "Every project with role, dates and headline number.",
        "responses": {
          "200": {
            "description": "projects"
          }
        }
      }
    },
    "/api/agent/projects/{name}": {
      "get": {
        "operationId": "get_project",
        "summary": "Facts for one project (prind, crescence, mumbly, leos, duly, wearable).",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "project"
          },
          "404": {
            "description": "unknown"
          }
        }
      }
    },
    "/api/agent/ask": {
      "post": {
        "operationId": "ask_leos_agent",
        "summary": "Ask Leo's agent a question; answers only from facts on sarzi.co, in Leo's voice.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "question"
                ],
                "properties": {
                  "question": {
                    "type": "string",
                    "maxLength": 600
                  },
                  "history": {
                    "type": "array",
                    "maxItems": 6,
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "enum": [
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{answer}"
          },
          "429": {
            "description": "rate limited"
          }
        }
      }
    },
    "/api/agent/message": {
      "post": {
        "operationId": "leave_message",
        "summary": "Leave an unverified intro for Leo; nothing is sent automatically.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "note"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 1500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "stored, unverified"
          },
          "400": {
            "description": "invalid"
          }
        }
      }
    }
  }
}
