Skip to content

Quickstart

In ten minutes you’ll create a workspace for a customer, give it an agent, and start a run, all from your backend with an API key.

  1. 1API keyA Sandbox key from the Console
  2. 2ModelConnect a provider, pick a default
  3. 3WorkspaceOne per customer of yours
  4. 4AgentInstructions and a model
  5. 5RunStart it, read its events

You need your Zupflow API URL and access to the Console. Every example uses $ZUPFLOW_URL for the API URL.

  1. Create a Sandbox API key. In the Console, open Developers → API keys and create a key for Sandbox. Copy the secret now: it’s shown once. Sandbox keys start with zf_test_.

  2. Give Sandbox a model. Under Developers → Model providers, connect a provider with your own key (OpenAI, Anthropic or OpenRouter), add one of its models and make it Sandbox’s default. Agents without a model of their own use it.

  3. Create a workspace for a customer, with your own ID for them as external_id.

    import { createClient, createHttpTransport } from "@zupflow/sdk";
    const zupflow = createClient(
    createHttpTransport({
    baseUrl: process.env.ZUPFLOW_URL!,
    getToken: async () => process.env.ZUPFLOW_API_KEY!,
    }),
    );
    const workspace = await zupflow.workspaces.create(organizationId, {
    name: "Acme Corp",
    slug: "acme",
    environment: "sandbox",
    external_id: "cus_1042",
    });
  4. Create an agent in that workspace.

    const agent = await zupflow.agents.create(workspace.id, {
    name: "Planner",
    description: "Plans the team's week.",
    instructions: "You help the team plan their week. Be brief.",
    model_id: null, // Sandbox's default model
    });
  5. Start a run and read what happened.

    const run = await zupflow.runs.create(workspace.id, agent.id, { input: "Hello" });
    // Later, or when the run.completed webhook arrives:
    const events = await zupflow.runs.events(workspace.id, run.id);
    const done = await zupflow.runs.get(workspace.id, run.id);
    console.log(done.status, done.output);

    You can also watch it in the Console under Runs.