Quickstart

Five minutes. One agent. Voice, chat, and WhatsApp. No call center, no plumbing, just a prompt and a key.

Prerequisites

Node 18+ (or Python 3.11+, your call), and a Saaya workspace. If you don't have a workspace yet, request access first.

1. Create your workspace

Sign in at app.saaya.ai. The first thing you'll see is a workspace picker, pick one or create a new one. Workspaces are how Saaya isolates billing, RBAC, and data.

2. Install the SDK

The TypeScript SDK is the canonical client. A Python SDK ships with the same surface area.

terminal
npm install @saaya/sdk
# or
pnpm add @saaya/sdk
# or
bun add @saaya/sdk

3. Set your API key

Generate a key from Settings → API Keys in the dashboard. Keys are scoped to a workspace and respect RBAC, never commit them.

.env
# .env
SAAYA_API_KEY=sk_live_...

4. Define your first agent

Saaya agents are versioned configs. The minimum viable agent has a name, a prompt, and a voice, Saaya picks reasonable defaults for everything else.

create-agent.ts
import { Saaya } from "@saaya/sdk";

const saaya = new Saaya({ apiKey: process.env.SAAYA_API_KEY });

const agent = await saaya.agents.create({
  name: "Maya, Pipeline Concierge",
  prompt: `
    You're Maya. You qualify inbound interest for Saaya.
    Voice is warm, direct, and a little dry.
    Always finish a discovery call by booking the next step.
  `,
  voice: { provider: "elevenlabs", voiceId: "rachel" },
  llm:   { provider: "anthropic", model: "claude-opus-4-7" },
  channels: ["voice", "chat", "whatsapp"],
});

console.log(`Agent ready: ${agent.id}`);

Heads up

The first create call also publishes a draft version. Pull the agent into the dashboard to tune voice, knowledge bases, and tools visually, or stay in code.

5. Test it

You can test the same agent on voice, chat, or WhatsApp without deploying.

On voice:

test-voice.ts
// Place a test call to your phone, Saaya will route the call
// to your agent and dial back when ready.
await saaya.sessions.testCall({
  agentId: agent.id,
  toNumber: "+919876543210",
});

On chat:

test-chat.ts
const session = await saaya.sessions.create({ agentId: agent.id, channel: "chat" });
const reply   = await saaya.sessions.send(session.id, "Hi, what does Saaya do?");
console.log(reply.text);

6. Deploy it

Publishing an agent attaches it to a phone number, a chat widget, or a WhatsApp business number. Saaya handles routing on every channel.

deploy.ts
await saaya.agents.publish(agent.id, {
  // Attach the production phone number you configured in the dashboard.
  phoneNumberId: "ph_2N3rH...",
  // (Optional) bind a chat widget to your domain.
  webChat: { allowedOrigins: ["https://acme.com"] },
});

Coming back to a published agent?

Edits roll out as draft versions. Promote to production with saaya.agents.promote(versionId) , and roll back with saaya.agents.rollback(versionId) if a release misbehaves.

7. Where to next

That's it, you have a live agent. From here, the path branches based on what you're building:

  • API reference , drop the SDK, talk to the API directly, get every endpoint.
  • MCP endpoint , let Claude or Cursor query your sessions and KBs.
  • Knowledge bases , ground every answer in your sources, with strict citations.
  • Campaigns , bulk dispatch, retries, fallbacks across channels.
Was this page helpful?