Exponential SDK

Build on your workspace in TypeScript.

exponential-sdk is the typed client that the CLI and the MCP server are built on. Use it to write your own scripts, services and agents against actions, projects, goals and key results, meetings, decisions, the product backlog, Knowledge pages, the CRM and more, with a personal token or an agent's key.

What you can do with the SDK

  • await client.workspaces.list()
  • await client.actions.getToday(workspaceId)
  • await client.projects.list({ workspaceId })
  • await client.decisions.create({ workspaceId, statement, status: "ACCEPTED", source: "AGENT" })
  • await client.users.me()
  • await client.positions.list(workspaceId)

How to set up the SDK

  1. 1

    Install it

    The SDK is the exponential-sdk package on npm.

    npm install exponential-sdk
  2. 2

    Create a token

    Create a JWT token under Settings → API keys for a script that acts as you, or an agent under Settings → Agents for software that should be attributed separately.

  3. 3

    Create a client and make a call

    Point apiUrl at exponential.im, or at your own installation.

    import { ExponentialClient } from "exponential-sdk";
    
    const client = new ExponentialClient({
      token: process.env.EXPONENTIAL_TOKEN!,
      apiUrl: "https://www.exponential.im",
    });
    
    const workspaces = await client.workspaces.list();
    const today = await client.actions.getToday(workspaces[0]!.id);
  4. 4

    Share the sign-in with the CLI

    saveConfig and loadConfig keep the token and address in the same store the CLI and the MCP server use, so all three see the same workspace.

What the client covers

One namespace per object, as you call it on the client.

workspacesusers
Your workspaces, and who the token signs in as
projectsactionsactionComments
Projects, actions and their comments
goalskeyResults
Objectives and key results
meetingsdecisionscalendar
Meetings, the decision log and calendar events
productsfeaturesscopesrequirementsuserStoriesticketsepicscycleslabelsareas
The product backlog, from features to tickets and cycles
pagesdatabases
Knowledge pages and the tables inside them
contactsorganizationspipelines
The CRM and the deal pipeline
positions
A workspace's roles and responsibilities
search
Search across everything

Why use the SDK

The client everything else uses

The CLI and the MCP server are built on this SDK, so anything they can do, your code can do too.

Typed end to end

Requests and responses are typed. API errors are thrown, and isTRPCError(error) tells them apart from other failures and carries the server's message.

Personal token or agent key

Act as yourself with a JWT token, or give your software an agent's exp_agent_ key so its work is attributed to the agent.

Open source

The SDK is AGPL-3.0 on npm and GitHub, like Exponential itself, and works against exponential.im or your own installation.

Exponential SDK FAQ

Can I use it from Python or another language?

Not through the SDK, which is TypeScript. Other languages can call the same HTTP API with the bearer token.

Does it work with a self-hosted installation?

Yes. Set apiUrl to that installation's address.

Should my script use a personal token or an agent key?

Use a personal token when the script should act as you. Use an agent key when it is software doing its own work, so its changes are attributed to the agent and limited to its workspaces.

Is it free?

Yes. The SDK is open source (AGPL-3.0) on npm, and Exponential is free to start.

Related

Get started with the SDK

Free to start. Open source. Set up in a couple of minutes.

Get started free