The Python package currently contains a stub module only. Use the TypeScript SDK for the full public SDK surface. Python users should call the REST API directly until the Python SDK graduates from stub status.
Constructor
Web exposes browser lifecycle helpers, deterministic quick actions, health checks, and web.agent().
WebcomputeConfig
Errors
All SDK HTTP errors extendWebcomputeError.
WebcomputeError fields:
Exported error classes:
Warnings
Gateway responses may include structured warnings. The SDK exposes them in response fields where the response type includeswarnings, and can centralize handling through onWarning.
parseWarning when you need to normalize unknown warning payloads, and redactValueForObservability before logging data that may contain credentials, tokens, cookies, proxy URLs, signed URLs, or local file paths.
MCP prompt helper
mcpPrompt returns SDK-owned guidance for parent agents that connect to the
self-hosted Webcompute MCP server.
mcpPrompt() equals mcpPrompt("runtime"). Agent-mode examples should call
mcpPrompt("agent") explicitly.
WebcomputeMcpPromptOptions supports:
Export inventory
This inventory is generated frompackages/sdk-typescript/src/index.ts and grouped by reader task.
Client and config
Web, WebcomputeConfig, RetryConfig, DEFAULT_RETRY_CONFIG, ErrorResponseBody.
Agent exports
WebAgent, WebAgentApprovalMode, WebAgentApprovalRisk, WebAgentArtifact, WebAgentArtifactOptions, WebAgentBrowserConfig, WebAgentCaptchaResolutionOptions, WebAgentCaptchaResolutionSummary, WebAgentCaptureOptions, WebAgentCodePolicy, WebAgentConfig, WebAgentConfirmationDecision, WebAgentConfirmationHandler, WebAgentConfirmationRequest, WebAgentEnvironment, WebAgentError, WebAgentJsonSchemaObject, WebAgentModelAccessFlags, WebAgentModelConfig, WebAgentModelProfile, WebAgentModelProfileConfig, WebAgentModelRoute, WebAgentRawJsonSchema, WebAgentResult, WebAgentRoute, WebAgentRunInput, WebAgentSchema, WebAgentSchemaIssue, WebAgentSchemaMetadata, WebAgentSchemaValidationResult, WebAgentSession, WebAgentStandardSchema, WebAgentStep, WebAgentStreamEvent, WebAgentTranscriptItem, WebAgentToolCall, WebAgentToolCompletionSummary, WebAgentToolProgressReturnedSummary, WebAgentToolProgressSummary, WebAgentToolResult, WebAgentToolResultSummary, WebAgentToolResultSummaryItem, WebAgentUsage, WebAgentVariable, WebAgentVariables, WebAgentZodLikeSchema.
Agent helper exports:
inferWebAgentModelRoute, mcpPrompt, normalizeOutputSchema, normalizeWebAgentModelProfile, parseWebAgentModelRoute, resolveWebAgentModelAccess, WEB_AGENT_APPROVAL_RISK_VALUES, webAgentModelConfigForAccess, webAgentModelSetupMessage.
Model-profile helpers work with profile-shaped config supplied by application code. They do not load CLI model profiles automatically; see SDK agent reference for explicit agent model config.
Model profile exports
NormalizedWebAgentModelProfile, ResolvedWebAgentModelAccess, ResolveWebAgentModelAccessOptions.
MCP prompt exports
WEBCOMPUTE_MCP_PROMPTS, WebcomputeMcpPromptDefinition, WebcomputeMcpPromptOptions, WebcomputeMcpPromptSurface.
Browser and runtime exports
Browser, BrowserId, BrowserArtifactListOptions, BrowserCaptcha, BrowserCaptchaResolveOptions, BrowserCreateOptions, BrowserDialogs, BrowserDownloadSaveOptions, BrowserDownloadSaveResult, BrowserDownloads, BrowserEvent, BrowserEventCategory, BrowserEventSeverity, BrowserEventStreamOptions, BrowserEventsOptions, BrowserEventType, BrowserEventVisibility, BrowserFiles, BrowserLifecycleMeta, BrowserLifecycleResponse, BrowserListOptions, BrowserListResponse, BrowserNavigationPolicy, BrowserPageSummary, BrowserPermissions, BrowserPlaywright, BrowserPlaywrightActivityCaptureOptions, BrowserPlaywrightExecuteOptions, BrowserPlaywrightExecuteRequest, BrowserPlaywrightExecuteResponse, BrowserPlaywrightExecutionActivity, BrowserRecordings, BrowserRuntimeStatusSummary, BrowserStatusOptions, BrowserStatusResponse, CreateBrowserFileFromPathOptions, CreateBrowserFileOptions, FileId, PageId, RecordingDownloadResult, RecordingEventsOptions, RecordingListOptions, WebBrowserResource.
Policy and warning exports
BrowserPolicyMode, BrowserPolicyTip, BrowserPrivateAccess, WebcomputeWarning, ParsedWarning, WarningCallback, parseWarning, RedactValueForObservabilityOptions, redactValueForObservability.
Error exports
AuthenticationError, BrowserPolicyTipError, BrowserUnavailableError, ConflictError, ConnectionError, InternalError, mapResponseToError, NotFoundError, PayloadTooLargeError, RateLimitError, RequestAbortedError, ResourceLimitError, TimeoutError, ValidationError, WebcomputeError.