SDKs

Use Kival's typed client libraries to integrate applications and services.

Kival provides official SDKs for Rust and TypeScript. Both target the API-key-capable HTTP surface and use the same wire model as the server API.

Use an SDK when Kival is part of a long-running application or service and you want typed requests, responses, and errors without maintaining raw HTTP glue.

Rust

The Rust crate is kival-sdk.

[dependencies]
kival-sdk = "0.1"
use kival_sdk::{ClientBuilder, ClientError, WorkspaceListParams};

async fn example() -> Result<(), ClientError> {
    let client = ClientBuilder::new()
        .with_api_key(std::env::var("KIVAL_API_KEY").expect("KIVAL_API_KEY is required"))
        .connect("https://kival.example")?;

    let workspaces = client
        .list_workspaces(&WorkspaceListParams::default())
        .await?;

    println!("{}", workspaces.items.len());
    Ok(())
}

The default client is asynchronous and built around Reqwest and tower::Service. The SDK also supports Tower middleware and custom transports, making it possible to integrate tracing, policy, testing, or transport behavior at the client boundary.

Consumers that only need canonical API types can disable default features and use the wire model without pulling in the default HTTP client.

TypeScript

The TypeScript package is also kival-sdk.

pnpm add kival-sdk
import { createKivalClient } from "kival-sdk";

const client = createKivalClient({
  baseUrl: "https://kival.example",
  apiKey: process.env.KIVAL_API_KEY!,
});

const workspaces = await client.listWorkspaces();

The package uses Fetch and has no runtime dependencies. It supports both a client-oriented API and standalone actions, with custom fetch or transport hooks when the host application needs to control request behavior.

The default request timeout is 30 seconds. The SDK does not automatically retry requests.

Shared API semantics

The SDKs do not define a different Kival model. Authentication, scopes, workspace delegation, cursor pagination, optimistic object updates, error codes, and realtime behavior are the HTTP API contract and are documented in API.

Likewise, the SDKs expose the API-key-capable surface. Browser-session concerns such as passkey management, API-key creation, personal inbox state, favorites, and pins remain outside that surface.

Choosing an interface

Use an SDK when Kival is part of application code and type-safe integration is valuable. Use the CLI for shell composition and tool-using agents, or the raw API when you need direct control over HTTP or are integrating from another language.