Quickstart: start in your agent
Two doors, one line each. Use Attrove yourself in about two minutes, or paste one prompt and let your coding agent build it into your product. Nobody has to open a dashboard.
Use it yourself
- Run the install for your agent:
npx @attrove/cli install claude-code,npx @attrove/cli install cursor,npx @attrove/cli install codex(thencodex mcp login attrove), ornpx @attrove/cli install claude-desktop. ChatGPT and other remote MCP clients usehttps://api.attrove.com/mcpdirectly. - Open the agent and sign in once when it asks. Your workspace is created on the spot.
- Ask: "What needs my attention this week? Include the source messages or meetings you used."
Nothing connected yet? The agent calls attrove_connect and hands you one link to connect Gmail, Outlook, Slack, or your calendar, then picks up where you left off.
Build it into your product
Paste this into your coding agent:
Integrate Attrove into this app. Read https://attrove.com/llms.txt first, then provision a user, create a connect session so they can link Gmail, Slack, and calendar, and watch one Goal that alerts when a renewal goes quiet.
What your agent will find: llms.txt, llms-full.txt, SKILL.md, the agent card, the OpenAPI spec, and runnable examples.
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."
Prefer to write it yourself?
Four steps in TypeScript, Python, or cURL follow.
Prerequisites
- An Attrove partner account: sign up free
- Your
client_idandclient_secretfrom 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 through one link.
// 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_....
Step 4: Watch your first outcome
Queries answer what already happened. Goals watch what happens next: create one with a silence condition, subscribe a webhook, and Attrove tells you when the work goes quiet, with the evidence attached.
// Watch an outcome, not an inbox
const goal = await attrove.goals.create({
title: 'Renewal closed by Jun 30',
watchScope: {
seedQuery: 'renewal',
silenceCondition: { quietAfterDays: 5 },
},
});
// Get told when it goes quiet (admin client from step 1)
await admin.webhooks.create({
url: 'https://your-app.example.com/webhooks/attrove',
eventTypes: ['goals.risk_detected'],
userIds: [id],
});
// Close this terminal. Attrove is still watching.
The webhook endpoint receives a signed goals.risk_detected event with the goal, a health snapshot, and cited evidence. See the runnable receiver.
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