Models ====== .. This page is generated by smarter-nodejs's scripts/generate-reference.ts. Do not edit it. The Zod schemas, and types, of the REST api's responses, and the ``Manifest`` class. See :doc:`../models`. .. js:class:: Manifest(data) A Smarter Application Manifest. Its fields are the manifest's own sections. Fields that the SDK doesn't know are kept, and written back by ``Manifest.toJSON`` and ``Manifest.toYaml``. **Example** .. code-block:: typescript const manifest = Manifest.fromFile("llmclient.yaml"); manifest.metadata.name; manifest.spec["config"]; :param data: The manifest's sections, validated. :type data: object .. js:attribute:: apiVersion The api version, ``smarter.sh/v1``. :type: string .. js:attribute:: kind The resource kind, e.g. ``LLMClient``. :type: string .. js:attribute:: metadata The resource's name and descriptive information. :type: object .. js:attribute:: spec The resource's specification. Its fields depend on the kind. :type: JsonObject .. js:attribute:: status Read-only state, returned by describe. :type: JsonObject | null | undefined .. js:method:: toApply() The manifest as the api's apply and validate commands take it: without ``status``, and without null sections or metadata. The ``spec`` is sent as it is, nulls included, as the Python SDK sends it. :returns: The manifest's JSON. :rtype: Record .. js:method:: toJSON() The manifest as JSON, with its read-only ``status`` and the fields that the SDK doesn't know. :returns: The manifest's JSON. :rtype: Record .. js:method:: toSam(kind?) The manifest as its kind's typed SAM model, after validating it against the kind's JSON Schema. Pass the kind to get its type, e.g. ``manifest.toSam("Guardrail")`` is a ``SAMGuardrail``. :param kind: The kind that the manifest must be. By default, its own kind. :type kind: K | undefined :returns: The manifest, typed. :throws SmarterValueError: If the SDK has no model of the kind, the manifest is of another kind, or it doesn't match its kind's schema. :rtype: unknown .. js:method:: toYaml() The manifest as YAML text, without its read-only ``status``, ready to apply. :returns: The YAML text. :rtype: string .. js:method:: fromFile(path) Read a manifest from a YAML or JSON file. :param path: The file's path. :type path: string | URL :returns: The manifest. :rtype: Manifest .. js:method:: fromYaml(text) Parse a manifest from YAML (or JSON) text. :param text: The manifest's text. :type text: string :returns: The manifest. :throws SmarterValueError: If the text is not a YAML object with a kind and metadata. :rtype: Manifest .. js:method:: parse(data) Validate a manifest's JSON. :param data: The manifest, e.g. parsed YAML or a typed SAM object. :type data: unknown :returns: The manifest. :throws SmarterValueError: If it is not a manifest. :rtype: Manifest .. js:function:: manifestNames(list) The names of the resources of a ``get`` result: each row's ``name``, or its ``username`` for the User kind. :param list: The result. :type list: object :returns: The names. :rtype: string[] .. js:function:: toManifest(manifest) A manifest from any of the forms that the SDK accepts. A string that names an existing file is read as a file. Any other string is parsed as YAML. :param manifest: The manifest. :type manifest: ManifestInput :returns: The parsed manifest. :throws SmarterValueError: If it cannot be parsed. :rtype: Manifest .. js:function:: withNames(list) Add the non-enumerable ``names`` getter to a ``get`` result. :param list: The result. :type list: object :returns: The same object, as a ``ManifestTable``. :rtype: ManifestTable .. js:class:: Account A Smarter account: the tenant that owns users and resources. A Zod schema, and the type of the same name that it validates. .. js:attribute:: accountNumber :type: string .. js:attribute:: address1 :type: string | null | undefined .. js:attribute:: address2 :type: string | null | undefined .. js:attribute:: annotations :type: JsonObject[] .. js:attribute:: canDelete :type: boolean | null | undefined .. js:attribute:: city :type: string | null | undefined .. js:attribute:: companyName :type: string | null | undefined .. js:attribute:: country :type: string | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: currency :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: hashedId :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: isActive :type: boolean | null | undefined .. js:attribute:: isDefaultAccount :type: boolean | null | undefined .. js:attribute:: language :type: string | null | undefined .. js:attribute:: manifestUrl :type: string | null | undefined .. js:attribute:: name :type: string .. js:attribute:: phoneNumber :type: string | null | undefined .. js:attribute:: postalCode :type: string | null | undefined .. js:attribute:: ready :type: boolean | null | undefined .. js:attribute:: state :type: string | null | undefined .. js:attribute:: tags :type: string[] .. js:attribute:: timezone :type: string | null | undefined .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: userProfile :type: object | null | undefined .. js:attribute:: version :type: string | null | undefined .. js:class:: AccountContact A contact of an account, who receives its notices. A Zod schema, and the type of the same name that it validates. .. js:attribute:: account :type: object | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: email :type: string | null | undefined .. js:attribute:: firstName :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: isPrimary :type: boolean | null | undefined .. js:attribute:: isTest :type: boolean | null | undefined .. js:attribute:: lastName :type: string | null | undefined .. js:attribute:: phone :type: string | null | undefined .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: welcomed :type: boolean | null | undefined .. js:class:: ApiVersion The platform's version, and the versions of its main Python packages. A Zod schema, and the type of the same name that it validates. .. js:attribute:: python Python package versions, by package. :type: Record .. js:attribute:: version The Smarter platform's semantic version. :type: string .. js:class:: CliVersion The version of the smarter cli that the platform recommends. A Zod schema, and the type of the same name that it validates. .. js:attribute:: version :type: string | null | undefined .. js:class:: DiscoveredManifest The response of ``discover/manifest/``: a drafted LLMHost manifest. A Zod schema, and the type of the same name that it validates. .. js:attribute:: manifest :type: JsonObject .. js:class:: DiscoveredModel A model found in a public catalog, e.g. Hugging Face, with the LLMHost manifest that would serve it. A Zod schema, and the type of the same name that it validates. .. js:attribute:: catalog :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: downloads :type: number | null | undefined .. js:attribute:: gated :type: boolean | null | undefined .. js:attribute:: license :type: string | null | undefined .. js:attribute:: likes :type: number | null | undefined .. js:attribute:: manifest :type: JsonObject | null | undefined .. js:attribute:: repository :type: string .. js:attribute:: source :type: string | null | undefined .. js:attribute:: tags :type: string[] .. js:attribute:: task :type: string | null | undefined .. js:class:: DiscoveredModels The models that a catalog search found. A Zod schema, and the type of the same name that it validates. .. js:attribute:: models :type: object[] .. js:class:: Guardrail A guardrail: a check that the platform runs on prompts (``input``) or on the LLM's replies (``output``). A Zod schema, and the type of the same name that it validates. .. js:attribute:: action e.g. block, redact or flag. :type: string | null | undefined .. js:attribute:: annotations :type: JsonObject[] .. js:attribute:: canDelete :type: boolean | null | undefined .. js:attribute:: category :type: string | null | undefined .. js:attribute:: config :type: JsonObject | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: failClosed :type: boolean | null | undefined .. js:attribute:: hashedId :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: isActive :type: boolean | null | undefined .. js:attribute:: manifestUrl :type: string | null | undefined .. js:attribute:: message :type: string | null | undefined .. js:attribute:: mode enforce or monitor. :type: string | null | undefined .. js:attribute:: name :type: string .. js:attribute:: pattern :type: string | null | undefined .. js:attribute:: priority :type: number | null | undefined .. js:attribute:: ready :type: boolean | null | undefined .. js:attribute:: replacement :type: string | null | undefined .. js:attribute:: severity :type: number | null | undefined .. js:attribute:: stage input or output. :type: string | null | undefined .. js:attribute:: strategy e.g. regex, detector, classifier or llm. :type: string | null | undefined .. js:attribute:: tags :type: string[] .. js:attribute:: threshold :type: number | null | undefined .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: userProfile :type: object | null | undefined .. js:attribute:: version :type: string | null | undefined .. js:class:: GuardrailEvaluation The result of a guardrail's dry run on a text. Nothing is saved: an evaluation does not create an event. A Zod schema, and the type of the same name that it validates. .. js:attribute:: disposition e.g. passed, blocked, redacted or flagged. :type: string | null | undefined .. js:attribute:: durationMs :type: number | null | undefined .. js:attribute:: error :type: string | null | undefined .. js:attribute:: findings :type: object[] .. js:attribute:: guardrail :type: string .. js:attribute:: message :type: string | null | undefined .. js:attribute:: stage :type: string .. js:attribute:: text The text after the guardrail's action, e.g. redacted. :type: string | null | undefined .. js:attribute:: triggered :type: boolean .. js:class:: GuardrailEvent A guardrail's finding in a real prompt, saved for review. A Zod schema, and the type of the same name that it validates. .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: disposition :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: llmclient The name of the LLMClient whose prompt triggered it. :type: string | null | undefined .. js:attribute:: reviewed :type: boolean | null | undefined .. js:attribute:: stage :type: string | null | undefined .. js:class:: GuardrailEvents The latest events of a guardrail. A Zod schema, and the type of the same name that it validates. .. js:attribute:: events :type: object[] .. js:attribute:: guardrail :type: string .. js:class:: GuardrailFinding One finding of a guardrail evaluation. A Zod schema, and the type of the same name that it validates. .. js:attribute:: confidence :type: number | null | undefined .. js:attribute:: matches :type: object[] .. js:attribute:: rationale :type: string | null | undefined .. js:class:: GuardrailMatch A span of the text that a guardrail matched. A Zod schema, and the type of the same name that it validates. .. js:attribute:: end :type: number .. js:attribute:: label :type: string | null | undefined .. js:attribute:: start :type: number .. js:attribute:: text :type: string .. js:class:: KindInfo A resource kind that the platform supports, as ``/api/v1/cli/resources/`` describes it. A Zod schema, and the type of the same name that it validates. .. js:attribute:: APIKind The kind, as it appears in a manifest. :type: string .. js:attribute:: Deployable True if the kind can be deployed. :type: boolean .. js:attribute:: Display :type: string | null | undefined .. js:attribute:: DisplayPlural :type: string | null | undefined .. js:attribute:: Plural :type: string .. js:attribute:: Singular :type: string .. js:class:: LLMClient An LLMClient: a deployable AI agent, built from an LLM provider and model, a system prompt, plugins and functions. Prompt it with ``client.llmClients.prompt()``, or start a chat with ``client.llmClients.chat()``. A Zod schema, and the type of the same name that it validates. .. js:attribute:: annotations :type: JsonObject[] .. js:attribute:: apiKeys :type: object[] .. js:attribute:: canDelete :type: boolean | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: customDomains :type: object[] .. js:attribute:: customHost :type: string | null | undefined .. js:attribute:: customUrl :type: string | null | undefined .. js:attribute:: defaultHost :type: string | null | undefined .. js:attribute:: defaultModel :type: string | null | undefined .. js:attribute:: defaultSystemRole The system prompt of a new chat session. :type: string | null | undefined .. js:attribute:: defaultUrl :type: string | null | undefined .. js:attribute:: deployed :type: boolean | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: functions :type: object[] .. js:attribute:: hashedId :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: isAuthenticationRequired Whether prompting the LLMClient requires an api key. :type: boolean | null | undefined .. js:attribute:: manifestUrl :type: string | null | undefined .. js:attribute:: name :type: string .. js:attribute:: plugins :type: object[] .. js:attribute:: provider :type: string | null | undefined .. js:attribute:: ready :type: boolean | null | undefined .. js:attribute:: rfc1034CompliantName :type: string | null | undefined .. js:attribute:: sandboxHost :type: string | null | undefined .. js:attribute:: sandboxUrl :type: string | null | undefined .. js:attribute:: tags :type: string[] .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: urlChatConfig The chat api's configuration url. :type: string | null | undefined .. js:attribute:: urlLlmclient Where to send prompts: the chat api's prompt url. :type: string | null | undefined .. js:attribute:: userProfile :type: object | null | undefined .. js:attribute:: version :type: string | null | undefined .. js:class:: LLMClientApiKey An api key that may call an LLMClient that requires authentication. A Zod schema, and the type of the same name that it validates. .. js:attribute:: apiKey The api key's public key_id, a UUID. Never the key itself. :type: string | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: llmclient :type: number | null | undefined .. js:attribute:: updatedAt :type: string | null | undefined .. js:class:: LLMClientCustomDomain A custom domain on which an LLMClient is deployed: the domain itself, and its verification. A Zod schema, and the type of the same name that it validates. .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: domainName The domain, e.g. ``example.com``. :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: name :type: string | null | undefined .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: userProfile The owner's user profile id. :type: number | null | undefined .. js:attribute:: verificationMessage :type: string | null | undefined .. js:attribute:: verificationStatus Not Verified, Verifying, Verified or Failed. :type: string | null | undefined .. js:attribute:: verifiedAt :type: string | null | undefined .. js:attribute:: version :type: string | null | undefined .. js:class:: LLMClientFunction A built-in function of an LLMClient, e.g. ``calculator``. A Zod schema, and the type of the same name that it validates. .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: llmclient :type: number | null | undefined .. js:attribute:: name :type: string | null | undefined .. js:attribute:: updatedAt :type: string | null | undefined .. js:class:: LLMClientPlugin The association of a plugin with an LLMClient. A Zod schema, and the type of the same name that it validates. .. js:attribute:: id :type: number .. js:attribute:: llmclient :type: number | null | undefined .. js:attribute:: pluginMeta :type: object .. js:class:: LLMClientPluginRef A plugin of an LLMClient, by its id and name. A Zod schema, and the type of the same name that it validates. .. js:attribute:: id :type: number .. js:attribute:: name :type: string | null | undefined .. js:class:: LLMHost An LLMHost: a model, the inference engine that serves it, and the compute it runs on. A Zod schema, and the type of the same name that it validates. .. js:attribute:: annotations :type: JsonObject[] .. js:attribute:: apiFormat :type: string | null | undefined .. js:attribute:: canDelete :type: boolean | null | undefined .. js:attribute:: compute The id of the LLMHostCompute that the LLMHost runs on. :type: number | null | undefined .. js:attribute:: costPerHour :type: string | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: deployedAt :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: endpointUrl :type: string | null | undefined .. js:attribute:: gpuCount :type: number | null | undefined .. js:attribute:: gpuType :type: string | null | undefined .. js:attribute:: hashedId :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: inferenceEngine e.g. vllm, tgi, tei, ollama or llama_cpp. :type: string | null | undefined .. js:attribute:: isActive :type: boolean | null | undefined .. js:attribute:: manifestUrl :type: string | null | undefined .. js:attribute:: modelRepository :type: string | null | undefined .. js:attribute:: modelRevision :type: string | null | undefined .. js:attribute:: modelSource :type: string | null | undefined .. js:attribute:: modelTask e.g. chat, completion or embedding. :type: string | null | undefined .. js:attribute:: name :type: string .. js:attribute:: publicUrl :type: string | null | undefined .. js:attribute:: ready :type: boolean | null | undefined .. js:attribute:: readyReplicas :type: number | null | undefined .. js:attribute:: replicas :type: number | null | undefined .. js:attribute:: servedModelName :type: string | null | undefined .. js:attribute:: spec :type: JsonObject | null | undefined .. js:attribute:: status :type: string | null | undefined .. js:attribute:: statusMessage :type: string | null | undefined .. js:attribute:: tags :type: string[] .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: userProfile :type: object | null | undefined .. js:attribute:: version :type: string | null | undefined .. js:class:: LLMHostLogs The latest log lines of an LLMHost's pods. A Zod schema, and the type of the same name that it validates. .. js:attribute:: llmhost :type: string .. js:attribute:: logs :type: JsonValue | null | undefined .. js:class:: LLMHostPlan The Kubernetes resources that deploying an LLMHost would create, without creating them. A Zod schema, and the type of the same name that it validates. .. js:attribute:: llmhost :type: string .. js:attribute:: resources :type: JsonObject[] .. js:class:: LLMHostReport A report of every LLMHost that the user may read: counts, and estimated costs. A Zod schema, and the type of the same name that it validates. .. js:attribute:: byEngine :type: Record .. js:attribute:: byStatus :type: Record .. js:attribute:: llmhosts :type: JsonObject[] .. js:attribute:: totals :type: JsonObject .. js:class:: LLMHostStatus An LLMHost's state, read from Kubernetes now. A Zod schema, and the type of the same name that it validates. .. js:attribute:: checkedAt :type: string | null | undefined .. js:attribute:: endpoint :type: string | null | undefined .. js:attribute:: healthy :type: boolean | null | undefined .. js:attribute:: llmhost :type: string .. js:attribute:: message :type: string | null | undefined .. js:attribute:: pods :type: JsonObject[] .. js:attribute:: publicUrl :type: string | null | undefined .. js:attribute:: readyReplicas :type: number | null | undefined .. js:attribute:: replicas :type: number | null | undefined .. js:attribute:: status :type: string .. js:class:: ManifestData The schema of a manifest's JSON, which ``Manifest`` wraps. A Zod schema, and the type of the same name that it validates. .. js:attribute:: apiVersion :type: string .. js:attribute:: kind The resource kind, e.g. ``LLMClient``. See ``client.kinds()``. :type: string .. js:attribute:: metadata :type: object .. js:attribute:: spec The resource's specification. :type: JsonObject .. js:attribute:: status Read-only state, returned by describe. :type: JsonObject | null | undefined .. js:class:: ManifestList The result of ``get``: the resources of one kind, as a table. ``data.items`` are the rows, and ``data.titles`` their columns. The columns depend on the kind. The SDK adds a non-enumerable ``names`` getter to the results that it returns: see ``manifestNames``. A Zod schema, and the type of the same name that it validates. .. js:attribute:: apiVersion :type: string .. js:attribute:: data :type: object .. js:attribute:: kind :type: string .. js:attribute:: metadata :type: object .. js:attribute:: name :type: string | null | undefined .. js:class:: ManifestListData The table of a ``get`` result. A Zod schema, and the type of the same name that it validates. .. js:attribute:: items :type: JsonObject[] .. js:attribute:: titles :type: object[] .. js:class:: ManifestListMetadata The ``metadata`` of a ``get`` result. A Zod schema, and the type of the same name that it validates. .. js:attribute:: count :type: number .. js:class:: ManifestListTitle A column of a ``get`` result: the field's name, and its Django field type. A Zod schema, and the type of the same name that it validates. .. js:attribute:: name :type: string .. js:attribute:: type :type: string .. js:class:: ManifestMetadata A manifest's ``metadata``: the resource's name, and descriptive information about it. A Zod schema, and the type of the same name that it validates. .. js:attribute:: annotations Key-value pairs, as a list of single-key objects. :type: JsonObject[] | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: name The resource's name, unique per account and kind, in snake_case. :type: string .. js:attribute:: tags :type: string[] | null | undefined .. js:attribute:: version The resource's semantic version, e.g. ``1.0.0``. :type: string | null | undefined .. js:class:: ManifestValidation The result of validating a manifest, without applying it. A Zod schema, and the type of the same name that it validates. .. js:attribute:: errors :type: JsonValue[] .. js:attribute:: valid :type: boolean .. js:class:: MCPClient An MCPClient: an MCP server, how to reach it, and which of its tools the LLM may call. A Zod schema, and the type of the same name that it validates. .. js:attribute:: allowedResources :type: string[] .. js:attribute:: allowedTools :type: string[] .. js:attribute:: annotations :type: JsonObject[] .. js:attribute:: authType :type: string | null | undefined .. js:attribute:: cacheTtl :type: number | null | undefined .. js:attribute:: canDelete :type: boolean | null | undefined .. js:attribute:: command :type: string | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: endpointUrl :type: string | null | undefined .. js:attribute:: hashedId :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: includeInstructions :type: boolean | null | undefined .. js:attribute:: isActive :type: boolean | null | undefined .. js:attribute:: lastConnectedAt :type: string | null | undefined .. js:attribute:: lastError :type: string | null | undefined .. js:attribute:: manifestUrl :type: string | null | undefined .. js:attribute:: name :type: string .. js:attribute:: priority :type: number | null | undefined .. js:attribute:: protocolVersion :type: string | null | undefined .. js:attribute:: ready :type: boolean | null | undefined .. js:attribute:: serverName :type: string | null | undefined .. js:attribute:: serverVersion :type: string | null | undefined .. js:attribute:: status e.g. connected or error. :type: string | null | undefined .. js:attribute:: tags :type: string[] .. js:attribute:: timeout :type: number | null | undefined .. js:attribute:: tools The names of every tool that the server offers. :type: string[] .. js:attribute:: transport http, sse or stdio. :type: string | null | undefined .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: userProfile :type: object | null | undefined .. js:attribute:: version :type: string | null | undefined .. js:class:: MCPClientStatus The connection state of an MCPClient. A Zod schema, and the type of the same name that it validates. .. js:attribute:: error The error of a failed refresh. :type: string | null | undefined .. js:attribute:: lastConnected :type: string | null | undefined .. js:attribute:: lastError :type: string | null | undefined .. js:attribute:: name :type: string .. js:attribute:: protocolVersion :type: string | null | undefined .. js:attribute:: serverName :type: string | null | undefined .. js:attribute:: serverVersion :type: string | null | undefined .. js:attribute:: status :type: string | null | undefined .. js:class:: MCPClientTools An MCPClient's allowed tools, and the server's instructions. A Zod schema, and the type of the same name that it validates. .. js:attribute:: error The error of a failed refresh. :type: string | null | undefined .. js:attribute:: instructions :type: string | null | undefined .. js:attribute:: lastConnected :type: string | null | undefined .. js:attribute:: lastError :type: string | null | undefined .. js:attribute:: name :type: string .. js:attribute:: protocolVersion :type: string | null | undefined .. js:attribute:: serverName :type: string | null | undefined .. js:attribute:: serverVersion :type: string | null | undefined .. js:attribute:: status :type: string | null | undefined .. js:attribute:: tools :type: object[] .. js:class:: MCPTool A tool of an MCP server, which the MCPClient allows the LLM to call. A Zod schema, and the type of the same name that it validates. .. js:attribute:: description :type: string | null | undefined .. js:attribute:: destructive :type: boolean | null | undefined .. js:attribute:: inputSchema The tool's arguments, as a JSON Schema. :type: JsonObject | null | undefined .. js:attribute:: name :type: string .. js:attribute:: readOnly :type: boolean | null | undefined .. js:attribute:: title :type: string | null | undefined .. js:class:: MCPToolResult The result of a tool call. A Zod schema, and the type of the same name that it validates. .. js:attribute:: content The tool's result, as text. :type: string | null | undefined .. js:attribute:: isError :type: boolean .. js:attribute:: name The MCPClient's name. :type: string .. js:attribute:: tool :type: string .. js:class:: Orchestrator An orchestrator: a multi-agent workflow that composes LLMClients. A Zod schema, and the type of the same name that it validates. .. js:attribute:: annotations :type: JsonObject[] .. js:attribute:: canDelete :type: boolean | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: hashedId :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: isActive :type: boolean | null | undefined .. js:attribute:: llmclients The ids of its LLMClients. :type: number[] .. js:attribute:: manifestUrl :type: string | null | undefined .. js:attribute:: maxIterations :type: number | null | undefined .. js:attribute:: name :type: string .. js:attribute:: ready :type: boolean | null | undefined .. js:attribute:: strategy How its LLMClients collaborate: sequential, parallel, supervisor, router, voting or debate. :type: string | null | undefined .. js:attribute:: tags :type: string[] .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: userProfile :type: object | null | undefined .. js:attribute:: version :type: string | null | undefined .. js:class:: PlatformStatus The response of ``status``: the state of the platform's infrastructure and compute. The sections' contents depend on how the platform is hosted, so they are JSON objects. A Zod schema, and the type of the same name that it validates. .. js:attribute:: compute :type: JsonObject .. js:attribute:: infrastructures :type: JsonObject .. js:class:: PlatformVersion The response of ``version``. A Zod schema, and the type of the same name that it validates. .. js:attribute:: api :type: object .. js:attribute:: cli :type: object | null | undefined .. js:class:: Plugin A plugin's metadata. Its ``kind`` is the manifest kind, e.g. ``ApiPlugin`` or ``SqlPlugin``, and its ``pluginClass`` the implementation: api, skill, sql, static, websearch or imagesearch. A Zod schema, and the type of the same name that it validates. .. js:attribute:: annotations :type: JsonObject[] .. js:attribute:: canDelete :type: boolean | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: hashedId :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: kind The manifest kind, e.g. ``ApiPlugin``. :type: string | null | undefined .. js:attribute:: manifestUrl :type: string | null | undefined .. js:attribute:: name :type: string .. js:attribute:: pluginClass api, skill, sql, static, websearch or imagesearch. :type: string | null | undefined .. js:attribute:: ready :type: boolean | null | undefined .. js:attribute:: tags :type: string[] .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: userProfile :type: object | null | undefined .. js:attribute:: version :type: string | null | undefined .. js:class:: PromptPluginUsage A use of a plugin in a chat session. A Zod schema, and the type of the same name that it validates. .. js:attribute:: created_at :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: input_text :type: string | null | undefined .. js:attribute:: plugin :type: object | null | undefined .. js:attribute:: prompt :type: unknown | null | undefined .. js:attribute:: updated_at :type: string | null | undefined .. js:class:: PromptSession A chat session: one conversation with an LLMClient, by its session key. A Zod schema, and the type of the same name that it validates. .. js:attribute:: created_at :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: ip_address :type: string | null | undefined .. js:attribute:: llmclient :type: number | null | undefined .. js:attribute:: name :type: string | null | undefined .. js:attribute:: session_key :type: string | null | undefined .. js:attribute:: updated_at :type: string | null | undefined .. js:attribute:: url :type: string | null | undefined .. js:attribute:: user_agent :type: string | null | undefined .. js:attribute:: user_profile :type: number | null | undefined .. js:class:: PromptToolCall A tool call that the LLM made in a chat session. A Zod schema, and the type of the same name that it validates. .. js:attribute:: created_at :type: string | null | undefined .. js:attribute:: function_args :type: string | null | undefined .. js:attribute:: function_name :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: plugin The id of the plugin that the tool belongs to, if any. :type: number | null | undefined .. js:attribute:: prompt :type: unknown | null | undefined .. js:attribute:: request :type: JsonValue | null | undefined .. js:attribute:: response :type: JsonValue | null | undefined .. js:attribute:: updated_at :type: string | null | undefined .. js:class:: Provider An LLM provider that the platform is configured for, e.g. openai. A Zod schema, and the type of the same name that it validates. .. js:attribute:: baseUrl :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: isActive :type: boolean | null | undefined .. js:attribute:: name :type: string .. js:class:: ProviderModel A model of an LLM provider. A Zod schema, and the type of the same name that it validates. .. js:attribute:: description :type: string | null | undefined .. js:attribute:: maxTokens :type: number | null | undefined .. js:attribute:: metadata :type: JsonObject | null | undefined .. js:attribute:: name :type: string .. js:attribute:: supportsStreaming :type: boolean | null | undefined .. js:attribute:: supportsTools :type: boolean | null | undefined .. js:class:: Proxy A proxy: authenticated passthrough access to an LLM provider's own api. The platform holds the provider's api key. Callers use their Smarter api key instead, and may reach only the proxy's ``allowedPaths``. A Zod schema, and the type of the same name that it validates. .. js:attribute:: allowedPaths :type: string[] .. js:attribute:: description :type: string | null | undefined .. js:attribute:: isActive :type: boolean | null | undefined .. js:attribute:: name :type: string .. js:attribute:: provider :type: string | null | undefined .. js:attribute:: upstreamUrl :type: string | null | undefined .. js:attribute:: url The proxy's base url on the Smarter platform. :type: string | null | undefined .. js:class:: ProxyList The proxies that the user may call. A Zod schema, and the type of the same name that it validates. .. js:attribute:: proxies :type: object[] .. js:class:: Secret A secret's metadata. The api never returns a secret's value. A Zod schema, and the type of the same name that it validates. .. js:attribute:: annotations :type: JsonObject[] .. js:attribute:: canDelete :type: boolean | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: expiresAt :type: string | null | undefined .. js:attribute:: hashedId :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: lastAccessed :type: string | null | undefined .. js:attribute:: manifestUrl :type: string | null | undefined .. js:attribute:: name :type: string .. js:attribute:: ready :type: boolean | null | undefined .. js:attribute:: tags :type: string[] .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: userProfile :type: object | null | undefined .. js:attribute:: version :type: string | null | undefined .. js:data:: SMARTER_API_VERSION The ``apiVersion`` of every Smarter manifest. :type: "smarter.sh/v1" .. js:class:: SmarterAccountRef The account of a resource's owner. A Zod schema, and the type of the same name that it validates. .. js:attribute:: accountNumber :type: string .. js:class:: SmarterOwner The owner of a resource: its user profile, as the user and the account. A Zod schema, and the type of the same name that it validates. .. js:attribute:: account :type: object | null | undefined .. js:attribute:: user :type: object | null | undefined .. js:class:: SmarterResource The fields that every Smarter resource shares, as the REST api returns them. The api's resources are Django rows with the same metadata as a manifest's ``metadata``: a name, description, version, tags and annotations. Each resource's schema adds its own fields. A Zod schema, and the type of the same name that it validates. .. js:attribute:: annotations :type: JsonObject[] .. js:attribute:: canDelete :type: boolean | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: hashedId :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: manifestUrl :type: string | null | undefined .. js:attribute:: name :type: string .. js:attribute:: ready :type: boolean | null | undefined .. js:attribute:: tags :type: string[] .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: userProfile :type: object | null | undefined .. js:attribute:: version :type: string | null | undefined .. js:class:: SmarterUserRef The user of a resource's owner. A Zod schema, and the type of the same name that it validates. .. js:attribute:: email :type: string | null | undefined .. js:attribute:: username :type: string .. js:class:: User A user of the platform. A Zod schema, and the type of the same name that it validates. .. js:attribute:: email :type: string | null | undefined .. js:attribute:: firstName :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: isStaff :type: boolean | null | undefined .. js:attribute:: isSuperuser :type: boolean | null | undefined .. js:attribute:: lastName :type: string | null | undefined .. js:attribute:: username :type: string .. js:class:: UserProfile A user's membership of an account, which owns the resources that the user creates in it. A Zod schema, and the type of the same name that it validates. .. js:attribute:: account :type: object .. js:attribute:: annotations :type: JsonObject[] .. js:attribute:: canDelete :type: boolean | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: hashedId :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: isTest :type: boolean | null | undefined .. js:attribute:: manifestUrl :type: string | null | undefined .. js:attribute:: name :type: string .. js:attribute:: profileImageUrl :type: string | null | undefined .. js:attribute:: ready :type: boolean | null | undefined .. js:attribute:: tags :type: string[] .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: user :type: object .. js:attribute:: userProfile :type: object | null | undefined .. js:attribute:: version :type: string | null | undefined .. js:class:: Vectorsearch A vectorsearch: a retrieval pipeline over a vectorstore. A Zod schema, and the type of the same name that it validates. .. js:attribute:: annotations :type: JsonObject[] .. js:attribute:: authSecret The id of its Secret, if any. :type: number | null | undefined .. js:attribute:: canDelete :type: boolean | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: fetchK The candidates of an mmr search. :type: number | null | undefined .. js:attribute:: hashedId :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: isEnabled :type: boolean | null | undefined .. js:attribute:: k The number of chunks to return. :type: number | null | undefined .. js:attribute:: lambdaMult An mmr search's diversity. :type: number | null | undefined .. js:attribute:: manifestUrl :type: string | null | undefined .. js:attribute:: metadataFilter :type: JsonValue | null | undefined .. js:attribute:: name :type: string .. js:attribute:: ready :type: boolean | null | undefined .. js:attribute:: scoreThreshold :type: number | null | undefined .. js:attribute:: searchType similarity, similarity_score_threshold or mmr. :type: string | null | undefined .. js:attribute:: tags :type: string[] .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: userProfile :type: object | null | undefined .. js:attribute:: vectorstore The id of its vectorstore. :type: number | null | undefined .. js:attribute:: version :type: string | null | undefined .. js:class:: Vectorstore A vectorstore: a vector database, hosted by Smarter or by a provider, for retrieval-augmented generation. A Zod schema, and the type of the same name that it validates. .. js:attribute:: annotations :type: JsonObject[] .. js:attribute:: backend e.g. qdrant or pinecone. :type: string | null | undefined .. js:attribute:: canDelete :type: boolean | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: deployedAt :type: string | null | undefined .. js:attribute:: description :type: string | null | undefined .. js:attribute:: dimension :type: number | null | undefined .. js:attribute:: documentCount :type: number | null | undefined .. js:attribute:: embeddingsModel :type: string | null | undefined .. js:attribute:: embeddingsProvider :type: string | null | undefined .. js:attribute:: endpointUrl :type: string | null | undefined .. js:attribute:: hashedId :type: string | null | undefined .. js:attribute:: hosting self_hosted or managed. :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: indexName :type: string | null | undefined .. js:attribute:: isActive :type: boolean | null | undefined .. js:attribute:: manifestUrl :type: string | null | undefined .. js:attribute:: metric :type: string | null | undefined .. js:attribute:: name :type: string .. js:attribute:: ready :type: boolean | null | undefined .. js:attribute:: snapshotCount :type: number | null | undefined .. js:attribute:: spec :type: JsonObject | null | undefined .. js:attribute:: status e.g. pending, ready or error. :type: string | null | undefined .. js:attribute:: statusMessage :type: string | null | undefined .. js:attribute:: tags :type: string[] .. js:attribute:: updatedAt :type: string | null | undefined .. js:attribute:: userProfile :type: object | null | undefined .. js:attribute:: vectorCount :type: number | null | undefined .. js:attribute:: version :type: string | null | undefined .. js:class:: VectorstoreDocument A document of a vectorstore: a file, a text or a url, split into chunks and embedded. A Zod schema, and the type of the same name that it validates. .. js:attribute:: chunkCount :type: number | null | undefined .. js:attribute:: contentType :type: string | null | undefined .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: metadata :type: JsonObject | null | undefined .. js:attribute:: name :type: string .. js:attribute:: source upload, text or url. :type: string | null | undefined .. js:attribute:: status e.g. pending, loaded, error or deleting. :type: string | null | undefined .. js:attribute:: updatedAt :type: string | null | undefined .. js:class:: VectorstoreDocumentDeleted A document that is being deleted, with its chunks. A Zod schema, and the type of the same name that it validates. .. js:attribute:: document :type: string .. js:attribute:: status :type: string .. js:class:: VectorstoreDocuments A vectorstore's documents. A Zod schema, and the type of the same name that it validates. .. js:attribute:: documents :type: object[] .. js:class:: VectorstoreDocumentsAdded The result of adding documents. Documents are loaded asynchronously, and only once the vectorstore is deployed: see ``queued``. A Zod schema, and the type of the same name that it validates. .. js:attribute:: documents :type: object[] .. js:attribute:: duplicates Documents that already existed. :type: object[] .. js:attribute:: message :type: string | null | undefined .. js:attribute:: queued :type: boolean .. js:class:: VectorstoreRestored The result of restoring a snapshot. A Zod schema, and the type of the same name that it validates. .. js:attribute:: restored :type: string .. js:attribute:: vectorCount :type: number | null | undefined .. js:attribute:: vectorstore :type: string .. js:class:: VectorstoreSearchResult A chunk that matched a search. A Zod schema, and the type of the same name that it validates. .. js:attribute:: id :type: JsonValue | null | undefined .. js:attribute:: metadata :type: JsonObject | null | undefined .. js:attribute:: score :type: number | null | undefined .. js:attribute:: text :type: string .. js:class:: VectorstoreSearchResults The chunks that matched a search, best first. A Zod schema, and the type of the same name that it validates. .. js:attribute:: results :type: object[] .. js:attribute:: vectorstore :type: string .. js:class:: VectorstoreSnapshot A snapshot of a vectorstore's data. A Zod schema, and the type of the same name that it validates. .. js:attribute:: createdAt :type: string | null | undefined .. js:attribute:: id :type: number .. js:attribute:: name :type: string | null | undefined .. js:attribute:: scheduled :type: boolean | null | undefined .. js:attribute:: sizeBytes :type: number | null | undefined .. js:attribute:: status :type: string | null | undefined .. js:class:: VectorstoreSnapshots A vectorstore's snapshots. A Zod schema, and the type of the same name that it validates. .. js:attribute:: snapshots :type: object[] .. js:class:: VectorstoreStatus A vectorstore's state, checked now. A Zod schema, and the type of the same name that it validates. .. js:attribute:: message :type: string | null | undefined .. js:attribute:: stats :type: JsonObject .. js:attribute:: status :type: string .. js:attribute:: vectorCount :type: number | null | undefined .. js:attribute:: vectorstore :type: string .. js:class:: WhoAmI The owner of the api key: the user, their account, and the platform's environment. A Zod schema, and the type of the same name that it validates. .. js:attribute:: account :type: object .. js:attribute:: environment The platform's environment, e.g. ``local`` or ``prod``. :type: string | null | undefined .. js:attribute:: user :type: object .. js:data:: ManifestInput A manifest, in any form that the SDK accepts: a ``Manifest``, an object (e.g. a typed SAM object), YAML or JSON text, or the path of a YAML or JSON file. :type: Manifest | Record | string | URL .. js:data:: ManifestTable A ``get`` result, with the names of its resources. :type: unknown