Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.wellapp.ai/llms.txt

Use this file to discover all available pages before exploring further.

BlueprintStep records a single atomic action taken by the Blueprint Analyzer AI agent during a web-navigation run. Each step belongs to exactly one BlueprintRun (cascade-deleted with it) and is sequenced by a monotonically increasing step_number. Steps capture the agent’s reasoning, the page URL at the time of execution, the action it chose (e.g. click, type, scroll), structured action parameters, the raw LLM response, screenshot storage references, and an outcome flag — forming the complete execution trace for a run. The table is written exclusively by the blueprint-analyzer.service.ts pipeline; no user-facing PATCH endpoint exists.
NamingValue
ObjectBlueprintStep
Resource type (JSON:API type)blueprint_step
Collection / records root(not a records root)
REST base/v1/blueprint-steps
Entity classBlueprintStep
Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.

API operations

OperationMethod & pathStatus
ListGET /v1/blueprint-steps🟡 Planned
RetrieveGET /v1/blueprint-steps/{id}🟡 Planned
CreatePOST /v1/blueprint-steps🟡 Planned
UpdatePATCH /v1/blueprint-steps/{id}🟡 Planned
DeleteDELETE /v1/blueprint-steps/{id}🟡 Planned

Data model

Attributes

FieldTypeRequiredConstraintsAllowed valuesDescription
blueprint_step_idstring (UUID) 🔒 system✅ Yesunique; generated by gen_random_uuid() at INSERTAny valid UUID v4Public-facing stable identifier for the step. Exposed as the JSON:API id. Never reused.
step_numberinteger✅ Yescomposite UNIQUE (blueprint_run_pk, step_number); composite partial index idx_blueprint_steps_run_step on (blueprint_run_pk, step_number) WHERE deleted_at IS NULLPositive integer; 1-based sequence assigned by the analyzer service1-based ordinal position of this step within its parent run. Uniqueness is enforced at the DB level per run (soft-delete-aware index).
action_typestring (text)✅ YesNOT NULLFree-form string set by the analyzer (e.g. ‘click’, ‘type’, ‘scroll’, ‘navigate’, ‘extract’, ‘wait’)Identifies the category of browser action the agent decided to execute at this step.
reasoningstring (text)⚪ NonullableFree-text chain-of-thought produced by the LLM before committing to this action. Populated when the model includes a reasoning block in its response.
page_urlstring (text)✅ YesNOT NULLFull URL of the page at the time the step was executedCaptures the browser’s current URL when the step fired, enabling replay and debugging.
screenshot_pathstring (text)⚪ NonullableGCS object path relative to the bucket, or null if no screenshot was capturedPath of the screenshot image stored in GCS at the time of this step. Paired with screenshot_bucket to form the full storage reference.
screenshot_bucketstring (text)⚪ NonullableGCS bucket name, or nullGCS bucket that holds the screenshot referenced by screenshot_path. Null when no screenshot was taken for this step.
action_detailsjsonb⚪ NonullableArbitrary JSON object; shape depends on action_type (e.g. selector, coordinates, input text, scroll delta)Structured parameters needed to replay or audit the exact action that was executed (e.g. CSS selector, click coordinates, text typed).
ai_responsejsonb⚪ NonullableArbitrary JSON; typically the raw Anthropic API response objectFull LLM response payload recorded for observability — includes model ID, stop_reason, token usage, and tool calls. Enables cost analysis and debugging.
dom_summary_lengthinteger⚪ NonullableNon-negative integer representing character count of the DOM summary sent to the LLMCharacter length of the DOM summary fed to the model for this step. Useful for prompt-size analytics and detecting pages with unusually large DOMs.
action_successboolean⚪ Nonullabletrue | false | nullWhether the browser action completed without error. Null means the outcome was not recorded (e.g. the step was interrupted). false indicates the browser threw an exception, detailed in action_error.
action_errorstring (text)⚪ NonullableError message string, or nullHuman-readable error message when action_success is false. Captures Playwright/browser errors (selector not found, navigation timeout, etc.).
created_attimestamptz 🔒 system✅ YesNOT NULL; set by onCreate hook to new Date()Timestamp when the row was inserted. Set automatically at creation; never updated.
updated_attimestamptz 🔒 system⚪ Nonullable; set by onCreate and onUpdate hooksTimestamp of the last mutation. Set automatically at creation and on every update by MikroORM lifecycle hooks.
deleted_attimestamptz 🔒 system⚪ Nonullablenull (active) | ISO 8601 timestamp (soft-deleted)Soft-delete sentinel. Non-null means the row is logically deleted. The partial index idx_blueprint_steps_run_step covers only rows WHERE deleted_at IS NULL.

Relationships

NameTypeRequiredDescription
blueprint_runto-one (ManyToOne)Yes — NOT NULL FK with ON DELETE CASCADEThe parent BlueprintRun that owns this step. Deleting the run cascades and hard-deletes all its steps. This is the only relationship declared on BlueprintStep itself; the inverse collection (steps) is declared on BlueprintRun.

System-computed

  • blueprint_step_id — generated by gen_random_uuid() at INSERT, never caller-supplied
  • created_at — set to new Date() by MikroORM onCreate hook
  • updated_at — set to new Date() by both onCreate and onUpdate hooks
  • deleted_at — soft-delete sentinel; written by the service layer when soft-deleting a step or its parent run
  • step_number — assigned by blueprint-analyzer.service.ts before INSERT; not derived from a DB sequence but from the service’s step counter
  • Cascade delete — when the parent BlueprintRun is deleted (hard or via cascade), all BlueprintStep rows are hard-deleted by the DB foreign-key constraint (ON DELETE CASCADE)

Example

{
  "data": {
    "id": "7e4c1a2b-d3f0-4e8a-b5c6-9d0e1f2a3b4c",
    "type": "blueprint_step",
    "attributes": {
      "blueprint_step_id": "7e4c1a2b-d3f0-4e8a-b5c6-9d0e1f2a3b4c",
      "step_number": 3,
      "action_type": "click",
      "reasoning": "The login button is visible and I need to authenticate before accessing the invoices page.",
      "page_url": "https://app.example.com/login",
      "screenshot_path": "blueprint-runs/run_abc123/step_003.png",
      "screenshot_bucket": "well-blueprints-prod",
      "action_details": {
        "selector": "#login-submit-btn",
        "coordinates": { "x": 640, "y": 420 }
      },
      "ai_response": {
        "model": "claude-opus-4-6",
        "stop_reason": "tool_use",
        "usage": { "input_tokens": 4120, "output_tokens": 87 }
      },
      "dom_summary_length": 8432,
      "action_success": true,
      "action_error": null,
      "created_at": "2026-02-24T14:23:01.000Z",
      "updated_at": "2026-02-24T14:23:02.000Z",
      "deleted_at": null
    },
    "relationships": {
      "blueprint_run": {
        "data": { "type": "blueprint_run", "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }
      }
    }
  }
}
Source: apps/api/src/database/entities/BlueprintStep.ts · domain: automation · tier: Activity