Dropstone SDK
A typed TypeScript and JavaScript client for the Dropstone agent, with two entry points: one for headless API calls from CI or a serverless function, one that runs the agent locally with the same account memory as the CLI and Chat.
The Dropstone SDK is a typed TypeScript and JavaScript client for the Dropstone agent runtime. It gives your code programmatic access to the same agent that runs in Dropstone Chat and the CLI: sessions, tools, streaming replies, and structured output.
npm install @blankline/dropstone-sdk
The method reference is at docs.dropstone.io/cli/sdk. This page is the overview, and Install and run your first session is the walkthrough.
Two entry points
The SDK ships two clients, and which one you want is decided by where your code runs.
| Headless API client | Local agent client | |
|---|---|---|
| Import | createDropstoneApi | createDropstone |
| Talks to | api.dropstone.io/api/v1 | a dropstone serve process it starts for you |
| Authenticates with | an API key | the CLI's sign-in on the same machine |
| Billed | pay-per-use from your credit balance | your weekly allowance, like the CLI |
| Your memory | No. It is a stateless completions endpoint | Yes, the account memory Chat and the CLI use |
| Use it for | CI, jobs, serverless, any host without the CLI | embedding the interactive agent in a Node app |
Two more entry points come with it: createDropstoneClient points the same typed client at a server you are already running, and createDropstoneTui launches the interactive terminal UI from a Node process.
One memory, everywhere
A local session runs as your account, so it starts with everything Dropstone has learned on your other surfaces. A rule you set in Chat holds in code that runs through the SDK, and what a session records is there the next time you open the CLI. See One memory across every surface.
The headless client is deliberately the opposite: a stateless, OpenAI-compatible completions endpoint with no memory attached, so a pipeline gets predictable input and output. See Using the API with your plan.
Typed end to end
Requests, responses, streaming events and tool calls are generated from the server's OpenAPI specification, so an editor completes them and a compiler checks them. Two surfaces ship in the one package: a stable v1 client, and a v2 client at @blankline/dropstone-sdk/v2 with a richer resource model for files and workspaces. New endpoints land on v2.
Requirements
- Node.js
- For the local agent client, the Dropstone CLI on the same machine, signed in with
dropstone login - For the headless client, an API key and a funded credit balance
Getting help
The CLI reference is the first stop for method-level questions. For account, billing or access problems, see How to get support.
Related articles
- Install and run your first sessionInstall the Dropstone SDK, make a headless API call with an API key, and run a local agent session that carries your account memory. Includes streaming, structured output, and using the OpenAI SDK against Dropstone.
- Using the API with your planCall Dropstone over HTTP with an API key. The endpoint is OpenAI-compatible, billed pay-per-use from your credit balance, and works from any language. Keys, errors, rate limits, and what the API does not carry.
- One memory across every surfaceThe account memory that follows you across Dropstone Chat, the CLI, and the SDK, what shares it and what does not, and how to keep an integration's learning out of your own memory.
- Install the CLIInstall the Dropstone CLI on macOS, Linux, or Windows with one command, sign in, and check it works. Upgrading and uninstalling.
- Memory across chat, CLI, and SDKDropstone memory belongs to your account, not to one app. A rule you set in the CLI applies in chat, and something learned in chat is available to the SDK. One memory, every surface.