@finalai/final-agent-provider
Pure configuration helpers for Final harnesses, computer/device sandboxes, and
channels. Import helpers from /harnesses, /sandboxes, or /channels/final.
/connections provides defineFinalConnection for session-scoped Final MCP access.
Optional Node ACP adapters are exposed under /runtime/*. Sandbox adapters use
the public Computers and Device APIs; the Computers transport is shared with
@finalai/computers. Runtime configuration and credentials are injected.
The computer and device sandboxes authenticate with the context's
credentials.computersAccess() and credentials.deviceAccess() ({ baseUrl, token });
without them they fail with credential_missing.
Authoring helpers produce manifest bindings. Select the matching /runtime/*
adapter when connecting your own CLI or ACP endpoint.
defineFinalConnection() requests the host's final binding at session start,
using the generic defineHostedConnection implementation. Its session grant still
goes through the usual credential broker. Existing calls with an explicit url
remain static. Hosts without a binding reader cannot run URL-free definitions;
see the repository's hosting guide for wiring requirements.
Hosted model references
The serverless Final, Pi, Codex and Claude helpers accept model strings, including provider-qualified references such as openrouter/deepseek/deepseek-v4.1-flash. Existing short model IDs remain valid aliases when the installed platform catalog supports them. The SDK checks printable ASCII reference syntax (up to 200 characters); the installed platform selects defaults, validates availability and supplies model picker suggestions. Omitting model inherits the platform default. Host integrators must now handle serverless*ConfigSchema.parse(...).model being undefined and resolve the default before dispatch. Local compilation does not fetch a model catalog.
Adding a model on an already-supported provider API requires a platform catalog update, not an SDK release. Native nanocode models must use an engine policy the platform supports. New provider protocols still require an integration.
The modelZod(ids) and modelJson(ids, defaultId) helpers retain explicit restrictions for third-party harness authors who choose to supply them.
SDK 0.2.0 removes @finalai/agents/models and @finalai/final-agent-provider/harnesses/models, including their model arrays, defaults, model-ID unions and pricing helpers. Use string model references and the installed platform’s harness description for current candidates and defaults. Pricing belongs to the hosting platform. The protocol-level ModelVendor enum remains available from @finalai/final-agent-provider/harnesses.
Workspace Device egress
/sandboxes/egress supplies provider-neutral Linux TCP/UDP/DNS routing through approved Final Devices. Hosts compose createWorkspaceDeviceNetworking({ api, needed }) through the generic provider networking option. They supply stable logical workspace identity, durable networking registration, the current actor, and the raw privileged sandbox session. Preserve the direct policy before boot fencing; restore it on Disable. Configure and Disable ask for consent by default.
The integration reference specifies required hooks, boot/resume fallback, binding authority, teardown, MCP transports, failure behavior, prerequisites, and provider acceptance. Read it before enabling this capability. Final Computer and Daytona use their public APIs; custom providers can compose the same controller and manager.
In 0.4, passive Computer recovery follows the read-only viewer contract even without a networking extension. Use ordinary resume for execution. The bundled adapters cache deferred setup failures per handle; reconnect to retry rather than replaying partially completed user setup commands on each MCP poll.