SAMWebsearchPlugin
SAM model of the WebsearchPlugin kind, generated from the Smarter platform’s JSON Schema.
Do not edit: run scripts/generate_sam_models.py. See smarter.models.sam.
- class smarter.models.sam.websearchplugin.SAMDependency(*, kind: str, name: str, **extra_data: Any)[source]
Bases:
SAMModelA resource that depends on the resource that a manifest describes.
- kind: str
Kind[String]: The SAM kind of the resource that depends on this resource, e.g. LLMClient.
Read only.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.websearchplugin.SAMPluginCommonMetadata(*, annotations: None | list[dict[str, str | int | float | bool | date | datetime | UUID | bytes | list | dict[str, Any]]] = None, description: str | None, name: str, pluginClass: str, tags: list[str] | None = None, version: str | None, **extra_data: Any)[source]
Bases:
SAMModelSmarter API Plugin Manifest - common Metadata class.
- annotations: None | list[dict[str, str | int | float | bool | date | datetime | UUID | bytes | list | dict[str, Any]]]
The manifest annotations.
- Used for storing arbitrary metadata as
key-value pairs. Example: [{‘smarter.sh/test-manifest/project-name’: ‘Scooby dooby do’}]. The key should be a valid url-friendly string. The value accepts multi-line string values (YAML block scalars) and various scalar types including str, int, float, bool, datetime.date, datetime.datetime, decimal.Decimal, uuid.UUID, bytes, list, dict.
- pluginClass: str
The class of the plugin.
one of: [‘api’, ‘imagesearch’, ‘skill’, ‘sql’, ‘static’, ‘websearch’]
- tags: list[str] | None
The tags of the manifest.
Used for generic resource categorization and search. Example: [‘tag1’, ‘tag2’]
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.websearchplugin.SAMPluginCommonSpecPrompt(*, maxTokens: Annotated[int, Gt(gt=0)] | None = 2048, model: str | None = 'gpt-6-luna', provider: str | None = 'openai', systemRole: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=32768, pattern=None, ascii_only=None)], temperature: Annotated[float, None, Interval(gt=None, ge=0.0, lt=None, le=1.0), None, None] | None = 1.0, **extra_data: Any)[source]
Bases:
SAMModelSmarter API Plugin Manifest - Spec - Prompt class.
- maxTokens: PositiveInt | None
Plugin.spec.prompt.maxTokens[int].
Optional. The maxTokens of the Plugin. Defaults to 2048. The maximum number of tokens the LLM should generate in the prompt response.
- model: str | None
Plugin.spec.prompt.model[str] Optional.
The model of the Plugin. Defaults to gpt-6-luna. Must be one of: [‘chat-latest’, ‘gpt-4.1’, ‘gpt-4.1-2025-04-14’, ‘gpt-4.1-mini’, ‘gpt-4.1-mini-2025-04-14’, ‘gpt-4o’, ‘gpt-4o-2024-08-06’, ‘gpt-4o-2024-11-20’, ‘gpt-4o-mini’, ‘gpt-4o-mini-2024-07-18’, ‘gpt-5-search-api’, ‘gpt-5-search-api-2025-10-14’, ‘gpt-5.2’, ‘gpt-5.2-2025-12-11’, ‘gpt-5.4’, ‘gpt-5.4-2026-03-05’, ‘gpt-5.4-mini’, ‘gpt-5.4-mini-2026-03-17’, ‘gpt-5.5’, ‘gpt-5.5-2026-04-23’, ‘gpt-5.6-luna’, ‘gpt-5.6-sol’, ‘gpt-5.6-terra’, ‘gpt-6-astra’, ‘gpt-6-luna’, ‘gpt-6-sol’, ‘gpt-6.1-sol’]
- provider: str | None
Plugin.spec.prompt.provider[str].
Optional. The provider of the LLM. Defaults to openai. The provider is the vendor name for the LLM service that will be used to generate the prompt response.
- systemRole: constr(max_length=32768)
Plugin.spec.prompt.systemRole[str].
Required. The system role that the Plugin will use for the LLM text completion prompt. Be verbose and specific. Ensure that systemRole accurately conveys to the LLM how you want it to use the Plugin data that is returned. The maximum length is 32768 characters.
- temperature: confloat(ge=0.0, le=1.0) | None
Plugin.spec.prompt.temperature[float] Optional.
The temperature of the Plugin. Defaults to 1.0. Should be between 0 and 1.0. The higher the temperature, the more creative the response. The lower the temperature, the more predictable the response.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.websearchplugin.SAMPluginCommonSpecSelector(*, directive: str, searchTerms: list[str] | None = None, **extra_data: Any)[source]
Bases:
SAMModelSmarter API Plugin Manifest - Spec - Selector class.
- directive: str
Plugin.spec.selector.directive[str]: Required.
the kind of selector directive to use for the Plugin. Must be one of: [‘search_terms’, ‘always’, ‘llm’]
- searchTerms: list[str] | None
Plugin.spec.selector.searchTerms[list].
Optional. The keyword search terms to use when the Plugin directive is ‘search_terms’. Keywords are most effective when constrained to 1 or 2 words each and lists are limited to a few dozen items.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.websearchplugin.SAMPluginCommonStatus(*, accountNumber: str, created: datetime, dependencies: list[SAMDependency] | None = None, modified: datetime, recordLocator: str, username: str, **extra_data: Any)[source]
Bases:
SAMModelSmarter API Plugin Manifest - Status class.
- created: datetime
The date in which this resource was created.
Read only.
- dependencies: list[SAMDependency] | None
Dependencies[List]: The resources that depend on this resource, and that must be deleted, or stop referring to it, before it can be deleted.
Lists only the resources that you can read. Read only.
- modified: datetime
The date in which this resource was most recently changed.
Read only.
- recordLocator: str
RecordLocator[String]: An optional identifier used to locate the resource record associated with this manifest.
Read only.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.websearchplugin.WebsearchFetch(*, maxCharacters: Annotated[int, None, Interval(gt=None, ge=1000, lt=None, le=100000), None] | None = 20000, respectRobotsTxt: bool | None = True, **extra_data: Any)[source]
Bases:
SAMModelSmarter API - WebsearchPlugin.spec.websearchData.fetch: reading web pages by URL.
- maxCharacters: conint(ge=1000, le=100000) | None
WebsearchPlugin.spec.fetch.maxCharacters[int]: the maximum number of characters of a web page to return, 1000 to 100000.
Longer pages are truncated.
- respectRobotsTxt: bool | None
WebsearchPlugin.spec.fetch.respectRobotsTxt[bool]: whether to obey websites’ robots.txt files.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.websearchplugin.Freshness(*values)[source]
Bases:
EnumWebsearchPlugin.spec.search.freshness[str]: by default, restrict results to those published within the last [‘day’, ‘week’, ‘month’, ‘year’].
The LLM can override this per search.
- class smarter.models.sam.websearchplugin.Provider(*values)[source]
Bases:
EnumWebsearchPlugin.spec.search.provider[str]: the web search API.
One of: [‘brave’, ‘tavily’]
- class smarter.models.sam.websearchplugin.SafeSearch(*values)[source]
Bases:
EnumWebsearchPlugin.spec.search.safeSearch[str]: adult content filtering.
One of: [‘off’, ‘moderate’, ‘strict’]
- class smarter.models.sam.websearchplugin.WebsearchSearch(*, apiKey: str, country: str | None = None, freshness: Freshness | None = None, language: str | None = None, maxResults: Annotated[int, None, Interval(gt=None, ge=1, lt=None, le=20), None] | None = 5, provider: Provider, safeSearch: SafeSearch | None = 'moderate', **extra_data: Any)[source]
Bases:
SAMModelSmarter API - WebsearchPlugin.spec.websearchData.search: web search, via a web search API.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- apiKey: str
WebsearchPlugin.spec.search.apiKey[str]: the name of the Smarter Secret that contains the web search API’s api key.
The api key itself is never included in the manifest.
- country: str | None
WebsearchPlugin.spec.search.country[str]: an ISO 3166-1 alpha-2 country code, e.g. us, to localize results.
- freshness: Freshness | None
WebsearchPlugin.spec.search.freshness[str]: by default, restrict results to those published within the last [‘day’, ‘week’, ‘month’, ‘year’].
The LLM can override this per search.
- language: str | None
WebsearchPlugin.spec.search.language[str]: an ISO 639-1 language code, e.g. en, to localize results.
- maxResults: conint(ge=1, le=20) | None
WebsearchPlugin.spec.search.maxResults[int]: the maximum number of results per search, 1 to 20.
- provider: Provider
WebsearchPlugin.spec.search.provider[str]: the web search API.
One of: [‘brave’, ‘tavily’]
- safeSearch: SafeSearch | None
WebsearchPlugin.spec.search.safeSearch[str]: adult content filtering.
One of: [‘off’, ‘moderate’, ‘strict’]
- class smarter.models.sam.websearchplugin.WebsearchData(*, allowedDomains: list[str] | None = None, blockedDomains: list[str] | None = None, cacheTtl: Annotated[int, None, Interval(gt=None, ge=0, lt=None, le=86400), None] | None = 3600, fetch: WebsearchFetch | None = None, search: WebsearchSearch | None = None, timeout: Annotated[int, None, Interval(gt=None, ge=1, lt=None, le=60), None] | None = 15, **extra_data: Any)[source]
Bases:
SAMModelSmarter API - WebsearchPlugin.spec.websearchData.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- allowedDomains: list[str] | None
WebsearchPlugin.spec.allowedDomains[list]: if not empty, only these domains, and their subdomains, may be searched and read.
- blockedDomains: list[str] | None
WebsearchPlugin.spec.blockedDomains[list]: these domains, and their subdomains, are never searched nor read.
- cacheTtl: conint(ge=0, le=86400) | None
WebsearchPlugin.spec.cacheTtl[int]: seconds to cache search results and web pages.
0 disables caching.
- fetch: WebsearchFetch | None
WebsearchPlugin.spec.fetch[obj]: enables reading web pages by URL.
- search: WebsearchSearch | None
WebsearchPlugin.spec.search[obj]: enables web search.
Requires a web search API key.
- class smarter.models.sam.websearchplugin.SAMWebsearchPluginSpec(*, prompt: SAMPluginCommonSpecPrompt, selector: SAMPluginCommonSpecSelector, websearchData: WebsearchData, **extra_data: Any)[source]
Bases:
SAMModelSmarter API Manifest - WebsearchPlugin.spec.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- prompt: SAMPluginCommonSpecPrompt
Plugin.spec.prompt[obj]: the LLM prompt engineering to apply to the Plugin.
- selector: SAMPluginCommonSpecSelector
Plugin.spec.selector[obj]: the selector logic to use for the Plugin.
- websearchData: WebsearchData
WebsearchPlugin.spec.websearchData[obj]: the web search and web fetch configuration of the WebsearchPlugin.
- class smarter.models.sam.websearchplugin.SAMWebsearchPlugin(*, apiVersion: str, kind: str, metadata: SAMPluginCommonMetadata, spec: SAMWebsearchPluginSpec, status: SAMPluginCommonStatus | None = None, **extra_data: Any)[source]
Bases:
SAMModelSmarter API Manifest - WebsearchPlugin Model.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- metadata: SAMPluginCommonMetadata
Plugin.metadata[obj]: Required, the Plugin metadata.
- spec: SAMWebsearchPluginSpec
WebsearchPlugin.spec[obj]: Required, the WebsearchPlugin specification.
- status: SAMPluginCommonStatus | None
Plugin.status[obj]: Optional, Read-only.
Stateful status information about the Plugin.