Skip to content

DotCraft SDKs ​

Use a DotCraft SDK to connect an application to AppServer. Start with the high-level API for threads, runs, tools, approvals, and user input.

DotCraft SDK layers and connection: your app starts at the high-level API, which builds on the wire layer and the generated contracts; locally, Hub ensures the workspace AppServer while the SDK connects to that AppServer directly and reaches the session core

Start here ​

Inside a DotCraft conversation, $dotcraft-api routes SDK questions to the latest official documentation and checks code against installed public types.

Choose an API layer ​

LayerUse it for
High-levelApplications that work with DotCraft, threads, runs, callbacks, models, MCP runtime, or App Binding. Start here.
WireTyped JSON-RPC, connection state, timeouts, and explicit raw extension calls.
ContractsGenerated DTOs, method maps, registries, and protocol metadata without transport I/O.

Channel adapters build on these layers. A Channel module packages an adapter with discovery, configuration, and lifecycle metadata so DotCraft hosts such as Desktop can load it.

Packages ​

LanguagePackageAvailability
TypeScript@dotcraft/sdkPublished on npm.
.NETDotCraft.SdkPublished on NuGet.

The Quickstart is the single source for installation commands.

Common capabilities ​

TaskTypeScript.NET
Connect to a workspaceDotCraft.local()ConnectLocalAsync()
Connect to default ChatDotCraft.localChat()ConnectLocalChatAsync()
Connect remotelyDotCraft.remote()ConnectRemoteAsync()
Run a turnrun() / runStreamed()RunAsync() / RunStreamedAsync()
Read history pageslistTurns() / listItems()ListTurnsAsync() / ListItemsAsync()
List modelsmodels.list()Models.GetCatalogAsync()
Use MCP runtimemcpRuntimeMcpRuntime
Use App BindingappBindingsAppBindings

TypeScript also provides a Channel Adapter profile. .NET does not.

Connection ownership ​

A local high-level client asks Hub to ensure the workspace AppServer, then connects to AppServer directly. Closing the SDK connection does not stop a Hub-managed AppServer.

Reconnect restores Wire transport and initialization. It does not replay in-flight requests or rebuild thread subscriptions, active runs, or runtime tool bindings. See Threads & runs for recovery steps.

Language reference ​

  • AppServer mode — how the AppServer an SDK connects to is started, secured, and exposed over WebSocket.
  • AppServer Protocol — the methods and notifications these clients speak.
  • DotCraft App — App Binding, for applications that expose their own capabilities to a thread.