openapi: 3.0.3 info: title: AgentWeb API description: > AgentWeb is an Internet Intelligence Platform. This spec covers the core outcome-first endpoints (/solve, /observe) and low-level primitives (/search, /crawl, /browser, /extract, /memory, /graph). See docs/api for prose documentation. version: "1.0.0" servers: - url: https://api.agentweb.dev/v1 security: - bearerAuth: [] paths: /health: get: summary: Check local API liveness operationId: health responses: '200': description: Service and local dependencies are healthy content: application/json: schema: $ref: '#/components/schemas/HealthResponse' '503': description: Service is degraded because a local dependency check failed content: application/json: schema: $ref: '#/components/schemas/HealthResponse' /report/{execution_id}/replay: get: summary: Project a historical execution trace for read-only replay inspection operationId: replayReport parameters: - name: execution_id in: path required: true schema: type: string responses: '200': description: Historical replay projection; no network or side effects are executed content: application/json: schema: $ref: '#/components/schemas/ReplayResponse' '404': $ref: '#/components/responses/BadRequest' /report/{execution_id}: get: summary: Retrieve a secret-safe execution trace operationId: getReport parameters: - name: execution_id in: path required: true schema: type: string responses: '200': description: Execution trace '404': $ref: '#/components/responses/BadRequest' /memory/{target}: get: summary: List immutable snapshots for a target operationId: getMemory parameters: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/Limit' - name: target in: path required: true schema: type: string responses: '200': description: Snapshot history /memory/{target}/diff: get: summary: Compare two snapshots for a target operationId: getMemoryDiff parameters: - name: target in: path required: true schema: type: string - name: from in: query required: true schema: type: string - name: to in: query required: true schema: type: string responses: '200': description: Snapshot diff '404': $ref: '#/components/responses/BadRequest' /plan: post: summary: Create an inspectable plan without executing it operationId: createPlan requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PlanRequest' responses: '200': description: Tenant-scoped expiring plan; task text is not returned content: application/json: schema: $ref: '#/components/schemas/PlanResponse' /execute: post: summary: Execute a previously approved plan operationId: executePlan parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ExecuteRequest' responses: '200': description: Grounded solve response produced from the approved plan content: application/json: schema: $ref: '#/components/schemas/SolveResponse' /solve: post: summary: Run a one-shot grounded research/synthesis task operationId: solve parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SolveRequest' responses: '200': description: Grounded, cited result content: application/json: schema: $ref: '#/components/schemas/SolveResponse' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/RateLimited' /observe: get: summary: List monitors for the authenticated organization operationId: listMonitors parameters: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/Limit' responses: '200': description: Cursor-paginated organization monitors post: summary: Create a recurring monitor operationId: observe parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ObserveRequest' responses: '200': description: Monitor created content: application/json: schema: $ref: '#/components/schemas/Monitor' /observe/{id}: get: summary: Get monitor status/history operationId: getMonitor parameters: - name: id in: path required: true schema: type: string responses: '200': description: Monitor status content: application/json: schema: $ref: '#/components/schemas/Monitor' delete: summary: Cancel a monitor operationId: cancelMonitor parameters: - name: id in: path required: true schema: type: string responses: '204': description: Monitor cancelled /search: post: summary: Low-level search primitive operationId: search requestBody: required: true content: application/json: schema: type: object required: [query] properties: query: type: string limit: type: integer default: 10 maximum: 50 freshness: type: string enum: [day, week, month, year, any] responses: '200': description: Provider-backed search results with local fallback /crawl: post: summary: Traverse same-origin pages with bounded breadth-first crawling operationId: crawl requestBody: required: true content: application/json: schema: type: object required: [start_url] properties: start_url: type: string format: uri max_pages: type: integer default: 50 maximum: 50 depth: type: integer default: 2 maximum: 10 url_pattern: type: string idempotency_key: type: string minLength: 1 maxLength: 128 responses: '200': description: Crawled pages, bounded metadata, durable crawl identifier, and truncation state content: application/json: schema: $ref: '#/components/schemas/CrawlResult' '400': $ref: '#/components/responses/BadRequest' get: summary: List crawl runs for the authenticated organization operationId: listCrawls parameters: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/Limit' responses: '200': description: Tenant-scoped crawl history content: application/json: schema: type: object required: [data, crawls, next_cursor, has_more] properties: data: type: array items: $ref: '#/components/schemas/CrawlRun' crawls: type: array items: $ref: '#/components/schemas/CrawlRun' next_cursor: type: string nullable: true has_more: type: boolean '403': $ref: '#/components/responses/Forbidden' /crawl/{crawlId}: get: summary: Retrieve one tenant-scoped crawl run and its bounded page metadata operationId: getCrawl parameters: - name: crawlId in: path required: true schema: type: string responses: '200': description: Crawl run and page metadata content: application/json: schema: allOf: - $ref: '#/components/schemas/CrawlRun' - type: object required: [pages, data] properties: pages: type: array items: $ref: '#/components/schemas/CrawlPage' data: type: array items: $ref: '#/components/schemas/CrawlPage' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /browser/sessions: post: summary: Render a page and execute bounded browser actions operationId: browserOpen requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BrowserRequest' responses: '200': description: Rendered browser session, including partial results on action failure content: application/json: schema: $ref: '#/components/schemas/BrowserSession' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '503': description: Browser runtime unavailable /graph/query: get: summary: Query the tenant knowledge graph operationId: queryGraph parameters: - name: entity_type in: query required: false schema: type: string maxLength: 200 - name: related_to in: query required: false schema: type: string maxLength: 200 - name: relation in: query required: false schema: type: string maxLength: 200 - name: depth in: query required: false description: Maximum traversal depth, bounded to three hops. schema: type: integer minimum: 1 maximum: 3 default: 1 - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Cursor' responses: '200': description: Matching graph nodes and corroboration-aware edges with cursor pagination content: application/json: schema: $ref: '#/components/schemas/GraphResponse' /graph/entities: post: summary: Upsert an organization-scoped graph entity operationId: upsertGraphEntity security: - bearerAuth: [graph:write] parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GraphEntityInput' responses: '201': description: Created or merged graph entity content: application/json: schema: $ref: '#/components/schemas/GraphEntity' /graph/relations: post: summary: Upsert an organization-scoped graph relation operationId: upsertGraphRelation security: - bearerAuth: [graph:write] parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GraphRelationInput' responses: '201': description: Created or corroborated graph relation content: application/json: schema: $ref: '#/components/schemas/GraphRelation' /learning/summary: get: summary: List strategy outcome summaries operationId: listLearningSummaries security: - bearerAuth: [learning:read] parameters: - $ref: '#/components/parameters/Limit' responses: '200': description: Tenant-scoped aggregate strategy outcomes content: application/json: schema: $ref: '#/components/schemas/LearningSummaryPage' /learning/outcomes: post: summary: Record redacted strategy outcome feedback operationId: recordLearningOutcome security: - bearerAuth: [learning:write] parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LearningOutcomeInput' responses: '201': description: Outcome recorded content: application/json: schema: $ref: '#/components/schemas/LearningOutcome' /workflows: get: summary: List event-driven workflow definitions operationId: listWorkflows security: - bearerAuth: [workflow:manage] parameters: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/Limit' responses: '200': description: Organization-scoped workflow definitions content: application/json: schema: $ref: '#/components/schemas/WorkflowPage' post: summary: Register a monitor event workflow operationId: createWorkflow security: - bearerAuth: [workflow:manage] parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WorkflowInput' responses: '201': description: Workflow definition created content: application/json: schema: $ref: '#/components/schemas/Workflow' /workflows/pause: post: summary: Pause a workflow definition operationId: pauseWorkflow security: - bearerAuth: [workflow:manage] parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WorkflowControlInput' responses: '200': description: Paused workflow definition content: application/json: schema: $ref: '#/components/schemas/Workflow' /workflows/resume: post: summary: Resume a workflow definition operationId: resumeWorkflow security: - bearerAuth: [workflow:manage] parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WorkflowControlInput' responses: '200': description: Resumed workflow definition content: application/json: schema: $ref: '#/components/schemas/Workflow' /workflows/runs: get: summary: List workflow execution runs operationId: listWorkflowRuns security: - bearerAuth: [workflow:manage] parameters: - $ref: '#/components/parameters/Limit' responses: '200': description: Organization-scoped workflow runs content: application/json: schema: $ref: '#/components/schemas/WorkflowRunPage' /admin/keys: get: summary: List redacted API keys for the authenticated organization operationId: listApiKeys parameters: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/Limit' responses: '200': description: Redacted organization API keys content: application/json: schema: type: object properties: keys: type: array items: $ref: '#/components/schemas/ApiKey' '403': $ref: '#/components/responses/Forbidden' post: summary: Create a scoped API key for the authenticated organization parameters: - $ref: '#/components/parameters/IdempotencyKey' operationId: createApiKey requestBody: required: true content: application/json: schema: type: object required: [scopes] properties: scopes: type: array items: type: string responses: '201': description: API key secret, returned only at creation time content: application/json: schema: $ref: '#/components/schemas/ApiKeyCreated' '403': $ref: '#/components/responses/Forbidden' /admin/keys/{id}: delete: summary: Revoke an API key owned by the authenticated organization operationId: revokeApiKey parameters: - $ref: '#/components/parameters/IdempotencyKey' - name: id in: path required: true schema: type: string responses: '204': description: API key revoked '404': $ref: '#/components/responses/BadRequest' /admin/browser-credentials: get: summary: List non-secret browser credential metadata for the organization operationId: listBrowserCredentials parameters: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/Limit' responses: '200': description: Browser credential metadata without secret values content: application/json: schema: $ref: '#/components/schemas/BrowserCredentialPage' post: summary: Create an encrypted browser credential for the organization operationId: createBrowserCredential parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BrowserCredentialCreate' responses: '201': description: Created credential metadata; the secret is never returned content: application/json: schema: $ref: '#/components/schemas/BrowserCredential' /admin/browser-credentials/{id}: delete: summary: Revoke an encrypted browser credential owned by the organization operationId: revokeBrowserCredential parameters: - $ref: '#/components/parameters/IdempotencyKey' - name: id in: path required: true schema: type: string responses: '204': description: Browser credential revoked '404': $ref: '#/components/responses/BadRequest' /admin/browser-session-states: get: summary: List non-secret browser session-state metadata for the organization operationId: listBrowserSessionStates parameters: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/Limit' responses: '200': description: Browser session-state metadata without cookies or storage tokens content: application/json: schema: $ref: '#/components/schemas/BrowserSessionStatePage' post: summary: Create encrypted browser storage state for an authorized origin operationId: createBrowserSessionState parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BrowserSessionStateCreate' responses: '201': description: Created session-state metadata; cookies and storage values are never returned content: application/json: schema: $ref: '#/components/schemas/BrowserSessionState' /admin/browser-session-states/{id}: delete: summary: Revoke encrypted browser session state owned by the organization operationId: revokeBrowserSessionState parameters: - $ref: '#/components/parameters/IdempotencyKey' - name: id in: path required: true schema: type: string responses: '204': description: Browser session state revoked '404': $ref: '#/components/responses/BadRequest' /admin/audit: get: summary: Read immutable security audit events for the organization operationId: listAuditEvents parameters: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/Limit' - name: action in: query required: false schema: type: string minLength: 1 maxLength: 200 - name: actor in: query required: false schema: type: string minLength: 1 maxLength: 200 - name: target in: query required: false schema: type: string minLength: 1 maxLength: 200 - name: since in: query required: false description: Inclusive Unix timestamp or ISO-8601 UTC timestamp. schema: type: string - name: until in: query required: false description: Inclusive Unix timestamp or ISO-8601 UTC timestamp. schema: type: string responses: '200': description: Organization audit events content: application/json: schema: $ref: '#/components/schemas/AuditEventPage' /admin/usage: get: summary: Read current-period usage and estimated cost for the organization operationId: getUsage parameters: - name: period in: query required: false schema: type: string pattern: '^\\d{4}-\\d{2}$' responses: '200': description: Usage summary content: application/json: schema: $ref: '#/components/schemas/UsageSummary' /admin/metrics: get: summary: Read organization-scoped operational metrics operationId: getMetrics responses: '200': description: Organization-filtered counters, observations, and gauges content: application/json: schema: type: object required: [counters, observations, gauges, captured_at] properties: counters: type: object observations: type: object gauges: type: object captured_at: type: number '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' /admin/data: delete: summary: Delete organization-owned runtime data operationId: deleteOrganizationData parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: false content: application/json: schema: type: object properties: kind: type: string enum: [snapshots, traces, crawls, session_states, graph, vectors, learning, workflows, all] default: snapshots target: type: string execution_id: type: string responses: '200': description: Deletion counts for the authenticated organization content: application/json: schema: type: object required: [org_id, kind, deleted_snapshots, deleted_traces, deleted_crawls, deleted_session_states, deleted_graph_entities, deleted_graph_relations, deleted_vectors, deleted_learning_outcomes, deleted_workflows, deleted_workflow_runs, deleted_workflow_jobs] properties: org_id: type: string kind: type: string deleted_snapshots: type: integer deleted_traces: type: integer deleted_crawls: type: integer deleted_session_states: type: integer deleted_graph_entities: type: integer deleted_graph_relations: type: integer deleted_vectors: type: integer deleted_learning_outcomes: type: integer deleted_workflows: type: integer deleted_workflow_runs: type: integer deleted_workflow_jobs: type: integer '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' /extract: post: summary: Structured extraction from a page operationId: extract requestBody: required: true content: application/json: schema: type: object required: [url] properties: url: type: string schema: type: object responses: '200': description: Extracted structured data with confidence metadata content: application/json: schema: $ref: '#/components/schemas/ExtractResponse' components: parameters: IdempotencyKey: name: Idempotency-Key in: header required: false schema: type: string minLength: 1 maxLength: 128 Cursor: name: cursor in: query required: false schema: type: string Limit: name: limit in: query required: false schema: type: integer minimum: 1 maximum: 100 default: 50 securitySchemes: bearerAuth: type: http scheme: bearer responses: BadRequest: description: Invalid request content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing/invalid API key content: application/json: schema: $ref: '#/components/schemas/Error' Forbidden: description: API key does not have the required scope content: application/json: schema: $ref: '#/components/schemas/Error' RateLimited: description: Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/Error' schemas: LearningOutcomeInput: type: object required: [strategy, success, evidence_score] properties: strategy: { type: string, minLength: 1, maxLength: 120 } mode: { type: string, enum: [flash, focus, dive, monitor] } success: { type: boolean } evidence_score: { type: number, minimum: 0, maximum: 1 } execution_id: { type: string } latency_ms: { type: integer, minimum: 0, maximum: 86400000 } LearningOutcome: type: object required: [id, strategy, mode, success, evidence_score, created_at] properties: id: { type: string } org_id: { type: string } strategy: { type: string } mode: { type: string } execution_id: { type: [string, 'null'] } success: { type: boolean } evidence_score: { type: number } latency_ms: { type: [integer, 'null'] } created_at: { type: number } LearningSummary: type: object required: [strategy, mode, observations, success_rate, average_evidence_score] properties: strategy: { type: string } mode: { type: string } observations: { type: integer } success_rate: { type: number } average_evidence_score: { type: number } average_latency_ms: { type: [number, 'null'] } last_observed_at: { type: number } LearningSummaryPage: type: object required: [strategies, data] properties: _meta: { $ref: '#/components/schemas/ResponseMetadata' } strategies: { type: array, items: { $ref: '#/components/schemas/LearningSummary' } } data: { type: array, items: { $ref: '#/components/schemas/LearningSummary' } } WorkflowInput: type: object required: [name, monitor_id, task_template] properties: name: type: string minLength: 1 maxLength: 120 monitor_id: type: string task_template: type: string minLength: 1 maxLength: 2000 description: Bounded format template. Supported values include {event}, {monitor_id}, {target}, {from_hash}, {to_hash}, {timestamp}, and {error}. event: type: string enum: [monitor.change_detected, monitor.no_change, monitor.check_failed] default: monitor.change_detected mode: type: string enum: [flash, focus, dive, monitor] default: focus WorkflowControlInput: type: object required: [workflow_id] properties: workflow_id: { type: string, minLength: 1, maxLength: 200 } Workflow: type: object required: [id, name, monitor_id, event, task_template, mode, status] properties: id: { type: string } org_id: { type: string } name: { type: string } monitor_id: { type: string } event: { type: string } task_template: { type: string } mode: { type: string } status: { type: string } created_at: { type: number } updated_at: { type: number } WorkflowRun: type: object required: [id, workflow_id, monitor_id, event, status, created_at] properties: id: { type: string } workflow_id: { type: string } org_id: { type: string } monitor_id: { type: string } event: { type: string } status: { type: string, enum: [running, succeeded, failed] } execution_id: { type: [string, 'null'] } error: { type: [string, 'null'] } created_at: { type: number } completed_at: { type: [number, 'null'] } WorkflowPage: type: object required: [workflows, data, has_more] properties: _meta: { $ref: '#/components/schemas/ResponseMetadata' } workflows: { type: array, items: { $ref: '#/components/schemas/Workflow' } } data: { type: array, items: { $ref: '#/components/schemas/Workflow' } } next_cursor: { type: [string, 'null'] } has_more: { type: boolean } WorkflowRunPage: type: object required: [runs, data] properties: _meta: { $ref: '#/components/schemas/ResponseMetadata' } runs: { type: array, items: { $ref: '#/components/schemas/WorkflowRun' } } data: { type: array, items: { $ref: '#/components/schemas/WorkflowRun' } } GraphEntityInput: type: object required: [type, name] properties: id: type: string pattern: '^ent_[A-Za-z0-9_-]+$' type: type: string minLength: 1 maxLength: 120 name: type: string minLength: 1 maxLength: 500 attributes: type: object confidence: type: number minimum: 0 maximum: 1 source_ids: type: array maxItems: 50 items: type: string minLength: 1 GraphRelationInput: type: object required: [from_id, to_id, relation] properties: from_id: type: string to_id: type: string relation: type: string minLength: 1 maxLength: 120 confidence: type: number minimum: 0 maximum: 1 source_ids: type: array maxItems: 50 items: type: string minLength: 1 GraphEntity: type: object required: [id, type, name, attributes, confidence, source_ids] properties: id: { type: string } org_id: { type: string } type: { type: string } name: { type: string } attributes: { type: object } confidence: { type: number, minimum: 0, maximum: 1 } source_ids: { type: array, items: { type: string } } created_at: { type: string, format: date-time } updated_at: { type: string, format: date-time } GraphRelation: type: object required: [id, from, to, relation, confidence, source_ids, observations] properties: id: { type: string } from: { type: string } to: { type: string } relation: { type: string } confidence: { type: number, minimum: 0, maximum: 1 } source_ids: { type: array, items: { type: string } } observations: { type: integer, minimum: 1 } created_at: { type: string, format: date-time } updated_at: { type: string, format: date-time } GraphResponse: type: object required: [nodes, edges] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' nodes: type: array items: $ref: '#/components/schemas/GraphEntity' edges: type: array items: $ref: '#/components/schemas/GraphRelation' ResponseMetadata: type: object description: Request-scoped metadata included in every successful JSON object response. required: [request_id, api_version, path, deprecated] properties: request_id: type: string api_version: type: string enum: [v1] path: type: string description: Canonical versioned route. deprecated: type: boolean description: True when the request used a bare compatibility path. HealthResponse: type: object required: [status, service, checks] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' status: type: string enum: [ok, degraded] service: type: string example: agentweb checks: type: object additionalProperties: type: string enum: [ok, failed, disabled] SolveMode: type: string enum: [flash, focus, dive, monitor] Mode: type: string enum: [flash, focus, dive, monitor] UsageSummary: type: object required: [period, requests_by_mode, estimated_cost] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' period: type: string requests_by_mode: type: object additionalProperties: type: integer estimated_cost: type: number ExtractResponse: type: object required: [url, status, text, links, tables, entities, source_spans, field_confidence, confidence, confidence_reasons] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' url: type: string status: type: integer title: type: string description: type: string text: type: string links: type: array items: type: string tables: type: array items: type: array items: type: array items: type: string entities: type: array items: type: string source_spans: type: array items: type: object required: [field, source, span, value] properties: field: type: string source: type: string span: type: array minItems: 2 maxItems: 2 items: type: integer value: type: string parse_warnings: type: array items: type: string field_confidence: type: object additionalProperties: type: number minimum: 0 maximum: 1 confidence_reasons: type: array items: type: string confidence: type: number minimum: 0 maximum: 1 data: type: object ApiKey: type: object properties: _meta: $ref: '#/components/schemas/ResponseMetadata' id: type: string org_id: type: string scopes: type: array items: type: string prefix: type: string created_at: type: number revoked_at: type: number nullable: true AuditEvent: type: object required: [id, org_id, actor, action, target, timestamp, metadata] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' id: type: string org_id: type: string actor: type: string action: type: string target: type: string timestamp: type: number metadata: type: object AuditEventPage: type: object required: [events, data, next_cursor, has_more] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' events: type: array items: $ref: '#/components/schemas/AuditEvent' data: type: array items: $ref: '#/components/schemas/AuditEvent' next_cursor: type: string nullable: true has_more: type: boolean ApiKeyCreated: allOf: - $ref: '#/components/schemas/ApiKey' - type: object required: [secret] properties: secret: type: string description: Plaintext secret returned only once at creation. BrowserCredential: type: object required: [id, org_id, label, username, created_at, revoked_at] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' id: type: string org_id: type: string label: type: string username: type: string created_at: type: number revoked_at: type: number nullable: true BrowserCredentialCreate: type: object required: [label, username, secret] additionalProperties: false properties: label: type: string minLength: 1 maxLength: 100 username: type: string minLength: 1 maxLength: 320 secret: type: string minLength: 1 maxLength: 10000 BrowserSessionState: type: object required: [id, org_id, label, origin, created_at, last_used_at, revoked_at] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' id: type: string org_id: type: string label: type: string origin: type: string format: uri created_at: type: number last_used_at: type: number nullable: true revoked_at: type: number nullable: true BrowserSessionStateCreate: type: object required: [label, origin, state] additionalProperties: false properties: label: type: string minLength: 1 maxLength: 100 origin: type: string format: uri description: Absolute HTTP(S) origin; credentials and paths are normalized or rejected. state: type: object description: Playwright-compatible storage state supplied by an authorized operator; encrypted at rest and never returned. additionalProperties: true BrowserSessionStatePage: type: object required: [session_states, data, next_cursor, has_more] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' session_states: type: array items: $ref: '#/components/schemas/BrowserSessionState' data: type: array items: $ref: '#/components/schemas/BrowserSessionState' next_cursor: type: string nullable: true has_more: type: boolean BrowserCredentialPage: type: object required: [credentials, data, next_cursor, has_more] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' credentials: type: array items: $ref: '#/components/schemas/BrowserCredential' data: type: array items: $ref: '#/components/schemas/BrowserCredential' next_cursor: type: string nullable: true has_more: type: boolean BrowserRequest: type: object required: [url] properties: url: type: string format: uri credential_id: type: string description: Opaque credential ID; resolved only for this tenant-scoped browser session. session_state_id: type: string description: Opaque origin-bound encrypted storage-state ID; cookies and storage values are resolved only for this tenant-scoped session. actions: type: array maxItems: 20 items: type: object required: [type] properties: type: type: string enum: [click, type, wait_for, scroll, extract, fill_credential] selector: type: string text: type: string field: type: string enum: [username, secret] attribute: type: string state: type: string enum: [attached, detached, visible, hidden] amount: type: integer BrowserSession: type: object required: [session_id, url, status, actions, extracted, title, text, html, warnings] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' session_id: type: string url: type: string status: type: string enum: [complete, partial] actions: type: array items: type: object extracted: type: array items: type: object title: type: string text: type: string html: type: string warnings: type: array items: type: string error: type: string nullable: true SolveRequest: type: object required: [task] properties: task: type: string mode: $ref: '#/components/schemas/SolveMode' skill: type: string inputs: type: object properties: actions: type: array maxItems: 20 items: type: object required: [type] properties: type: type: string enum: [click, type, wait_for, scroll, extract, fill_credential] selector: type: string text: type: string field: type: string enum: [username, secret] amount: type: integer timeout_ms: type: integer credential_id: type: string description: Opaque tenant-scoped browser credential ID; raw credentials are never accepted. session_state_id: type: string description: Opaque tenant- and origin-bound encrypted browser session-state ID. graph_query: type: object description: Optional bounded graph context used as grounded synthesis input. properties: entity_type: { type: string, maxLength: 200 } related_to: { type: string, maxLength: 200 } relation: { type: string, maxLength: 200 } depth: { type: integer, minimum: 1, maximum: 3, default: 1 } limit: { type: integer, minimum: 1, maximum: 100, default: 100 } graph_query: type: object description: Convenience top-level form of inputs.graph_query. properties: entity_type: { type: string, maxLength: 200 } related_to: { type: string, maxLength: 200 } relation: { type: string, maxLength: 200 } depth: { type: integer, minimum: 1, maximum: 3, default: 1 } limit: { type: integer, minimum: 1, maximum: 100, default: 100 } webhook_url: type: string idempotency_key: type: string output_format: type: string enum: [text, comparison, timeline, json] default: text PlanRequest: type: object required: [task] properties: task: type: string minLength: 1 maxLength: 2000 mode: $ref: '#/components/schemas/SolveMode' skill: type: string inputs: type: object description: Optional bounded browser actions and opaque credential/session-state references. ExecuteRequest: type: object required: [plan_id] properties: plan_id: type: string output_format: type: string enum: [text, comparison, timeline, json] idempotency_key: type: string PlanResponse: type: object required: [plan_id, plan, created_at, expires_at, reusable] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' plan_id: type: string plan: $ref: '#/components/schemas/PlanSummary' created_at: type: number expires_at: type: number reusable: type: boolean Source: type: object required: [id, url, title, snippet, trust_score, cited] properties: id: type: string url: type: string title: type: string snippet: type: string trust_score: type: number cited: type: boolean published_at: type: string format: date-time nullable: true content_type: type: string nullable: true extraction_confidence: type: number minimum: 0 maximum: 1 nullable: true structured_data: type: object nullable: true properties: tables: type: array items: type: array items: type: array items: type: string entities: type: array items: type: string Citation: type: object required: [claim_span, source_ids] properties: claim_span: type: array items: type: integer source_ids: type: array items: type: string ReplayNode: type: object required: [id, sequence, component, operation, status, duration_ms, input_summary, output_summary] properties: id: type: string sequence: type: integer minimum: 1 component: type: string operation: type: string status: type: string duration_ms: type: number minimum: 0 input_summary: type: string output_summary: type: string ReplayEdge: type: object required: [from, to] properties: from: type: string to: type: string ReplayResponse: type: object required: [execution_id, created_at, status, replayable, historical, network_reexecuted, side_effects, nodes, edges] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' execution_id: type: string created_at: type: number status: type: string replayable: type: boolean historical: type: boolean network_reexecuted: type: boolean enum: [false] side_effects: type: boolean enum: [false] nodes: type: array items: $ref: '#/components/schemas/ReplayNode' edges: type: array items: $ref: '#/components/schemas/ReplayEdge' PlanSummary: type: object required: [id, intent, estimated_mode, steps, routed_tools] properties: id: type: string intent: type: string enum: [lookup, comparison, monitoring, longitudinal] estimated_mode: $ref: '#/components/schemas/SolveMode' skill: type: string nullable: true steps: type: array items: type: object required: [type] properties: type: type: string routed_tools: type: array items: type: string SelectionLogic: type: object required: [source_strategy, memory_reuse_window_seconds, ranker, source_limit] properties: source_strategy: type: string memory_reuse_window_seconds: type: integer minimum: 0 ranker: type: string source_limit: type: integer minimum: 1 ExecutionAction: type: object required: [tool, operation, status] properties: tool: type: string operation: type: string status: type: string call_count: type: integer result_count: type: integer candidate_count: type: integer included_count: type: integer source_id: type: string nullable: true selected_source_ids: type: array items: type: string citation_count: type: integer evidence_score: type: number minimum: 0 maximum: 1 SolveResponse: type: object required: [execution_id, mode, answer, sources, citations, created_at, insufficient_evidence, output_format, evidence_score, conflicts, structured_output] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' plan: $ref: '#/components/schemas/PlanSummary' selection_logic: $ref: '#/components/schemas/SelectionLogic' actions: type: array items: $ref: '#/components/schemas/ExecutionAction' execution_id: type: string mode: $ref: '#/components/schemas/SolveMode' answer: type: string sources: type: array items: $ref: '#/components/schemas/Source' insufficient_evidence: type: boolean citations: type: array items: $ref: '#/components/schemas/Citation' created_at: type: string format: date-time output_format: type: string enum: [text, comparison, timeline, json] evidence_score: type: number minimum: 0 maximum: 1 conflicts: type: array items: type: object structured_output: type: object ObserveRequest: type: object required: [task] properties: task: type: string webhook_url: type: string frequency: type: string enum: [minutely, hourly, daily] idempotency_key: type: string minLength: 1 maxLength: 128 change_policy: $ref: '#/components/schemas/ChangePolicy' CrawlPage: type: object required: [id, crawl_id, org_id, url, status, extracted, depth, parse_warnings] properties: id: type: integer crawl_id: type: string org_id: type: string url: type: string status: type: integer extracted: type: boolean depth: type: integer error: type: string nullable: true content_hash: type: string nullable: true content_type: type: string nullable: true title: type: string nullable: true parse_warnings: type: array items: type: string CrawlRun: type: object required: [id, org_id, start_url, max_pages, depth, status, pages_crawled, truncated, created_at] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' id: type: string org_id: type: string start_url: type: string max_pages: type: integer depth: type: integer url_pattern: type: string nullable: true status: type: string enum: [running, completed, failed, rate_limited] pages_crawled: type: integer truncated: type: boolean created_at: type: string format: date-time completed_at: type: string format: date-time nullable: true CrawlResult: type: object required: [crawl_id, pages, pages_crawled, truncated] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' crawl_id: type: string pages: type: array items: $ref: '#/components/schemas/CrawlPage' pages_crawled: type: integer truncated: type: boolean ChangePolicy: type: object description: Deterministic monitor comparison policy. For structured_field, field_path and expected_type select one bounded parsed projection value; numeric thresholds are valid only for expected_type price, and required_state is valid only for availability. additionalProperties: false properties: kind: type: string enum: [full_content, price, availability, structured_field] field_path: type: string description: Bounded dotted object/list path used when kind is structured_field, such as tables.0.1.1 or data.price; this is not arbitrary JSONPath. pattern: '^[A-Za-z_][A-Za-z0-9_-]*(?:\\.(?:[A-Za-z_][A-Za-z0-9_-]*|[0-9]+))*(?:\\.[0-9]+)?$' expected_type: type: string enum: [string, entity, price, date] description: Normalization type for a structured field. Use string, entity, price, or date; defaults to string. default: string absolute_delta: type: number minimum: 0 description: Minimum numeric absolute price delta for a structured price field; invalid for other expected types. relative_delta_percent: type: number minimum: 0 maximum: 10000 description: Minimum relative price delta percentage for a structured price field; invalid for other expected types. required_state: type: string description: Availability target state; invalid for structured_field. enum: [in stock, out of stock, available, unavailable, sold out] ignore_whitespace: type: boolean Monitor: type: object required: [id, org_id, task, status, frequency, last_delivery_attempts] properties: _meta: $ref: '#/components/schemas/ResponseMetadata' id: type: string org_id: type: string task: type: string frequency: type: string enum: [minutely, hourly, daily] status: type: string enum: [active, paused, cancelled] target_url: type: string nullable: true webhook_url: type: string nullable: true change_policy: allOf: - $ref: '#/components/schemas/ChangePolicy' nullable: true last_checked_at: type: string format: date-time nullable: true last_change_at: type: string format: date-time nullable: true last_delivery_id: type: string nullable: true last_delivery_status: type: string nullable: true enum: [pending, retrying, rate_limited, delivered, dead_letter, blocked] last_delivery_attempts: type: integer minimum: 0 maximum: 5 last_delivery_error: type: string nullable: true WebhookDelivery: type: object properties: _meta: $ref: '#/components/schemas/ResponseMetadata' job_id: type: string job_type: type: string enum: [webhook_delivery] monitor_id: type: string status: type: string enum: [pending, retrying, rate_limited, delivered, dead_letter] attempts: type: integer minimum: 0 maximum: 5 last_status_code: type: integer nullable: true last_error: type: string nullable: true Error: type: object properties: error: type: object properties: type: type: string message: type: string request_id: type: string