Attrove Workflows Connect Goals Docs Pricing
Quickstart API Reference TypeScript SDK MCP Server

Attrove Quickstart — get running in 5 minutes

Three steps to give your AI product access to your users' email, Slack, calendar, and meetings. Examples in TypeScript, Python, and cURL.

What you'll build

In 5 minutes, your app will be able to make one API call and get this back:

> attrove.query("What are the key action items from last week?")

"Sarah needs your feedback on Q2 OKRs by Friday. Mike flagged a blocking
issue in #engineering that needs triage. Design mockups for the onboarding
flow need sign-off before sprint planning."

1.2s · 3 email threads · 2 Slack channels · 1 meeting transcript

Two paths

Fastest: CLI + MCP. Run npx @attrove/cli install claude-code, open Claude Code, Cursor, or Claude Desktop, and complete OAuth on first use. No code or secret copy/paste needed. See the CLI + MCP guide.

Production: SDK integration. Follow the 3 steps below to integrate Attrove into your product and ship to your users.

Verify the first useful answer

Install success only means the client can see Attrove. The activation check is a source-backed answer from connected context. First prompt: "Use Attrove to list my connected integrations." Then ask: "What needs my attention this week? Include the source messages or meetings you used."

Prerequisites

  • An Attrove partner account: sign up free
  • Your client_id and client_secret from the dashboard
  • Node.js 18+ (for TypeScript SDK) or any HTTP client

Step 1: Install & provision a user

Add the SDK and create an end user. You get back an sk_ token scoped to that user.

npm install @attrove/sdk

import { Attrove } from '@attrove/sdk';

const admin = Attrove.admin({
  clientId: 'your-client-id',
  clientSecret: process.env.ATTROVE_CLIENT_SECRET!,
});

const { id, apiKey } = await admin.users.create({
  email: 'user@example.com',
  firstName: 'Jane',
  lastName: 'Doe',
});

console.log(apiKey); // sk_...

HTTP equivalent: POST https://api.attrove.com/v1/users with Authorization: Bearer $ATTROVE_CLIENT_SECRET, X-Auth-Type: partner, and a JSON body containing client_id, email, first_name, last_name.

Step 2: Connect their integrations

Create a durable connect session, redirect your user, and they connect Gmail, Slack, Calendar, or other apps in one click.

// Create a durable connect session
const session = await admin.users.createConnectSession(id, {
  provider: 'gmail',
  display: 'popup',
  includeInstall: true,
});

// Redirect user to the connect page
const connectUrl = session.activation_url;
// Terminal/agent handoff: session.cli?.command
// → User connects Gmail, Slack, Calendar, etc.

HTTP equivalent: POST https://api.attrove.com/v1/users/:user_id/connect-sessions with partner auth headers.

Step 3: Query their data

That's it. One API call returns AI-powered answers from their email, Slack, calendar, and meetings.

import { Attrove } from '@attrove/sdk';

const attrove = new Attrove({
  apiKey: process.env.ATTROVE_SECRET_KEY!,  // sk_ token from user creation
  userId,
});

// Ask a natural language question and include sources
const response = await attrove.query(
  'What needs my attention this week? Include the source messages or meetings you used.',
  { includeSources: true },
);

console.log(response.answer);

// Or run a semantic search
const results = await attrove.search('project deadline discussions', {
  includeBodyText: true,
});

HTTP equivalents: POST https://api.attrove.com/v1/users/:user_id/query and POST https://api.attrove.com/v1/users/:user_id/search with Authorization: Bearer sk_....

What the API returns

A single POST to /query returns a structured response with the AI answer, source snippets, and the IDs used to ground the answer.

{
  "success": true,
  "data": {
    "answer": "Sarah needs your feedback on Q2 OKRs by Friday...",
    "history": [],
    "sources": [
      { "title": "Q2 OKRs", "snippet": "Can you send feedback by Friday?" },
      { "title": "Sprint Planning", "snippet": "Blocking issue in checkout..." }
    ],
    "used_message_ids": ["msg_a1b2c3", "msg_d4e5f6"],
    "used_meeting_ids": ["mtg_g7h8i9"],
    "used_event_ids": [],
    "used_note_ids": []
  }
}

Next steps

  • API Reference — explore all endpoints
  • MCP Integration — use with Claude & Cursor