Skip to content

Build a provider integration

An adapter connects a provider’s native API to Beachside. Install @beachside/adapter from npm to build and test it.

If your agent supports skills, install the add-provider skill in the adapter’s repository instead; it carries the same guidance and loads when the agent needs it:

Terminal window
npx skills add pandemicsyn/beachside --skill add-provider

Otherwise, replace the bracketed fields and copy this prompt into an agent with access to the integration repository.

Provider integration prompt
Implement a Beachside adapter for [provider] in [repository or package].
The requested operations are [create, destroy, inspect, exec, files, etc.].
Distribution: [a separately installed official or third-party adapter package].
Read the current Beachside authoring docs and tested examples:
- https://beachside.run/docs/guides/write-an-adapter/
- https://beachside.run/docs/guides/adapter-capabilities/
- https://beachside.run/docs/guides/adapter-recovery/
- https://beachside.run/docs/contributing/drivers/
- https://github.com/pandemicsyn/beachside/tree/main/apps/docs/examples
If working in the Beachside repository, follow AGENTS.md and the
.agents/skills/add-provider/SKILL.md workflow. Use current exported types
and tests as the implementation authority, not archived proposals.
Inspect the provider's official API documentation and the exact native
SDK version. Implement defineAdapter from "@beachside/adapter". Keep the
adapter independent of Beachside internals. Separate configuration from
credentials, verify native identity with authenticated read-only IO,
and include identity-relevant routing partitions in the returned scope.
Implement create and destroy, then add only capabilities backed by native
guarantees. Disable hidden mutation retries. Preserve argv, binary bytes,
output bounds, and atomic no-clobber semantics where advertised. Confirm
compute termination before reporting success. Release owned clients on
close without implying that close destroys compute.
When snapshot capture is in scope, follow the current state-portability
spec at https://github.com/pandemicsyn/beachside/blob/main/specs/provider-state-portability.md:
no-argument snapshot() uses sensible native defaults, with required
lifecycle orchestration owned by the adapter. Expose options only for real
choices. Document each provider's capture scope, memory inclusion, source
process/connection effects, restore behavior, options, and partial failures.
Report actual guarantees; reject unsupported strict requirements before
effects. Do not emulate snapshots with archives or invent native choices.
For asynchronous work, use read-only prepare, one submit, and read-only
observe with versioned recovery tokens. A lost response is not proof of
failure. Recovery must never replay a mutation. Keep secrets and native
logs out of public errors, tokens, and committed evidence.
Build an injectable native boundary and deterministic tests. Run
adapterSuite from "@beachside/adapter/testing" and verify actual outbound
attempt counts, scope separation, binary fidelity, uncertain outcomes,
cleanup, and supported recovery. Qualify packed artifacts with an external
TypeScript consumer and the supported runtimes.
Document configuration, credentials, image/network requirements,
capabilities, and limitations. Distinguish fixture tests, package tests,
and live evidence in the provider support matrix. Get explicit approval
for a bounded live test and owned-resource cleanup before using paid
resources. Do not publish the package without authorization.
Finish with the implementation, usage example, validation results,
and a precise list of unsupported or untested behavior.

For a separately distributed adapter, consumers install its package alongside beachside and pass the exported definition to Beachside.connect({ adapter, config, credentials }). Official adapters use the same contract and form; each also exports an optional factory, built with bindAdapter, that takes credentials and config in one object.