Prototypes

8 actions. Each is callable by the agent as a tool, over HTTP via /api/invoke, and (usually) from a UI page.

prototypes.list

GET

List website prototypes generated with v0.

  • AI tool: prototypes_list
  • API: GET /api/invoke/prototypes.list

Input

Field Type Required Description
subjectId string
limit integer
offset integer
orderBy string
orderDir "asc" | "desc"
q string
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "subjectId": {
      "type": "string",
      "minLength": 1
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "orderBy": {
      "type": "string"
    },
    "orderDir": {
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "q": {
      "type": "string"
    }
  }
}

prototypes.get

GET

Get one prototype with its mirrored v0 files.

  • AI tool: prototypes_get
  • API: GET /api/invoke/prototypes.get

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

prototypes.create

POST · mutating

Create a website prototype from a prompt via v0 (or labelled simulated mode if no v0 key is configured).

  • AI tool: prototypes_create
  • API: POST /api/invoke/prototypes.create

Input

Field Type Required Description
name string yes
prompt string yes
subjectId string
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "prompt": {
      "type": "string",
      "minLength": 1
    },
    "subjectId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "name",
    "prompt"
  ]
}

prototypes.iterate

POST · mutating

Refine a prototype by sending v0 a follow-up message; pulls the new version files back.

  • AI tool: prototypes_iterate
  • API: POST /api/invoke/prototypes.iterate

Input

Field Type Required Description
id string yes
message string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "message": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id",
    "message"
  ]
}

prototypes.save_files

POST · mutating

Persist locally-edited prototype files (no v0 call). Push to v0 with prototypes.push.

  • AI tool: prototypes_save_files
  • API: POST /api/invoke/prototypes.save_files

Input

Field Type Required Description
id string yes
files object[] yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "locked": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "content"
        ]
      }
    }
  },
  "required": [
    "id",
    "files"
  ]
}

prototypes.push

POST · mutating

Push locally-edited files back to v0. v0 has no per-file update, so this seeds a NEW v0 chat/version from the current files and relinks the prototype to it.

  • AI tool: prototypes_push
  • API: POST /api/invoke/prototypes.push

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

prototypes.deploy

POST · mutating

Deploy the latest prototype version to Vercel via v0. Returns the live URL.

  • AI tool: prototypes_deploy
  • API: POST /api/invoke/prototypes.deploy

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

prototypes.delete

POST · mutating

Soft-delete a prototype.

  • AI tool: prototypes_delete
  • API: POST /api/invoke/prototypes.delete

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}