# Introduction What PandaDesk is, what it does for your customers and your team, and how the pieces fit together. PandaDesk puts an AI support chat on your website. It answers visitors from your own content (your docs site, files, help-center articles and pinned answers) and hands the conversation to your team when it can't. ## What you get | Piece | What it does | |---|---| | **Chat widget** | One script tag adds a chat bubble to your site. Visitors ask questions and get answers in seconds. See [Install the chat](/docs/install-chat). | | **AI agent** | Searches your knowledge, answers with what it finds, asks one clarifying question when a detail is missing, and offers your team when the answer isn't there. See [AI agent](/docs/ai-agent). | | **Knowledge sources** | Crawls your docs or marketing site and imports PDF, Markdown, DOCX and TXT files, so answers come from your own words. See [Knowledge sources](/docs/knowledge-sources). | | **Help center** | A public help center for each app at `https://pandadesk.app/h/`, built from your articles. See [Help center](/docs/help-center). | | **Team inbox** | Conversations the AI handed off, with an AI summary, assignment, labels, private notes, saved replies, contacts and customer ratings. See [Inbox](/docs/inbox). | | **Reports, webhooks, business hours** | How the AI and your team are doing, events sent to your own systems, and away messages outside your hours. | | **Coding-agent access** | Claude Code, Cursor, Codex and Claude Desktop can set up and run PandaDesk for you through the MCP server, and every action is also a terminal command (`npx pandadesk`). See [Connect your AI agent](/docs/connect-ai-agent). | ## How an answer happens 1. A visitor asks a question in the chat on your site. 2. The AI agent searches your knowledge and writes a reply that cites what it found. An answer that doesn't cite your content is never sent. 3. If your content doesn't cover it, the agent says so and offers to pass the question to your team. If the visitor asks for a person, it hands off right away. 4. Your team gets an email alert and replies from the inbox. The visitor sees the reply in the same chat. 5. Questions the AI couldn't answer collect under **Not answered**, so you know what to write next. > **Note:** The AI only answers from what you give it: published articles, enabled pinned answers and imported sources. It doesn't use general web knowledge about your product. ## Where to start - **Fastest:** [Connect your AI agent](/docs/connect-ai-agent) and tell it "Set up PandaDesk support chat on this site." - **By hand:** follow the [Quickstart](/docs/quickstart) in the dashboard. It takes a few minutes. - **New to the terms?** Read [Concepts](/docs/concepts). --- # Quickstart Go from sign-up to a live AI support chat on your site, either with your coding agent or step by step in the dashboard. This guide takes you from a new account to a working chat on your site. Pick one path: let your coding agent do it, or click through the dashboard. ## 1. Sign up 1. Go to [pandadesk.app/signup](https://pandadesk.app/signup). 2. Enter your name, email, a password (at least 8 characters) and your company or app name. 3. Choose **Continue to payment details** and add a card in Stripe Checkout. Your first subscription starts with a 14-day free trial. The card is charged when the trial ends, and you can cancel before then. See [Plans and billing](/docs/plans-and-billing). After checkout you land on **Setup**, which walks through six steps: | # | Step | Done when | |---|---|---| | 1 | Name and style your chat | You save your app's name, brand color and greeting | | 2 | Connect your coding agent | Your agent connects with a token, or you choose **Set up here instead** | | 3 | Teach it what you know | At least one source page, file, published article or pinned answer is searchable | | 4 | Ask it a question | The AI has answered a question from your content | | 5 | Allow your website | At least one website is allowed to show the chat | | 6 | Add the chat to your site | The chat has loaded on one of your allowed websites | Every step except the first is checked against real data, so a step only ticks when the thing has actually happened. ## Path A: let your coding agent set it up This is the quickest path if you use Claude Code, Cursor, Codex or Claude Desktop. 1. In Setup step 2 (or **Connect AI agent** in the sidebar), pick your agent's tab and run what it shows. For Claude Code that's: ```bash claude mcp add --transport http --scope user pandadesk https://pandadesk.app/api/mcp mkdir -p ~/.claude/skills/pandadesk && curl -fsSL https://pandadesk.app/skill/SKILL.md -o ~/.claude/skills/pandadesk/SKILL.md ``` 2. Sign in: in Claude Code type `/mcp`, pick **pandadesk**, choose **Authenticate**, and click **Allow** in the browser. There's no token to copy. Setup step 2 ticks as soon as the agent connects. 3. Open your project and say: ```text Set up PandaDesk support chat on this site. ``` The agent then: - picks or creates the workspace; - imports your docs site and the customer-facing docs in your repo, and waits until they're searchable; - matches the chat to your brand and adds starter questions; - allows your production and local dev websites; - adds the snippet to your code in the right place for your framework, and can set up [signed identity](/docs/signed-identity) for logged-in users; - tests a few real questions, then checks the chat is live once you deploy. The Setup steps tick off as it works. Details for every agent are in [Connect your AI agent](/docs/connect-ai-agent). ## Path B: set it up in the dashboard 1. **Name and style.** Enter your app's name, brand color and the greeting visitors see first. You can change all of it later under [Chat appearance](/docs/chat-appearance). 2. **Connect your coding agent.** Choose **Set up here instead** to skip it. You can connect an agent any time. 3. **Teach it what you know.** - Enter your docs site's URL (or its `sitemap.xml`) to crawl it. - Upload PDF, Markdown, DOCX or TXT files. - Imports run in the background. See [Knowledge sources](/docs/knowledge-sources). 4. **Ask it a question.** Use the test chat on the page. Ask the way a customer would, in your own words. **Start over** gives you a fresh test conversation. 5. **Allow your website.** Enter the address your chat will run on, e.g. `https://example.com`. A bare domain also covers `www.`. Add `http://localhost:3000` (or your dev port) to try it locally. 6. **Add the chat to your site.** Paste the script tag before ``: ```html ``` The page shows your real key. Deploy, then open a page of your site. The step completes the first time the chat loads there. See [Install the chat](/docs/install-chat) for framework-specific snippets, the JavaScript API and troubleshooting. ## Next steps - Set [response guidelines, guardrails and scenarios](/docs/ai-agent) for the AI. - Identify logged-in users with [signed identity](/docs/signed-identity). - Invite your team: see [Team and roles](/docs/team-and-roles). - Check **Not answered** regularly and turn common questions into pinned answers or articles. --- # Concepts The handful of terms PandaDesk uses (workspaces, knowledge, hand-offs, conversation statuses, contacts and tokens) and how they relate. A short glossary of the terms you'll see across the dashboard, the docs and the MCP tools. ## Account and workspaces - **Account.** You, signed in with your email. Your plan belongs to your account and covers every workspace you own. - **Workspace** (also called an **app**). One website or product. Each has its own knowledge, chat, help center, inbox, team and settings. Your plan sets how many you can own: 3 on Starter, 10 on Pro. - **Slug.** The workspace's short name in URLs, e.g. `my-app` in `https://pandadesk.app/app/my-app` and `https://pandadesk.app/h/my-app`. MCP tools and CLI commands take it as `workspace`. - **Public key.** The `pk_…` value in your embed snippet. It identifies the workspace and is safe to put in page HTML. ## The chat - **Chat widget** (messenger). The bubble and chat window on your site, added with one script tag. See [Install the chat](/docs/install-chat). - **Allowed websites.** The origins (`https://example.com`, `http://localhost:3000`) where the chat may load. It refuses to load anywhere else. A bare domain also covers its `www.` version. See [Security and privacy](/docs/security-and-privacy). - **Visitor.** Anyone chatting. Without signed identity they're anonymous and get a stable label like "Visitor 4F2A". - **Signed identity.** Your backend signs who is logged in, so the team sees a verified name and email, the person sees their conversations on any device, and [lookups](/docs/lookups) can fetch their own data. See [Signed identity](/docs/signed-identity). ## Knowledge The AI only answers from these: - **Sources.** Websites PandaDesk crawls (re-synced daily) and files you upload (PDF, Markdown, DOCX, TXT). Each page or file becomes a **document**, split into searchable **passages**. - **Articles.** Pages you write in PandaDesk. Published ones appear in your [help center](/docs/help-center) and are used for answers. Drafts aren't. - **Pinned answers.** Your exact wording for a specific question. When a visitor asks that question as written, PandaDesk replies with it directly. Pinned answers also win over other passages when they disagree. - **Not answered** (gaps). Questions the AI couldn't answer, counted and grouped, so you know what to add. - **Search by meaning.** PandaDesk matches questions to passages by meaning as well as by keyword, so "when could I be living there?" can find a page about "the whole process takes six months". ## Conversations - **Hand-off.** The AI passes a conversation to your team: when the visitor asks for a person, accepts the AI's offer, or after two questions in a row it couldn't answer. Your team gets an email alert, and the conversation gets an AI-written summary. - **Statuses:** | Status | Meaning | |---|---| | AI handling | The AI is answering; your team hasn't been needed | | Open | Waiting for your team | | Pending | Your team replied and is waiting for the customer | | Snoozed | Hidden until a time you pick, or until the customer writes again | | Resolved | Done. The customer is asked for a rating. A new message reopens it | - **Private note.** A note on a conversation or contact that only your team sees. Notes are never shown to visitors or returned by the public chat API. - **Contact.** A person who has chatted, with their identity, last visit (page, browser, local time), conversation history and team notes. You can block a contact. See [Contacts](/docs/contacts). - **CSAT.** The 1–5 rating a customer gives after a conversation is resolved. See [CSAT](/docs/csat). ## Usage - **AI answer.** One AI reply to one customer message, however many searches it took. These count against your plan's monthly allowance (1,500 on Starter, 7,500 on Pro, across all your apps). Pinned answers, cached repeats and small talk ("hi", "thanks") are free. When the allowance runs out, new questions go straight to your inbox until the month resets. - **AI answers per day.** A per-workspace safety cap (500 by default), set under Settings → Security. After that many AI answers in a day, new questions go straight to your team. ## Tokens - **Connected app.** A coding agent you approved in the browser (OAuth). It acts as you, in every workspace you belong to, and can create new ones. Disconnect it any time under **Connect AI agent → Connected apps**. - **Personal token** (`pda_…`). For the CLI, scripts and agents that can't open a browser. Created under **Connect AI agent → Use a token instead**, with the same reach as a connected app. It's shown once; revoke it any time on the same page. - **Workspace token** (`pd_…`). An older kind, created by admins under Settings, scoped to one workspace. It still works. - **Signing secret.** Signs webhook and lookup requests so your servers can check they came from PandaDesk. See [Webhooks](/docs/webhooks). - **Identity secret.** Signs your logged-in users for [signed identity](/docs/signed-identity). Keep it on your server only. --- # Connect your AI agent Let Claude Code, Cursor, Codex or Claude Desktop set up and run PandaDesk through the MCP server, plus the PandaDesk skill and CLI. Everything you can do in the dashboard, a coding agent can do from your editor. It can set up a workspace, import your docs, style the chat, add it to your code, check it's live, tune the AI and work the inbox. It connects to the PandaDesk MCP server at `https://pandadesk.app/api/mcp`. You sign in once in your browser; there's no token to copy. ## What your agent can do - **Set up:** create workspaces, import your site and docs, write articles and pinned answers, watch indexing. - **Style:** brand color, greeting, bot name and avatar, starter questions, the bubble and its corner. - **Install:** - get the embed code for your framework; - wire up [signed identity](/docs/signed-identity) for logged-in users; - allow your domains; - check the chat is live. - **Tune:** guidelines, guardrails, scenarios and [lookups](/docs/lookups) for the AI. Test questions before customers ask them. - **Inbox (Pro):** conversations waiting for a person, replies or drafts, notes, labels, assignment, contacts and reports. The full list of tools is in the [MCP reference](/docs/mcp-reference). ## 1. Connect your agent Add PandaDesk to your agent with one command (or one setting). The first time it connects, it opens PandaDesk in your browser. You sign in if needed, check what it's asking for, and click **Allow**. The dashboard's **Connect AI agent** page (also step 2 of Setup for new accounts) shows the same steps. ### Claude Code ```bash claude mcp add --transport http --scope user pandadesk https://pandadesk.app/api/mcp ``` Then in Claude Code type `/mcp`, pick **pandadesk** and choose **Authenticate**. Your browser opens; click **Allow**. Optionally, add the PandaDesk skill, which teaches Claude the setup and inbox playbooks: ```bash mkdir -p ~/.claude/skills/pandadesk && curl -fsSL https://pandadesk.app/skill/SKILL.md -o ~/.claude/skills/pandadesk/SKILL.md ``` ### Cursor Add this to `~/.cursor/mcp.json`, or to `.cursor/mcp.json` in your project: ```json { "mcpServers": { "pandadesk": { "url": "https://pandadesk.app/api/mcp" } } } ``` In **Cursor Settings → MCP**, click **Needs login** next to pandadesk, then **Allow** in the browser. ### Codex ```bash codex mcp add pandadesk --url https://pandadesk.app/api/mcp codex mcp login pandadesk ``` The second command opens your browser; click **Allow**. ### Claude Desktop and claude.ai In **Settings → Connectors**, choose **Add custom connector**, name it PandaDesk and use the URL `https://pandadesk.app/api/mcp`. Click **Connect**, then **Allow** in the browser. ### Terminal (CLI) The CLI uses a token instead of a browser sign-in (see [Tokens](#tokens) below). Log in once; it's saved to `~/.config/pandadesk`: ```bash npx pandadesk login --token pda_YOUR_TOKEN npx pandadesk tools ``` See the [CLI reference](/docs/cli-reference). ## 2. What the approval means When you click **Allow**, the agent acts as you in every workspace you belong to, with your permissions: it can do what you can do in the dashboard, and nothing more. - **Approvals renew themselves.** The agent gets a short-lived access token (one hour) that it renews in the background. It stays connected for up to 90 days of not being used. - **You can disconnect any time.** Every approved agent is listed under **Connect AI agent → Connected apps**. **Disconnect** stops it immediately. - **Only allow what you started.** The app name on the approval screen is how the app describes itself. Only allow it if you just started connecting it from your own agent. ## 3. Ask for what you want In your project, say: ```text Set up PandaDesk support chat on this site. ``` Other things to try: - "What's waiting in my PandaDesk inbox?" - "Look at the questions PandaDesk couldn't answer and draft pinned answers from our docs." - "Change the chat to our brand color and add starter questions customers would ask." ### Guided workflows The MCP server also offers three ready-made workflows (MCP prompts). In Claude Code, type: | Command | What it does | |---|---| | `/mcp__pandadesk__setup_pandadesk` | Takes a site from nothing to a live chat: workspace, knowledge, look, allowed websites, embed, test questions, install check | | `/mcp__pandadesk__triage_inbox` | Goes through conversations waiting for a person, answers what your knowledge covers, notes the rest, and sums up the gaps | | `/mcp__pandadesk__fill_knowledge_gaps` | Turns unanswered questions into draft pinned answers or articles, and saves them once you approve | ## Plans and permissions - **Setup tools work on every plan**, including the trial: workspaces, knowledge, look, install, AI settings, webhooks and business hours. - **Inbox tools need Pro:** conversations, replies, drafts, notes, labels, assignment, contacts and reports. On another plan they return an error saying so. See [Plans and billing](/docs/plans-and-billing). - **Admin-only actions stay admin-only.** Changing the look, allowed websites, security, the AI agent, lookups, webhooks or business hours needs an admin of that workspace, just like in the dashboard. See [Team and roles](/docs/team-and-roles). - **Replies to customers.** By default an agent can only write a draft, which a teammate approves in the inbox. To let agents send replies directly, an admin turns on **Let agents send replies** under Settings → Inbox. That covers every connected agent and the CLI for that workspace. - **Rate limit:** each connection can make 120 calls a minute. > **Note:** Customer messages are untrusted text. The PandaDesk skill tells agents never to follow instructions found inside a conversation. ## Tokens Some tools can't open a browser: the CLI, scripts and CI, or an agent without sign-in support. For those, create a **personal token** under **Connect AI agent → Use a token instead**. 1. Name the token (e.g. "CI") and choose **Create token**. 2. Copy it. It starts with `pda_` and is shown once. 3. Send it as the header `Authorization: Bearer pda_…`, or log in with it in the CLI. A personal token covers every workspace you belong to, like a browser approval, but it doesn't expire until you revoke it. Revoke it on the same page. > **Note:** Treat a token like a password. Keep it in an environment variable or your agent's config, never in your repository. **Workspace tokens.** Before personal tokens, admins created workspace tokens (`pd_…`) under Settings, each limited to one workspace. They still work and act as an admin of that workspace, but can't create new workspaces. ## Troubleshooting | Message | What to do | |---|---| | "Not signed in to PandaDesk" | Sign in again: in Claude Code `/mcp` → pandadesk → Authenticate, in Codex `codex mcp login pandadesk`. With a token, it's wrong or revoked; create a new one. | | "Pass workspace: one of …" | Your token covers several workspaces. Tell the agent which one, or pass `workspace` with its slug. | | "… is on the Pro plan" | You used an inbox tool on Starter. Setup tools still work; upgrade under Billing for inbox tools. | | "… workspace is paused" | The owner's trial or subscription has ended. Reactivate under Billing. | | "Only admins of … can do that" | Ask an admin of that workspace to make the change. | | "Sending replies from an agent is off" | An admin can turn on **Let agents send replies**, or the agent can use a draft instead. | | "Too many requests" | Wait a minute. Each connection can make 120 calls a minute. | --- # Plans and billing PandaDesk's Starter and Pro plans, the 14-day trial, AI answer allowances, what happens when an account is paused, and how to change or cancel. PandaDesk has two plans, Starter and Pro, both starting with a 14-day free trial. A plan belongs to your account and covers every app (workspace) you own. ## Plans | | Starter | Pro | |---|---|---| | Price | $29 a month, or $290 a year | $99 a month, or $990 a year | | Apps (workspaces) | 3 | 10 | | AI answers a month, across all your apps | 1,500 | 7,500 | | People per app | 3 | Unlimited | | Website pages per app | 500 | 5,000 | | Files per app | 50 (250 MB) | 500 (2,500 MB) | | "Powered by PandaDesk" in the chat and help center | Shown, can be turned off | Shown, can be turned off | | Coding agents: setup tools (MCP and CLI) | Yes | Yes | | Coding agents: inbox tools (MCP and CLI) | No | Yes | Yearly billing costs ten months' price for twelve. Both plans include: - the AI agent, the help center and the team inbox; - pinned answers, gap tracking and article drafts; - email alerts for hand-offs; - reports, webhooks, business hours and lookups. There's no free plan. ## The free trial - Your first subscription starts with a **14-day free trial**. - You add a card in Stripe Checkout when you sign up, and it's charged when the trial ends, unless you cancel before then. - The trial is only for an account's first subscription. If you come back after cancelling, billing starts right away. - If the card is removed during the trial, the trial ends without converting. ## AI answers An **AI answer** is one AI reply to one customer message, however many searches it took. These don't count: - pinned answers that match a question exactly; - repeat first questions served from the answer cache, until your content or AI settings change; - greetings, thanks and other small talk. When your monthly allowance runs out, new questions go straight to your inbox for your team until the month resets. Usage resets on the first of each month (UTC); the Billing page shows the date and how many you've used. Each workspace also has a daily safety cap (500 by default) under Settings → Security. ## Who pays - The person who creates a workspace owns it, and their plan covers it. - Teammates you add don't need their own plan to work in your workspaces. - An app's limits come from its owner's plan: apps, people, pages, files, and whether coding agents can use inbox tools. ## When an account is paused Without an active trial or subscription, the account's apps are **paused**: - the chat doesn't load on your site, and the public chat API refuses requests; - the help center (and its `llms.txt`) is offline; - coding agents and the CLI can't use inbox tools; - in the dashboard, every page except Billing and Setup explains the app is paused. Nothing is deleted. Subscribe again under **Billing** and everything comes back as it was. A failed payment doesn't pause you immediately. While Stripe retries the card, your apps keep working. ## Change plan, card or cancel 1. Open **Billing** in the sidebar. 2. Choose **Change plan or billing details**. This opens Stripe's billing portal. 3. Switch between Starter and Pro or monthly and yearly, update your card, or cancel. When you cancel, your plan keeps working until the end of the period you've paid for. During a trial, cancelling means you won't be charged. > **Note:** Prices are in US dollars. Sales tax and VAT aren't added at checkout. --- # Team and roles Invite teammates by email, make them admins or agents, what each role can do, and how seats work on each plan. Each workspace has its own team. Teammates share the inbox and knowledge; admins also control the settings that change how the chat behaves on your site. ## Roles There are two roles: - **Admin.** Can do everything, including settings and managing the team. A workspace can have several admins. - **Agent.** Works the inbox and knowledge, but can't change how the chat behaves on your site. Whoever creates a workspace is its **owner**. The owner's plan pays for the workspace, and the owner is always an admin: nobody can demote or remove them. | | Admin | Agent | |---|---|---| | Work the inbox: reply, assign, label, snooze, resolve, private notes | ✓ | ✓ | | Contacts: view, add notes, block | ✓ | ✓ | | Knowledge: sources, files, articles, pinned answers, unanswered questions | ✓ | ✓ | | Labels and saved replies | ✓ | ✓ | | Reports | ✓ | ✓ | | Chat appearance (color, greeting, bot name, bubble, starter questions) | ✓ | | | Allowed websites, signed-identity mode, identity secret, daily AI limit | ✓ | | | AI agent settings and lookups | ✓ | | | Business hours and auto-close | ✓ | | | Webhooks and the signing secret | ✓ | | | Round-robin assignment and **Let agents send replies** | ✓ | | | Invite and remove teammates, change roles | ✓ | | | Create workspace tokens (`pd_…`) | ✓ | | Coding agents follow the same rules. An agent you connect (by browser approval or a personal token) acts as you, with your role in each workspace, so an agent connected by a teammate can't change admin-only settings. See [Connect your AI agent](/docs/connect-ai-agent). ## Invite a teammate 1. In your workspace, open **Settings** and find **Invite a teammate**. 2. Enter their email, pick **Agent** or **Admin**, and choose **Send invite**. 3. They get an email with a link to join. If they don't have a PandaDesk account yet, they create one on that page (no plan or payment needed). If they do, they sign in and join. The link works once, for 7 days. Until they join, they show in **Settings → Team** as "Invited, hasn't joined yet", and you can **Withdraw** the invite. Sending a new invite to the same address replaces the old link. The invite only works for the address it was sent to: someone signed in with a different email is asked to sign out first. ### Seats The workspace owner's plan sets how many people each app can have, the owner included. Invites that haven't been accepted yet count too, until they're accepted, withdrawn or expire: | Plan | People per app | |---|---| | Starter | 3 | | Pro | Unlimited | See [Plans and billing](/docs/plans-and-billing). ## Change a teammate's role In **Settings → Team**, pick **Admin** or **Agent** next to their name. The change applies straight away, including to any coding agent they've connected. - The owner is always an admin. - A workspace always keeps at least one admin, so you can't make the last admin an agent. - You can make yourself an agent if another admin remains, but only an admin can change it back. From a coding agent, use `invite_teammate` (with a `role`) and `set_teammate_role`. `list_teammates` shows open invites to admins. ## Remove a teammate In **Settings → Team**, choose **Remove** next to their name. They lose access to that workspace immediately. Admins can't remove themselves, and nobody can remove the owner. ## Assignment - Any teammate can assign a conversation to themselves or to someone else. The assignee gets an email, unless they assigned it to themselves. - Admins can turn on **round-robin** under Settings → Inbox. Each new hand-off then goes to the teammate who was assigned one least recently. See [Inbox](/docs/inbox). --- # FAQ Answers to common questions about how PandaDesk's AI answers, hand-offs, plans, coding agents, data and installation work. Short answers to the questions people ask most. Each links to the page with the details. ## The AI ### Does the AI make things up? No. It only answers from your own content: - published articles; - enabled pinned answers; - the websites and files you imported. Every answer must cite passages it found in that content. If a reply doesn't, PandaDesk throws it away before the visitor sees it. In the inbox, **How was this answered?** under any AI reply shows what it searched and cited. See [AI agent](/docs/ai-agent). ### What happens when it can't answer? It says it couldn't find the answer and offers to pass the question to your team. - It hands off right away if the visitor accepts the offer or asks for a person. - It also hands off after two questions in a row it couldn't answer. Your team gets an email, and the question is added to **Not answered** so you can fill the gap. See [Inbox](/docs/inbox). ### Can visitors reach a person directly? Yes. They can choose **Talk to a person** in the chat, or just ask for one ("can I talk to someone?"), in any language. ### Which languages does it speak? It replies in the visitor's language, even when your content is in another one. ### Will it ask follow-up questions? At most one clarifying question in a row, when a detail it needs is missing, like which plan or an order number. If it still can't answer, it offers your team instead of asking again. ### Can it look up a customer's order or account? Yes, with [lookups](/docs/lookups). They call an endpoint on your backend for the signed-in customer only, so you'll need [signed identity](/docs/signed-identity) set up. Answers that used a lookup are never cached or shown to anyone else. ### Does it learn from my team's replies? When **Learn from team replies** is on, PandaDesk turns resolved conversations your team answered into proposed knowledge, without personal details. Nothing is used until you approve it under Sources. It's on by default for new workspaces. See [Knowledge sources](/docs/knowledge-sources). ## Setup and the chat ### Do I need to code to install it? You paste one script tag into your site, before ``. Site builders like WordPress, Shopify and Webflow have a place for custom code. Or [connect your coding agent](/docs/connect-ai-agent) and it adds the snippet for you. See [Install the chat](/docs/install-chat). ### The chat doesn't show up on my site. Why? Check, in this order: 1. **The website is allowed.** Settings → Security → Allowed websites, or Setup step 5. `example.com` also covers `www.example.com`, but `app.example.com` needs its own entry. 2. **The snippet is on the page** with your workspace's `data-key`. 3. **The app isn't paused.** Billing shows your plan. Your browser console also prints why the chat didn't load. A connected coding agent can run `check_install` to test all of this. ### Can I make the chat look like my brand? Yes. Under [Chat appearance](/docs/chat-appearance) you can set: - the brand color and greeting; - the bot name and avatar; - the header text; - starter questions; - the bubble's icon, shape, label and corner. A live preview shows the result. ## Plans and coding agents ### Is there a free trial? Yes: 14 days on your first subscription. You add a card at sign-up and it's charged when the trial ends unless you cancel. There's no free plan. See [Plans and billing](/docs/plans-and-billing). ### What happens if I run out of AI answers? New questions go straight to your inbox for your team until the month resets (on the 1st, UTC). Pinned answers, cached repeats and small talk never count. ### Do I need Pro to use Claude Code or Cursor with PandaDesk? No, for setup: on every plan, coding agents can create workspaces, import knowledge, style the chat, install it and tune the AI. Inbox tools (conversations, replies, notes, contacts, reports) need Pro. See [Connect your AI agent](/docs/connect-ai-agent). ### Can a coding agent reply to my customers? Only if an admin turns on **Let agents send replies** under Settings → Inbox. Otherwise agents write drafts that a teammate approves in the inbox before anything is sent. ## Data and safety ### What do visitors see of my team's notes? Nothing. Private notes on conversations and contacts are only for your team. They're never shown in the chat or returned by the public chat API. ### What about spam and abusive visitors? - **Abuse and spam:** each abusive or spam message gets a calm reply. After three in a conversation, PandaDesk closes it, marks it **Abusive**, and blocks that visitor from chatting for 24 hours. Abuse never emails your team. - **Bots:** when something looks automated, the visitor is asked to pass a quick Cloudflare check before chatting continues. See [Security and privacy](/docs/security-and-privacy). ### What happens to files I upload? PandaDesk extracts their text to make it searchable and then deletes the original upload. If extraction fails, the upload is kept for 7 days so it can be retried. ### How do I remove PandaDesk? 1. Remove the script tag from your site; the chat disappears. 2. To stop paying, cancel under **Billing → Change plan or billing details**. Your apps pause at the end of the period you've paid for. Nothing is deleted, so you can come back later. --- # Install the chat Add the PandaDesk chat to your website with one script tag, allow your domains, and confirm it's live. The PandaDesk chat is one script tag. Add it once to your site's layout and every page gets a chat bubble that answers from your knowledge and hands off to your team. ## 1. Allow your website The chat only loads on websites you've allowed, plus your own PandaDesk help center. Add every origin the chat runs on under **Settings → Security → Allowed websites** (or in the **Allow your website** setup step). - An origin is the scheme, host and port: `https://app.example.com`, `http://localhost:3000`. - `example.com` also covers `www.example.com`, and the other way round. - Wildcards (`*.example.com`) aren't accepted. Add each subdomain you use. > **Note:** If the chat doesn't appear, check the browser console. The loader prints `[PandaDesk] Messenger not loaded:` with the reason, for example that the site isn't allowed. ## 2. Add the snippet Copy the snippet with your workspace's key from the **Install** page in the dashboard: ```html ``` Put it once per page, before `` (or in ``: it loads asynchronously and never blocks your page). One snippet covers the whole site. ### Next.js (App Router) ```tsx // app/layout.tsx import Script from "next/script"; export default function RootLayout({ children }: { children: React.ReactNode }) { return ( {children} ``` ### React, Vue and other single-page apps Append the script once, for example in your root component: ```tsx useEffect(() => { if (document.querySelector('script[data-key="pk_YOUR_KEY"]')) return; const s = document.createElement("script"); s.src = "https://pandadesk.app/widget.js"; s.async = true; s.dataset.key = "pk_YOUR_KEY"; document.body.appendChild(s); }, []); ``` In Vue, do the same in `onMounted` of your root component (or in `main.ts`). Route changes are picked up automatically, so your team sees which page the visitor is on. ### WordPress **Appearance → Theme File Editor → footer.php**, paste the snippet before ``. Or use any "header and footer scripts" plugin. ### Shopify No code needed: install PandaDesk from the Shopify App Store, then turn on the **PandaDesk chat** app embed. See [Shopify](/docs/shopify). ### Webflow, Framer, Squarespace **Site settings → Custom code → Footer code**, paste the snippet, then publish. ## 3. Check it's live Open a page of your site in a browser. Setup's **Add the chat to your site** step ticks off the first time the chat loads on one of your allowed websites. ## How the chat loads The loader is built to cost almost nothing on pages where nobody chats: - `widget.js` is cached by browsers for an hour. Your chat's look is cached for a minute per visitor. - The chat window itself loads only when the visitor opens the bubble or hovers over it, so it still opens instantly. - A visitor with a conversation in progress gets the chat loaded in the background a few seconds after the page settles. If your team has replied, the bubble shows a red dot. - While the chat is open, it checks for new messages every 3 seconds. While it's closed, every 45 seconds. Changes you make under **Chat appearance** reach your site on the next page load, without touching the snippet. ## Script tag options | Attribute | Required | What it does | |---|---|---| | `data-key` | Yes | Your workspace's public key (`pk_…`). It's safe to put in page source. | | `data-color` | No | A hex color for the bubble and chat, overriding the dashboard. | | `data-position` | No | `left` puts the bubble in the bottom-left corner, overriding the dashboard. | ## JavaScript API Calls made before the script has loaded are queued, as long as you define the queue first: ```html ``` | Call | What it does | |---|---| | `PandaDesk('open')` | Opens the chat. | | `PandaDesk('close')` | Closes it. | | `PandaDesk('toggle')` | Opens or closes it. | | `PandaDesk('preload')` | Loads the chat now instead of on first open. | | `PandaDesk('identify', identity)` | Attaches a signed-in user. See [Signed-in users](/docs/signed-identity). | | `PandaDesk('reset')` | Forgets the visitor, for example on logout. The next chat starts fresh. | `window.Pandachat` is kept as an alias for older snippets. ## Without the bubble To build your own interface, the same chat runs over a small HTTP API: start a session with `POST /api/v1/widget//session`, send messages with `POST /api/v1/widget//messages` (with the session token as a Bearer token), and poll `GET /api/v1/widget//messages`. The **Install** page shows working `curl` examples with your key. ## With your coding agent Ask your agent to "add the PandaDesk chat to this site". It uses: - `allow_website` for each origin (`npx pandadesk allow_website --origin https://example.com`) - `get_embed_code` for the snippet for your framework - `check_install` with a page URL after you deploy, which reports a missing snippet, a wrong key or an origin that isn't allowed See [Connect your AI agent](/docs/connect-ai-agent). --- # Signed-in users Tell the chat who is logged in, signed by your server, so your team sees verified names and lookups can fetch the customer's own data. If your app has logged-in users, you can pass who they are to the chat. Your server signs the user's email and ID with a secret only it knows, and PandaDesk checks the signature, so nobody can pretend to be someone else. ## What it gets you - Your team sees the customer's real name and email, marked **Verified**, instead of a visitor tag like `Visitor 4F2A`. - A signed-in customer keeps the same conversations on every device and browser. - [Lookups](/docs/lookups), which fetch the customer's own data from your backend, only work for verified customers. ## How it works 1. Copy the **identity secret** from **Settings → Security**. Store it in your server's environment as `PANDADESK_IDENTITY_SECRET`. Never put it in browser code or commit it. 2. On each page load, your server builds a signature for the logged-in user. 3. The page passes the result to the chat with `PandaDesk('identify', …)`. 4. On logout, call `PandaDesk('reset')`. ## The payload The signature is an HMAC-SHA256, in lowercase hex, of these five lines joined with `\n`: ```text pandadesk-identity:v1 ``` - Send at least an email or a user ID. Use an empty string for the one you don't have. - A signature is valid for **one hour** after `issuedAt` (and up to 2 minutes ahead, for clock drift). Make a fresh one per page load. - The identity object you pass to the chat is `{ email, userId, name, issuedAt, signature }`. `name` isn't signed; it's only a display name. ## Server examples ### Node.js ```js import { createHmac } from "node:crypto"; export function pandadeskIdentity(user) { const email = (user.email ?? "").trim().toLowerCase(); const userId = String(user.id ?? "").trim(); const issuedAt = Math.floor(Date.now() / 1000); const payload = ["pandadesk-identity:v1", "pk_YOUR_KEY", email, userId, issuedAt].join("\n"); const signature = createHmac("sha256", process.env.PANDADESK_IDENTITY_SECRET).update(payload).digest("hex"); return { email, userId, name: user.name, issuedAt, signature }; } ``` ### Python ```python import hashlib, hmac, os, time def pandadesk_identity(user): email = (user.email or "").strip().lower() user_id = str(user.id or "").strip() issued_at = int(time.time()) payload = "\n".join(["pandadesk-identity:v1", "pk_YOUR_KEY", email, user_id, str(issued_at)]) signature = hmac.new(os.environ["PANDADESK_IDENTITY_SECRET"].encode(), payload.encode(), hashlib.sha256).hexdigest() return {"email": email, "userId": user_id, "name": user.name, "issuedAt": issued_at, "signature": signature} ``` ### PHP ```php function pandadesk_identity($user) { $email = strtolower(trim($user->email ?? '')); $userId = trim((string) ($user->id ?? '')); $issuedAt = time(); $payload = implode("\n", ['pandadesk-identity:v1', 'pk_YOUR_KEY', $email, $userId, (string) $issuedAt]); $signature = hash_hmac('sha256', $payload, getenv('PANDADESK_IDENTITY_SECRET')); return ['email' => $email, 'userId' => $userId, 'name' => $user->name, 'issuedAt' => $issuedAt, 'signature' => $signature]; } ``` ### Ruby ```ruby require "openssl" def pandadesk_identity(user) email = user.email.to_s.strip.downcase user_id = user.id.to_s.strip issued_at = Time.now.to_i payload = ["pandadesk-identity:v1", "pk_YOUR_KEY", email, user_id, issued_at.to_s].join("\n") signature = OpenSSL::HMAC.hexdigest("SHA256", ENV.fetch("PANDADESK_IDENTITY_SECRET"), payload) { email: email, userId: user_id, name: user.name, issuedAt: issued_at, signature: signature } end ``` ## In the page Render the object your server returned into the page and pass it to the chat: ```html ``` Call `PandaDesk('reset')` when the user logs out, so the next person on that browser starts a fresh chat. ## Identity modes Choose under **Settings → Security**: | Mode | What happens to an unsigned or invalid identity | |---|---| | **Report only** (default) | The name and email are kept but shown to your team as **Unverified**. They never give access to anyone else's conversations. | | **Enforced** | Unsigned names and emails are dropped. Only signed identities are used. | ## Rotating the secret Rotate the secret under **Settings → Security** if it may have leaked. The old secret stops verifying immediately, so update your server's environment straight away. ## With your coding agent Ask your agent to "wire up PandaDesk signed identity". It uses `get_embed_code` (its `signedInUsers` section has browser, Node and Python code) and `get_identity_secret` to put the secret in your server's environment. `update_security` switches between report-only and enforced: `npx pandadesk update_security --identity-mode enforced`. --- # Chat appearance Change the chat's color, greeting, bot name and avatar, header, starter questions and bubble, with a live preview. Open **Chat appearance** in the sidebar to make the chat look like part of your product. A preview on the right updates as you change things, and your site picks up saved changes on the next page load. Each workspace has its own look, so each of your sites can have its own branding. ## Brand | Option | Details | |---|---| | **Brand color** | Used for the bubble, the chat header, the visitor's messages and buttons. Text on it turns dark or white automatically, whichever reads better, so light colors like yellow stay readable. The help center uses the same rule for its links and buttons. | | **Greeting** | The first message in a new chat, up to 300 characters. | ## Starter questions Up to **6** buttons under the greeting. Clicking one sends that question, as if the visitor had typed it. They show until the visitor sends their first message. Each can be up to 80 characters. Use questions your customers actually ask, such as "What does it cost?" or "Can I talk to someone?". ## Bot | Option | Details | |---|---| | **Bot name** | Shown above the AI's answers, up to 40 characters. Empty means your workspace name. | | **Avatar** | Shown in the chat header. Empty means the first letter of the bot name. | ## Header | Option | Details | |---|---| | **Title** | Up to 60 characters. Empty means your workspace name. | | **Subtitle** | Up to 80 characters. Empty means "AI answers instantly · the team steps in". After a hand-off it changes to "The team will reply here", and outside [business hours](/docs/business-hours) it says when your team is back. | ## Chat bubble | Option | Details | |---|---| | **Icon** | Chat, Message, Help, Sparkles or Headset, or your own image. | | **Shape** | Circle or rounded square. | | **Label next to it** | An optional text pill beside the bubble, like "Need help?", up to 30 characters. Clicking it opens the chat. Hidden on phones. | ## Position | Option | Details | |---|---| | **Corner** | Bottom left or bottom right. | | **From the side / From the bottom** | 0–120 pixels each. Default 20. | On phones the chat opens full screen. ## Images The avatar and a custom bubble icon accept **PNG, JPEG, WebP or GIF**, up to **512 KB**. A square image of about 256×256 pixels works well. SVG isn't accepted, because SVG files can carry scripts. Images are served from PandaDesk and cached by browsers, so changing one updates your site straight away. ## Overriding on the page Two attributes on the script tag win over the dashboard settings, which is handy for testing a look on one site: ```html ``` ## Branding "Powered by PandaDesk" shows under the chat and at the foot of the help center by default. On any paid plan (Starter, Pro and both lifetime licenses), untick **Show "Powered by PandaDesk"** here to remove it from both; a coding agent can do the same with `update_appearance` and `showBranding: false`. See [Plans and billing](/docs/plans-and-billing). ## With your coding agent Ask your agent to "match the PandaDesk chat to our brand". It reads your colors and logo from the codebase and uses: - `update_appearance` for any field above. Fields you leave out stay as they are: ```bash npx pandadesk update_appearance --brand-color "#0f766e" --bot-name "Ava" --starter-questions '["How do refunds work?","Talk to someone"]' ``` - `set_chat_image` with `kind avatar` or `kind launcher` and a public image URL, or `remove: true`. - `get_appearance` to read the current settings. --- # Knowledge sources Teach the AI from your website, files, help-center articles, pinned answers and your team's replies. The AI only answers from what you give it. Everything you add under **Knowledge** becomes searchable passages, and an answer must cite one of them, or the AI offers your team instead. ## Kinds of knowledge | Kind | Best for | Where | |---|---|---| | **Website** | Your docs or marketing site, kept in sync automatically | Sources | | **Files** | PDFs, Word documents, Markdown and text that aren't on a website | Sources | | **Articles** | Help-center pages you write in PandaDesk, also published at your [help center](/docs/help-center) | Articles | | **Pinned answers** | Exact, official answers to specific questions | Pinned answers | | **Team replies** | Answers your team gave in the inbox, turned into proposals you approve | Sources → Learn from team replies | ## Websites Enter a site, a section of it, or a sitemap under **Sources → Website**, then choose **Crawl**. - **Scope:** pages on the same domain, under the path you entered. `https://example.com/docs` crawls everything under `/docs`. A site root or a sitemap crawls the whole domain. - **Sitemaps:** if the site has a `sitemap.xml` (or lists sitemaps in `robots.txt`), its pages are used first. You can also enter a sitemap URL directly. - **robots.txt:** respected, including its crawl delay. - **Re-sync:** every website is re-crawled daily. Choose **Sync now** to refresh it straight away. Pages that haven't changed are skipped. - **Your PandaDesk help center:** adding it as a website works too, but only its published articles are crawled. If it has none yet, the source says so. - **Pages:** each crawled page counts toward your plan's page limit (below). When you're near the limit, the crawl keeps the pages it found first. Only public `http` and `https` addresses can be crawled. Pages behind a login aren't reachable. ## Files Upload under **Sources → Files**: - **Types:** PDF, Word (`.docx`), Markdown (`.md`, `.markdown`) and plain text (`.txt`). - **Size:** up to 10 MB each. PDFs up to 1,000 pages. - Files are checked by their contents, not only their extension, so a renamed file is rejected with a clear reason. - Scanned PDFs (images of text) aren't read. The original upload is only kept until its text has been extracted, then deleted. A file that fails to import is kept for 7 days so you can retry it. Your knowledge lives on as searchable passages. ## Import status Imports run in the background. Each document shows its status: | Status | Meaning | |---|---| | Queued | Waiting its turn. | | Reading | Being fetched and its text extracted. | | Searchable | The AI can find it by its words. | | Ready | Also searchable by meaning (see below). | | Failed | Something went wrong; the reason is shown, and you can **Retry**. | ## When sources disagree Each passage the AI reads carries the date it last changed in PandaDesk: when an article or pinned answer was edited, or when a file or page was imported or last re-synced with new content. If two passages contradict each other, the AI goes with the newer one. A pinned answer always wins. So if you change a policy, update it in one place and the AI stops repeating the old version, even while an older page elsewhere still says otherwise. ## Search by meaning Besides matching words, PandaDesk searches by meaning, so "when could I be living over there?" can find a passage about how long a visa takes. Every passage is turned into a vector in the background after it's imported; the Sources page shows how many are done. Until a passage has its vector, word search still finds it. ## Pinned answers A pinned answer is your team's exact wording for a question. - When a customer's message matches a pinned question exactly (ignoring case and punctuation), the answer is sent as written, without an AI call. - For similar questions, pinned answers are searched like any other knowledge and win over other passages when they disagree. - You can turn a pinned answer off without deleting it. ## Articles Articles are pages in your [help center](/docs/help-center), written in Markdown and grouped into collections. Published articles are also knowledge for the AI. Drafts aren't. ## Questions the AI couldn't answer **Not answered** lists questions customers asked that your knowledge didn't cover, most-asked first. For each one you can: - **Write an article**: PandaDesk drafts one from the question for you to edit and publish. - **Pin an answer**: write the exact answer. - **Dismiss** it. ## Learn from team replies When your team resolves a conversation it answered, PandaDesk proposes the answer as knowledge, without personal details. Nothing is used until you approve it under **Sources**, where you can edit or reject each proposal. It's on by default for new workspaces; turn it off under **Sources → Learn from team replies**. ## Plan limits Per app (workspace): | | Starter | Pro | |---|---|---| | Website pages | 500 | 5,000 | | Files | 50 | 500 | | File storage | 250 MB | 2,500 MB | ## With your coding agent Ask your agent to "import our docs into PandaDesk". It uses: - `add_website` (`npx pandadesk add_website --url https://docs.example.com`), `resync_website`, `remove_source` - `add_text` for content from your repo, `add_file_from_url` for PDFs and other files - `get_knowledge_status` and `list_documents` to watch imports, `retry_document` and `delete_document` - `get_document` to read a document's text, `update_document` to change a text or file document in place (a few exact edits or the whole text) without uploading it again - `create_article`, `update_article`, `list_articles`, `save_pinned_answer`, `list_pinned_answers` - `list_unanswered_questions` and `dismiss_unanswered_question`, or the `fill_knowledge_gaps` prompt - `search_knowledge` to see exactly which passages the AI would find for a question - `set_learn_from_replies`, `list_knowledge_proposals`, `approve_proposal`, `reject_proposal` --- # Help center Your public help center at pandadesk.app/h/your-workspace, with articles, an AI search box and the chat. Every workspace comes with a public help center at `https://pandadesk.app/h/`. It shows your published articles grouped by collection, an "Ask anything" box that answers from your knowledge, and the chat bubble. ## Articles Write articles under **Articles** in Markdown. - **Collection** groups articles on the help center's home page, for example "Getting started" or "Billing". - **Draft** articles are private. **Published** articles appear in the help center and become knowledge for the AI. - Each article has its own page at `/h//`. - New workspaces can start with a few sample articles you can edit or delete. Ways to get articles without starting from a blank page: - From **Not answered**, choose **Write an article** on a question customers asked. PandaDesk drafts it for you to edit. - From a resolved conversation in the inbox, choose **Turn into article**. ## The ask box The box at the top of the help center answers questions from all your knowledge (articles, pinned answers, crawled pages and files), and shows matching articles. It's rate-limited per visitor (6 questions a minute, 60 a day). When it can't answer, the question is added to **Not answered**, and the visitor is pointed to the chat. ## Look The help center uses your workspace name and brand color. Links and buttons switch to dark text when your brand color is light, so they stay readable. "Powered by PandaDesk" shows at the foot by default. On any paid plan you can turn it off under **Settings → Chat appearance → Branding**. ## The chat on your help center The chat works on your help center without adding it to your allowed websites. It's also a quick way to try the chat yourself. ## For AI tools: llms.txt `https://pandadesk.app/h//llms.txt` serves all published articles as one plain-text Markdown file, each with a link to its page. Point ChatGPT, Claude or other AI tools at it to give them your whole help center. > **Note:** llms.txt isn't served while the workspace is paused (no active plan). ## With your coding agent - `list_articles`, `get_article`, `create_article` (title, Markdown body, collection, draft or published), `update_article`, `delete_article` - `search_help_center` to search published articles and pinned answers ```bash npx pandadesk create_article --title "Export your data" --collection "Account" --status published --body "Go to **Settings → Data** and choose **Export**." ``` --- # How the AI agent works How the AI answers from your knowledge, when it asks a question or hands off, how it handles abuse, and how to tune it. The AI agent answers customers in the chat using only your knowledge. It searches, answers with what it found, asks one clarifying question when a detail is missing, and offers your team when it can't help. You shape its tone and boundaries under **AI agent**. ## Answers come from your content - For each question, the agent searches your knowledge (it may search up to three times with different wording) and answers from the passages it found. - An answer must cite the passages it used. **An answer that doesn't cite your content is thrown away before the customer sees it**, and the customer is offered your team instead. The agent never invents features, prices, policies or links. - [Pinned answers](/docs/knowledge-sources#pinned-answers) are your team's official wording and win over other passages when they disagree. - It replies in the customer's language. ## Clarifying questions When a needed detail is missing (which plan, which device, an order number), the agent asks **one** short question. It never asks two in a row: after one, it answers with what it has or offers your team. ## Handing off to your team The agent asks before handing off: 1. When it can't answer, it says so and asks whether the customer wants the question passed to your team. 2. If the customer says yes, the conversation goes to your [inbox](/docs/inbox) right away. 3. If the next question can't be answered either, it hands off automatically. The customer is never stuck in a loop. A customer who asks for a person ("talk to a human", "can I speak to someone", or the same in Spanish, French, German, Italian or Portuguese) is handed off immediately, as is anyone who clicks **Talk to a person** in the chat. On hand-off, the AI writes a short summary for your team, the conversation is marked **Needs reply**, and your team gets an email. After a hand-off the AI keeps answering what it can until someone from your team replies. From then on it only answers a new question about your product that your knowledge covers, with its sources. Anything else (a follow-up on your teammate's reply, the customer's own account, payment or order, or a question your knowledge doesn't answer) waits for your team, and the customer gets a short "the team has your conversation" note at most every 10 minutes. It never replies to a "thanks" after your teammate's answer. Those turns don't count as AI answers. Outside [business hours](/docs/business-hours), the hand-off message tells the customer when your team is back. ## Small talk "Hi", "thanks" and "bye" get a friendly reply without an AI call, and don't count against your answer allowance. ## Abuse and spam - Abusive messages get one calm reply asking to keep it respectful. Swearing about a problem ("this damn export") isn't treated as abuse. - Spam (3 or more links, the same message three times in a row, keyboard mashing) gets a short reply. - After **3** abusive or spam messages in a conversation, the AI stops replying, the conversation is closed and marked **Abusive**, and the visitor can't send messages for **24 hours**. - Abuse never emails your team, and a chat closed for abuse doesn't ask for a rating. ## Prompt injection Customer messages and your content are treated as data, not instructions. Attempts to change the agent's instructions, make it reveal them, or make it act as something else are flagged and ignored, and it never reveals its instructions or your settings. ## Tune it: guidelines, guardrails and scenarios Under **AI agent**: | Setting | What it's for | Limits | |---|---|---| | **Response guidelines** | Tone and style. Empty: warm and direct, two to four short sentences. | 2,000 characters | | **Guardrails** | Things it must not do or talk about, one per line, for example "Don't compare us with competitors". | 30 lines, 300 characters each | | **Scenarios** | Playbooks: a name, when it applies, and what to do, for example "Refund requests". | 20 scenarios | Your settings never override the core rules: answer only from your content, cite it, stay safe, and hand off when asked. ## How was this answered? Every AI reply in the inbox has a **How was this answered?** link showing what the agent searched, which passages it found and cited, any lookups it ran, and why it decided what it did. Use it to find missing knowledge. ## Usage and limits | Limit | Default | |---|---| | AI answers per app per day | 500. Change it under **Settings → Security**. | | AI answers per month, across all your apps | Starter 1,500, Pro 7,500 | One customer question counts as one answer, however many searches it takes. Pinned answers, small talk, and the same first question answered again within 7 days (from the answer cache, until your knowledge changes) don't count. When the allowance runs out, new questions go straight to your inbox until the month resets. ## Test it Try the chat on your help center, or use the **Ask it a question** step in Setup. The **Start over** button there forgets the test conversation so you can try again as a new visitor. ## With your coding agent - `get_agent_settings` and `update_agent_settings` (guidelines, guardrails, scenarios) - `test_question` runs the real agent on a question and returns its answer, sources and full trace, without creating a conversation: ```bash npx pandadesk test_question --question "Can I get a refund after two weeks?" ``` - `search_knowledge` shows which passages the agent would find. See also [Lookups](/docs/lookups) to let the agent fetch a signed-in customer's own data. --- # Lookups Let the AI agent fetch a signed-in customer's own data, like an order's status, from your backend, with signed requests. A lookup is an endpoint on your backend that the AI agent can call to answer questions about a customer's own data, such as "where is my order?" or "which plan am I on?". Set them up under **AI agent → Lookups**. ## How a lookup works 1. A customer asks something your knowledge can't answer but your systems can. 2. The agent picks a lookup, fills in its parameters (for example the order number the customer gave), and calls your endpoint. 3. PandaDesk adds who the customer is and signs the request. Your endpoint answers for that customer only. 4. The agent answers from the response and cites it, just like knowledge. A failed lookup isn't an answer: the agent asks for a missing detail or offers your team. ## Create a lookup | Field | Details | |---|---| | **Name** | Lowercase letters, digits and underscores, starting with a letter, 2–40 characters, e.g. `order_status`. | | **What it looks up, and when to use it** | 10–500 characters. The agent reads this to decide when to call it, so be specific. | | **Method** | `GET` or `POST`. | | **URL** | `https://` only. Use `{name}` for parameters in the path, e.g. `https://api.example.com/support/orders/{order_id}`. | | **Parameters** | Up to 8, each with a name, a description for the agent, and whether it's required. Parameters not used in the path go in the query string (`GET`) or a JSON body (`POST`). Values are URL-encoded and capped at 200 characters. | | **Auth header** | Optional, sent with every request, e.g. `Authorization: Bearer sk_live_…`. It's never shown again after saving; leave it empty to keep it, or enter `-` to remove it. | | **Signed-in customers only** | On by default, and recommended for anything about a customer's own data. | Use **Test** to call the endpoint as a given user ID and see exactly what comes back. You can have up to 10 lookups per workspace. ## What PandaDesk sends | Header | Value | |---|---| | `PandaDesk-User-Id` | The customer's user ID from [signed identity](/docs/signed-identity). Only sent for verified customers. | | `PandaDesk-User-Email` | Their email, for verified customers. | | `PandaDesk-Conversation-Id` | The conversation the lookup is for. | | `PandaDesk-Signature` | `t=,v1=` (below). | | Your auth header | If you set one. | > **Note:** Identify the customer from `PandaDesk-User-Id`, never from a parameter. Parameters are filled in by the AI from what the customer typed; the user ID header comes from your own signed identity. ## Verify the signature The signature is an HMAC-SHA256, with your workspace's **signing secret**, of the string below. Admins find the secret under **Settings → Webhooks**; a coding agent gets it with `get_signing_secret`. Keep it in your server's environment as `PANDADESK_SIGNING_SECRET`. It is not the identity secret. ```text ... ``` The body is empty for `GET`. Reject requests whose timestamp is more than a few minutes old. ### Node.js ```js import crypto from "node:crypto"; // Pass the method, the full URL PandaDesk called (https://your.host/path?query), the raw body ("" for GET) // and the PandaDesk-Signature header. Return 401 when it's false; answer only for PandaDesk-User-Id. export function verifyPandaDeskLookup({ method, url, body = "", signature = "" }, secret = process.env.PANDADESK_SIGNING_SECRET) { const { t, v1 } = Object.fromEntries(signature.split(",").map((p) => p.split("="))); if (!t || !v1 || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false; const expected = crypto.createHmac("sha256", secret).update(`${t}.${method}.${url}.${body}`).digest("hex"); return v1.length === expected.length && crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected)); } ``` ### Python ```python import hashlib, hmac, time def verify_pandadesk(headers, method, url, body, secret): parts = dict(p.split("=", 1) for p in headers.get("PandaDesk-Signature", "").split(",") if "=" in p) t, v1 = parts.get("t"), parts.get("v1") if not t or not v1 or abs(time.time() - int(t)) > 300: return False message = f"{t}.{method}.{url}.{body or ''}".encode() expected = hmac.new(secret.encode(), message, hashlib.sha256).hexdigest() return hmac.compare_digest(v1, expected) ``` Use the exact URL PandaDesk called (scheme, host, path and query string). If your server sits behind a proxy, rebuild it from the forwarded host and protocol. ## Show results as cards Turn on **Show results as cards in the chat** on a lookup to show its JSON response as cards (orders, plans, bookings), with an optional button that opens a link or runs a [browser action](/docs/cards-and-actions#browser-actions) on your site. See [Cards, suggestions and actions](/docs/cards-and-actions#show-a-lookups-results-as-cards). ## Limits and safety - `https` only, public addresses only, and redirects aren't followed. - A request fails after 8 seconds or if the response is over 200 KB. The agent reads the first 4,000 characters of the response. JSON is easiest for it to read. - At most 3 lookups per reply, 20 per conversation an hour, and 300 per lookup an hour across all conversations. Past that, the agent is told to try later, so a visitor can't use the chat to flood your backend. - Lookups marked **signed-in customers only** aren't offered to the agent at all for visitors who aren't verified. - Answers that used a lookup are never cached or shown to another customer. - Each call appears under **How was this answered?** in the inbox, with its arguments, status and timing. The auth header is never shown. ## With your coding agent - `list_lookups`, `save_lookup` (create or update), `delete_lookup` - `test_lookup` calls the endpoint as a given signed-in user ID. It returns the exact request sent (URL, body and headers with the signature; your auth header masked), and by default sends the same request again with a wrong signature to check that your backend refuses it with 401 or 403 - `get_signing_secret` returns the signing secret, the exact signed strings for lookups and webhooks, and the verify function above - `test_question` runs the full agent; pass `as_user_id` to test as a signed-in customer, so signed-in-only lookups are available The signing secret is the same one used for [webhooks](/docs/webhooks); rotate it under **Settings → Webhooks**. --- # Cards, suggestions and actions Show products, orders and plans as cards in the chat, suggest follow-up questions, and let a card's button act on your website. Answers can come with **cards** (a product, an order, a plan, a booking slot) and **suggested follow-ups** the customer can tap. A card's button can open a page or run a **browser action**: a function on your own website, such as adding a product to the cart. ## Where cards come from The AI never writes a card. Cards are built from data: - **Store products** from a Shopify or WooCommerce store connected under **Integrations**. The AI finds them by meaning ("shoes for trail running"), and each card shows the photo, price, options and stock. - **Lookups** with display settings (below): your API's JSON, shown as cards. - **Integrations** such as [Stripe](/docs/stripe) (plan, invoices) or [Cal.com and Calendly](/docs/booking) (open times). - **[Lead forms](/docs/lead-forms)**: a short form the customer fills in under the answer. The AI decides *when* to show cards and which ones, the same way it decides what to cite. A price, link or stock level always comes from your data, never from the model. ## Suggested follow-ups After an answer, the AI may suggest up to three follow-up questions the customer is likely to ask next. Tapping one sends it as the customer's message. They show only under the latest answer. ## Show a lookup's results as cards When you add or edit a [lookup](/docs/lookups), turn on **Show results as cards in the chat** and name the fields of your JSON response, with dots for nested fields: | Field | Example | What it is | |---|---|---| | **List of results** | `orders` | The array of items. Leave empty when the response is one item. | | **Title** | `number` | Required. | | **Subtitle** | `status` | | | **Price** | `total_formatted` | Shown as written. | | **Image URL** | `image.url` | | | **Link** | `tracking_url` | Opens when the card's title is clicked. | | **Button** | `Track order` | Opens the link, or runs a browser action (below) with values from the item, e.g. `order_id=id`. | Use **Test** to see the cards a call produces. Links must be `http(s)`; anything else is dropped. ## Browser actions A browser action is a function on your page that a card's button can run. Register it after the chat snippet: ```html ``` - **Only a click runs it.** The customer clicks the button; the AI never runs an action by itself. - **Only what you registered.** A button for an action this page didn't register isn't shown. Names starting with `pandadesk.` are reserved for the chat's own buttons (like booking a Cal.com time) and can't be registered. - **It runs in the customer's browser,** with their own session and cart. PandaDesk never sees their cookies. - **Return a message** to show under the button, or throw an error to show that it didn't work. The team sees "Customer clicked Add to cart" in the conversation. **Shopify themes** get `add_to_cart` built in: the chat adds to the shopper's cart through the theme's cart API and fires `cart:updated` and `cart:refresh` events so the cart icon updates. Register your own `add_to_cart` to replace it. ## In the inbox and elsewhere - **Inbox:** the cards a customer saw show as a compact list under the AI's reply. - **Phone app and MCP:** cards and suggestions show as text. - **Webhooks:** `message.created` events include the cards as `blocks`. --- # Lead forms Let the AI agent ask for contact details in the chat with a short form, for a sales call, a quote or a callback. A lead form is a short form the AI agent shows in the chat when it fits, like "Talk to sales" or "Get a quote". You say when to use each one; the agent picks the form and the customer fills it in. Lead forms work on every paid plan. ## Create a form Go to **AI agent → Lead forms** and choose **New form**: - **Name**: shown at the top of the form. - **When to use it**: the agent reads this to decide when to show the form, e.g. "When the customer asks about pricing for a team or wants a demo". - **Fields**: any of name, email, phone, company and message, plus custom text fields. Mark the ones that are required. - **Button** and **After sending** text (optional). Turn a form off to stop the agent showing it without deleting it. ## In the chat When a question matches a form's "when to use", the agent answers with a short line and the form under it. The AI never fills in or sends the form. Emails are checked, and required fields must be filled. ## What a submission does - **Contact**: the name and email go on the conversation and the contact. A customer signed in with [signed identity](/docs/signed-identity) keeps their verified email. - **Private note**: the answers are added as a note on the conversation and the contact, for your team only. - **Webhook**: a [`lead.created`](/docs/webhooks) event is sent, with the form and its answers. - **Slack**: posted too, if [Slack alerts](/docs/slack) include leads. ## With MCP `list_forms`, `save_form` (create, or update by `id`) and `delete_form`. Fields are `{ kind, label, required }`, where `kind` is `name`, `email`, `phone`, `company`, `message` or `text`. --- # Shopify Connect your Shopify store so the AI shows products as cards with Add to cart and tells shoppers where their order is. Connect a Shopify store and your products become part of what the AI knows. Shoppers ask in their own words ("trail shoes under $100") and get **product cards** with the photo, price and options, plus **Add to cart**, which adds to their own cart on your store. They can also ask **where their order is**. PandaDesk only reads your store. It never places orders, changes them or issues refunds; those go to your team. Shopify is on the Pro plan. ## Connect your store 1. Install PandaDesk from the Shopify App Store, or choose **Install from Shopify** under **Integrations → Shopify** in PandaDesk. 2. In Shopify, approve read access to products and orders. 3. Shopify brings you back to PandaDesk. Sign in (or start a trial) and choose the workspace whose AI should answer your shoppers. Opening PandaDesk from **Apps** in your Shopify admin takes you straight to the connected workspace. If a store ever shows **Reconnect**, choose it to approve access again. Your products sync right away, again every day, and whenever you change a product in Shopify. Only active products are synced, up to your plan's limit. ## Show the chat on your store In PandaDesk, go to **Integrations → Shopify** and choose **Turn on chat in your theme**. Your theme editor opens with **PandaDesk chat** already switched on under **App embeds**. Check the preview and choose **Save**. There's no key to paste: the chat uses the workspace your store is connected to. You can also turn it on yourself under **Online Store → Themes → Customize → App embeds**. To show a different workspace's chat, paste that workspace's public key into the embed's settings (from **AI agent & widget → Install**). Your store's domain is added to your [allowed websites](/docs/security-and-privacy) when you connect. ## Add to cart Product cards have an **Add to cart** button. It runs in the shopper's browser and adds to their own cart through your theme's cart, so nothing changes for checkout. PandaDesk then fires `cart:updated` and `cart:refresh` events so your theme's cart icon updates. A theme that listens for other events can register its own action instead: see [browser actions](/docs/cards-and-actions#browser-actions). Cards also have **View** (the product page) and **Buy now** (straight to checkout with that item). ## Order status Shoppers can ask where their order is: - **Signed-in customers** ([signed identity](/docs/signed-identity)) just ask: the AI looks up the orders for their verified email. - **Guests** give the email they used at checkout and their order number. Both must match. The AI answers with the order's status, items, total and tracking, and shows the order as a card with **Track package** and **Order details**. Order data is never cached or shown to anyone else. Returns, exchanges and refunds are handed to your team. ## Customer privacy requests When a customer of your store asks Shopify for their data or to be forgotten, Shopify passes the request to PandaDesk: - **Data request:** PandaDesk gathers what it holds about them (their contact, their chats with your store and your team's notes, matched by email) and emails your workspace's admins a link to download it. Send it to the customer. The download is kept for 30 days. - **Erasure request:** PandaDesk deletes their contact, chats and notes from the workspace. This keeps working after you uninstall the app, because Shopify can send these requests later. ## Disconnect **Integrations → Shopify → Disconnect** removes the store's products from the AI's knowledge and uninstalls the PandaDesk app from your store. Uninstalling from Shopify does the same. ## With your coding agent - `shopify_status` lists connected stores (products, last sync, errors) and gives a link to connect one. - `shopify_sync` re-syncs a store's products now. - `test_question` shows the cards a question would get. --- # WooCommerce Show your WooCommerce products as cards with Add to cart, and let customers look up their orders, through the PandaDesk WordPress plugin. With WooCommerce connected, the AI agent can recommend products from your store as **cards** with a price, a picture and an **Add to cart** button, and answer "where's my order?" with the order's status, items, totals and tracking. WooCommerce is part of the **Pro** plan. The AI never places, changes, cancels or refunds orders. Add to cart runs in the shopper's own browser when they click it, and order lookups are read-only. ## Connect your store WooCommerce connects through the PandaDesk WordPress plugin; there's nothing to set up in PandaDesk itself. 1. Install the PandaDesk plugin, version 1.1 or later (**Install → WordPress** has the download). 2. In WordPress, go to **Settings → PandaDesk** and click **Connect to PandaDesk**. Sign in, approve the site and pick the workspace. 3. With WooCommerce active, the plugin tells PandaDesk about the store and your products start syncing. Already connected with version 1.0 of the plugin? Update it, then **Disconnect** and **Connect** once: version 1.1 saves the secret PandaDesk signs its store requests with. You'll find the store under **Integrations → WooCommerce**: how many products are synced, when, and any error. **Sync products now** re-reads every product. ## Products - PandaDesk reads every published product that isn't hidden from your catalog: name, descriptions, categories, tags, price, image, stock status and variations (with their attributes, prices and stock). - Saving or deleting a product in WooCommerce updates PandaDesk within seconds. Everything is also re-synced daily. - Your plan sets how many products each workspace can hold (10,000 on Pro). A store with more stops at the limit, and the Integrations page says so. - The agent finds products with its `search_products` tool and shows the ones that match as cards. Products are also part of your knowledge, so ordinary answers can cite them. ### Add to cart The plugin registers the `add_to_cart` [browser action](/docs/cards-and-actions) on your storefront. When a shopper clicks **Add to cart** on a card, the product (or the variation shown) goes into their own cart through the WooCommerce Store API, and your theme's mini cart refreshes. If the product can't be added (out of stock, a variation needs options picked), the chat says so; the **View** button opens the product page. ## Orders The agent gets a `woo_order_status` tool: - **Signed-in customers.** When a logged-in WordPress user chats (the plugin signs them in to the chat automatically), the agent looks up their own recent orders, or one of them by number. It can't see anyone else's. - **Guests.** The agent asks for the order number and the email address used at checkout, and only finds the order when both match, like WooCommerce's own order-tracking form. The answer shows the order as a card with its status, total and a **View order** button, plus **Track package** when there's a tracking link. Tracking numbers come from WooCommerce Shipment Tracking, Advanced Shipment Tracking, AfterShip or YITH Order Tracking when one of them is installed. Sequential order-number plugins that hook WooCommerce's order tracking work too. ## How it's secured - PandaDesk calls two REST routes the plugin adds, `GET /wp-json/pandadesk/v1/products` and `GET /wp-json/pandadesk/v1/orders/lookup`. Both only answer requests signed with your workspace's signing secret, exactly like [lookups](/docs/lookups): `PandaDesk-Signature: t=,v1=...">`, valid for 5 minutes. - For signed-in customers the WordPress user ID is sent as `PandaDesk-User-Id` and repeated in the signed URL, so it can't be swapped. - The plugin's site key can only ask PandaDesk to re-read or forget pages and products on its own site. - Disconnecting the store under **Integrations → WooCommerce** removes its products from PandaDesk; the WordPress site stays connected. Disconnecting the plugin stops syncing and order lookups. ## Troubleshooting | What you see | What to do | |---|---| | "WordPress refused PandaDesk's signature" | Disconnect and connect again in **Settings → PandaDesk** in WordPress. Behind a proxy or CDN, make sure WordPress sees the site's public `https` address. | | "WordPress doesn't have PandaDesk's WooCommerce routes" | Update the plugin to 1.1 or later, and check WooCommerce is active. | | No store listed under a connected site | The plugin announces the store the next time an admin opens the dashboard. Or click **Sync products now**. | | Add to cart says it failed | The product may need options picked, or be out of stock; check it on the product page. | --- # Stripe billing Let signed-in customers ask about their plan and invoices in the chat, and get a button to Stripe's billing portal. Connect Stripe and the AI agent can answer billing questions for **signed-in customers**: which plan they're on, when it renews, their recent invoices, and a link to manage their billing. Answers come as cards built from Stripe's data, never written by the AI. Stripe is on the **Pro** plan. The agent only reads. It can't change a plan, refund, cancel or charge anyone: when a customer wants a change, it shows a button to Stripe's own [customer portal](https://docs.stripe.com/customer-management), where they make it themselves. ## What customers get | Tool | Shows | |---|---| | `billing_subscription` | A card with the plan, status, price and renewal (or cancel or trial end) date | | `billing_invoices` | The last 5 invoices as cards (number, status, amount, date), each with a **View / Pay** link to Stripe's hosted invoice page | | `billing_portal_link` | A card with an **Open billing portal** button: a fresh portal session for this customer, valid for a short time | ## Who can see billing Billing tools only run for customers identified with [signed identity](/docs/signed-identity) who have an email. PandaDesk finds the Stripe customer by that verified email, never by anything typed in the chat. Visitors who aren't signed in don't get the tools at all, so the agent can't be talked into looking up someone else's account. ## Connect 1. In Stripe, open **Developers → API keys** and choose **Create restricted key**. 2. Set **Read** on Customers, Subscriptions, Invoices and Products, and **Write** on Customer portal. Leave everything else at None. (Products is optional: without it, plans show the price's nickname.) 3. Turn on the customer portal under **Settings → Billing → Customer portal**. 4. In PandaDesk, go to **Integrations → Stripe**, paste the key (`rk_live_…`, or `rk_test_…` to try it in test mode) and click **Connect**. PandaDesk makes a harmless read first and only saves a key Stripe accepts. Full secret keys (`sk_…`) are refused. The key is stored encrypted. Optionally set a **return URL**: where the portal's back link goes. If Stripe later refuses the key (revoked or rolled), the integration shows **Reconnect** and the agent stops offering billing tools until you paste a new one. ## With MCP `list_integrations` shows the status, `connect_stripe` takes `key` and `return_url`, and `disconnect_integration` removes it. Admins only. --- # Booking with Cal.com and Calendly Show your next open times as cards in the chat; customers click to book a call or demo. When a customer wants a call, a demo or a meeting, the AI agent can show your next open times as cards. Connect **Cal.com** or **Calendly** under **Integrations**. Both are on the **Pro** plan. The agent never books anything itself: the customer picks a time and clicks. ## Cal.com 1. In Cal.com, go to **Settings → Developer → API keys** and create a key without an expiry. 2. In PandaDesk, open **Integrations → Cal.com**, paste the key and click **Connect**. PandaDesk checks it and lists your event types. 3. Pick the **event type** customers book and the **time zone** to show times in. The agent's `booking_slots` tool shows up to six open times in the next week (or from a day the customer asks for) as cards with a **Book** button. Clicking **Book** books that time in Cal.com with the customer's name and email: - A signed-in or known customer books right away. - Otherwise the chat asks for their name and email first. Cal.com checks the time is still free and emails the invite to both sides; the chat posts a confirmation. A customer can only book a time the chat showed them. ## Calendly 1. In Calendly, go to **Integrations & apps → API and webhooks** and create a **personal access token**. (Signing in with Calendly through OAuth is coming later.) 2. In PandaDesk, open **Integrations → Calendly**, paste the token and click **Connect**. 3. Pick the **event type** and **time zone**. `booking_slots` shows open times as cards; each **Book** button opens Calendly's own page for that time, where the customer confirms. If both are connected, Cal.com's times are shown. ## With MCP `connect_calcom` (`api_key`, `event_type_id`, `time_zone`) and `connect_calendly` (`token`, `event_type_uri`, `time_zone`) connect or change the event type; `list_integrations` shows each one's event types. Admins only. --- # Slack alerts Post to a Slack channel when the AI hands a conversation to your team, a chat starts, or a lead comes in. Get a Slack message, with a button to open the conversation in PandaDesk, when: - the AI **hands a conversation to your team** (on by default), - a customer **starts a conversation**, - a customer sends a [lead form](/docs/lead-forms). Slack alerts work on every paid plan. ## Connect 1. In Slack, [create an app](https://api.slack.com/apps) (or open one you have), turn on **Incoming Webhooks**, and choose **Add New Webhook to Workspace** for the channel. 2. In PandaDesk, go to **Integrations → Slack**, paste the webhook URL (`https://hooks.slack.com/services/…`), pick the events and click **Connect**. PandaDesk posts a test message before saving, so a wrong URL is caught right away. The URL is stored encrypted. Alerts are delivered in the background and retried if Slack doesn't answer. If Slack says the webhook is gone (the channel was archived or the app removed), the integration shows **Reconnect**: paste a new URL. ## What's posted ```text Pat needs your team · Acme Pat · pat@example.com > Can I get a refund? [Open in PandaDesk] ``` A lead alert also lists the form's answers. Need something else posted, or another tool? Use [webhooks](/docs/webhooks). ## With MCP `connect_slack` takes `webhook_url` and `events`; without a URL it only changes the events. Admins only. --- # Inbox Where your team reads and answers the conversations the AI hands off, with views, statuses, assignment, labels, notes, saved replies and drafts. The inbox holds every chat conversation from your website. Most are answered by the AI on its own. The ones that need a person, because the customer asked for one or the AI couldn't answer, wait here for your team. Away from your desk? The [phone app](/docs/mobile-app) notifies you when a conversation needs you and lets you reply from your phone. ## Views The three tabs at the top of the list split conversations by who owns them: | Tab | Shows | |---|---| | **Mine** | Conversations assigned to you | | **Unassigned** | Conversations nobody is assigned to | | **All** | Every conversation | Each tab shows how many conversations in it are unread, for the status you're filtering by. ## Statuses Every conversation has one status: | Status | Meaning | |---|---| | **AI handling** | The AI is answering and nobody on the team has stepped in. | | **Open** | Handed to the team, or a teammate replied. Someone should answer. | | **Pending** | You're waiting on the customer. | | **Snoozed** | Hidden until a time you pick. | | **Resolved** | Done. | The list shows **Open** by default. Use the status filter to see others, or **All statuses**. How a conversation moves between statuses: - The AI hands off when the customer asks for a person, accepts the AI's offer to pass the question on, or asks two questions in a row it can't answer. The conversation becomes **Open** and your team gets an email. See [AI agent](/docs/ai-agent). - When a teammate replies (from the inbox, the phone app, an approved draft or an agent's `send_reply`), the conversation becomes **Pending**: it's waiting on the customer, so **Open** only lists conversations you still owe a reply on. From then on the AI only answers a new product question your knowledge covers, and leaves everything else to your team (see [Handing off to your team](/docs/ai-agent#handing-off-to-your-team)). A new message from the customer moves a pending, snoozed or resolved conversation back to **Open**. - A new message from the customer reopens a **Pending**, **Snoozed** or **Resolved** conversation as **Open**. - A snoozed conversation also comes back as **Open** and unread when its time passes. The check runs whenever someone loads the inbox. ## Search, filters and sorting - **Search** matches the customer's name, email, the conversation subject and the text of any message. - **Filters:** status, label, and assignee. - **Sort:** newest activity first (default), oldest first, or **waiting longest**. Waiting longest puts first the conversations where the customer's oldest unanswered message is oldest. The list shows up to 200 conversations at a time. Each row shows the customer's name (or a [visitor tag](/docs/contacts) like *Visitor 4F2A*), the AI summary or last message, labels, assignee, and how long the customer has been waiting since their first unanswered message. ## Answering a conversation Open a conversation to see the whole thread: the customer's messages, the AI's answers, system events such as hand-offs, and your team's replies. A summary written by the AI sits at the top of handed-off conversations. Under each AI answer, **How was this answered?** shows what the AI searched, which passages it cited, and why it handed off or declined, if it did. ### Replies and private notes The reply box has two modes: - **Reply** sends a message the customer sees in the chat. While you type, the customer sees "*Name* is typing…". - **Private note** is visible only to your team. Notes are never shown to customers and never returned by the chat widget's API. The **Polish**, **Friendlier** and **Shorter** buttons rewrite your draft with AI before you send it. ### Saved replies Type `/` in the reply box, then the start of a shortcut, to insert a saved reply. Press **Enter** or **Tab** to pick it. Manage saved replies under **Settings → Inbox**. Shortcuts are one word (letters, numbers, `-` or `_`, up to 30 characters), and a reply can be up to 5,000 characters. ### Seen and typing - When the customer has the chat open, you see "*Name* is typing…" in the conversation. - Under your last reply, **Seen by *Name*** appears once the customer has had the chat open since you sent it. ## Status, assignment and labels Use the controls at the top of a conversation: - **Resolve** (or **Reopen**). The menu next to it also has **Mark as open**, **Mark as pending**, and **Snooze until**: 1 hour, 4 hours, tomorrow at 9 am, next Monday at 9 am, or a date and time you choose. - **Assign** to yourself or a teammate. The assignee gets an email, unless they assigned themselves. - **Labels:** add or remove labels. Create and colour them under **Settings → Inbox**. Label names are up to 40 characters. ### Round-robin assignment Turn on **Round-robin new hand-offs** under **Settings → Inbox**. Each conversation the AI hands off then goes to the teammate who was assigned one least recently, and they get an email. Conversations that already have an assignee keep it. ## Bulk actions Tick conversations in the list to **Resolve**, **Assign** or **Label** them together, up to 200 at a time. ## Email notifications | Who | When | |---|---| | Everyone on the workspace | The AI hands a conversation to the team. The email includes the question, the AI summary and a link to the conversation. | | The assignee | Someone else assigns them a conversation, or round-robin does. | | The customer | A teammate replies and the customer doesn't see the reply in the chat within 2 minutes. This needs an email address for them. | ### Getting the customer's email When a conversation is handed to the team and the customer is anonymous, the chat shows a **Get the reply by email** box. It's optional, and the customer can choose **No thanks**. An email they type is saved on the conversation and their [contact](/docs/contacts) as unverified, and the chat confirms "We'll also email replies to …". Replies that the customer doesn't see in the chat within 2 minutes go to that address, or to the email from [signed identity](/docs/signed-identity). Several quick replies go out as one email, with a link back to the page they chatted from. Replies to these emails aren't read, so customers continue in the chat. ## Drafts from coding agents A coding agent connected through MCP or the CLI can propose a reply with `create_draft_reply`. Drafts appear in the conversation under **Drafts from Claude**, where a teammate can **Approve & send**, **Edit** first, or **Discard**. A conversation can hold up to 5 waiting drafts. To let agents send replies directly instead, an admin turns on **Let agents send replies** under **Settings → Inbox**. It's off by default. See [Connect your AI agent](/docs/connect-ai-agent). ## Turning answers into knowledge From a conversation you can: - **Save as answer:** create a [pinned answer](/docs/knowledge-sources) from it. - **Turn into article:** draft a [help-center article](/docs/help-center) from it. With **Learn from team replies** on (Sources), resolving a conversation your team answered proposes that answer as knowledge for you to approve. Nothing is used until you approve it. ## With your coding agent These are Pro plan tools. Each also works as `npx pandadesk `. | Task | Tool | |---|---| | List conversations | `list_conversations` (for example `--status needs_reply`) | | Read one | `get_conversation` | | Reply | `create_draft_reply`, or `send_reply` when agents may send | | Change status | `set_conversation_status` | | Assign | `assign_conversation` | | Label | `label_conversation` | | Add a private note | `add_note` | | Allow agents to send (admin) | `set_agents_can_send` | The `triage_inbox` prompt walks an agent through the waiting conversations. See the [MCP reference](/docs/mcp-reference). --- # Phone app Answer customers from your iPhone, approve drafted replies, and get a notification when the AI hands a chat to your team. The PandaDesk phone app puts your inbox in your pocket. When the AI on your site hands a customer to your team, your phone tells you, and you can read the whole chat and reply in seconds. It's included with every plan, for every teammate. - **iPhone:** [Download PandaDesk on the App Store](https://apps.apple.com/app/pandadesk/id6834195766). - **Android:** coming soon to Google Play. On a computer, choose **Get the phone app** at the bottom of the sidebar in your dashboard and scan the code with your phone's camera. It opens the right store for your phone. ## Sign in 1. Open the app and tap **Sign in**. 2. Sign in with the same PandaDesk account you use on the web. 3. You're back in the app with every workspace you belong to. If you're in more than one, tap **Switch** at the top of the inbox to change workspace. There's no separate sign-up in the app. Accounts and workspaces are created on [pandadesk.app](https://pandadesk.app). To give a teammate the app, [invite them to the workspace](/docs/team-and-roles) and they sign in with their own account. ## What you can do - **Work the inbox.** See every open conversation, or filter to the ones assigned to you or not assigned yet. - **Read the whole chat.** The customer's messages and everything the AI already answered. - **Reply.** Your reply reaches the customer in the chat on your site, the same as replying from the web. - **Approve drafted replies.** When an AI agent drafts a reply for review, edit it, send it under your name, or discard it. The app warns you before you send a second answer to the same message. - **Assign and resolve.** Hand a conversation to a teammate, take it yourself, or mark it resolved. Settings that change how the chat behaves on your site stay on the web. ## Notifications When you sign in, the app asks to send notifications. In the app's **Settings** you choose when your phone tells you: - A conversation is handed to the team. - A conversation is assigned to you. - A customer writes in a conversation the team has. - A drafted reply is waiting for review. Notifications are private by default: they say what happened without the customer's name or words, so nothing personal shows on your lock screen. Turn on **Show names and messages** if you want previews. Turn off **Notify me on this phone** to stop notifications on that phone without signing out. ## Lock the app In **Settings**, turn on **Lock with Face ID** (or Touch ID or your fingerprint, depending on the phone). The app then asks for it when it opens and again after a minute away. ## Sign out Open **Settings** and tap **Sign out**. That phone stops getting notifications until you sign in again. Removing someone from a workspace on the web also removes that workspace from their phone. --- # Contacts Everyone who has chatted with you, with who they are, where they chatted from, their conversations and team notes, and how to block someone. A contact is created for every visitor who opens a chat. The **Contacts** page lists them, newest activity first. Each contact's page shows their details, recent visit, conversations and your team's notes about them. ## How contacts are named | Visitor | Shown as | |---|---| | Identified by your site (see [Signed identity](/docs/signed-identity)) | Their name, or email | | Gave an email in the chat | That email | | Anonymous | A short tag, like **Visitor 4F2A** | The tag comes from the visitor's browser id, so the same anonymous visitor always gets the same tag. > **Note:** An anonymous visitor who clears their browser storage starts over as a new visitor. A signed-in user is the same contact on every device. ## Contact details | Field | What it is | |---|---| | **Email** | From signed identity, or what the visitor typed | | **User ID** | Your own user id, from signed identity | | **Identity** | **Signed by your backend** (verified), **Typed by the visitor (unverified)**, or **Anonymous** | | **First seen** / **Last seen** | When they first and last chatted | | **Conversations** | How many they've had | | **Average rating** | Their average [CSAT](/docs/csat) rating, and how many ratings | Search the list by name, email or user ID, or show **Blocked only**. ## Visit details Every customer message records where the visitor was chatting from. The conversation header and the contact's **Last visit** show: - **Page:** the page they're on (it updates when a single-page app changes route). - **Came from:** the site that sent them, if it's a different site. - **Browser and device:** for example *Chrome on macOS*, or a phone or tablet. - **Their local time,** with their timezone, for example *9:31 AM their time (Europe/London)*. The page, title, referrer, timezone and language are reported by the chat on your site. The browser and device come from the request itself. ## Team notes Add notes about a contact on their page, for example "Enterprise customer, prefers email". Notes are private to your team, like notes in a conversation, and never shown to the customer. ## Blocking **Block** stops a contact from sending new chat messages. They see a polite notice instead: > Sorry, we can't take new messages from this chat right now. If you think this is a mistake, contact *Your company* another way. Their past conversations stay readable in your inbox. **Unblock** lets them write again. Blocking follows the visitor id: - A signed-in user stays blocked on any device. - An anonymous visitor who clears their browser storage starts over. Separately, the AI blocks a visitor for 24 hours on its own after repeated abuse or spam. See [AI agent](/docs/ai-agent). ## With your coding agent These are Pro plan tools; `npx pandadesk ` works too. | Task | Tool | |---|---| | Search and list contacts | `list_contacts` | | One contact, with conversations, notes and last visit | `get_contact` | | Block or unblock | `block_contact` | | Add a note | `add_note` | --- # Customer satisfaction How customers rate a resolved conversation, and where you see the ratings. When a conversation is resolved, the chat asks the customer to rate it. You see each rating on the conversation and contact, and a summary in [Reports](/docs/reports). ## What the customer sees After you resolve a conversation, the chat shows **How did we do?** with five stars: | Stars | Label | |---|---| | 1 | Terrible | | 2 | Bad | | 3 | Okay | | 4 | Good | | 5 | Great | Once they pick a rating, they can add an optional comment of up to 1,000 characters and send it. The chat then thanks them. Rating again replaces the earlier rating. Only resolved conversations can be rated. Conversations that were closed because of abuse or spam never ask for a rating. ## Where you see ratings - **The conversation:** a "Rated 4/5" chip in the header, with the comment. - **The inbox list:** the rating on each row. - **The contact:** their average rating and how many ratings. - **[Reports](/docs/reports):** - the average rating; - the share rated 4 or 5; - how many ratings came in during the period, and how they split across the five scores. ## Rating webhooks Every new rating sends a `csat.submitted` [webhook](/docs/webhooks) event, with the rating and comment. ## With your coding agent `get_report` (Pro) returns the CSAT summary. `get_conversation` and `get_contact` include individual ratings. --- # Business hours and auto-close Tell customers when your team is back, and resolve quiet conversations automatically. The AI answers around the clock. Business hours only change what customers are told about your *team*: outside your hours, the chat says when you're back instead of implying someone will reply right away. Auto-close tidies up conversations that went quiet. Both are under **Settings → Business hours**. Only admins can change them. ## Setting your hours 1. Turn on **Use business hours**. While it's off, your team always counts as in. 2. Pick your **Time zone**. 3. Tick the days you work and set opening and closing times (24-hour, for example 09:00 to 17:30). Unticked days count as closed. Closing must be after opening; hours that run past midnight aren't supported. 4. Optionally write an **Away message** of up to 500 characters. 5. **Save.** The page tells you whether your team is in or away right now. ## What changes outside your hours - **The chat header** says *"AI answers now · the team is back tomorrow at 09:00 (Europe/London)"*, instead of the usual subtitle. - **Hand-offs** add a note to the message the customer sees. With no away message set, the note reads *"The team is away right now and back Monday at 09:00 (Europe/London)."* If you wrote an away message, that's used instead. "Back" is the next opening within a week: *today*, *tomorrow*, or a weekday name. Your team still gets the hand-off email. If the customer leaves an email in the chat, they get your reply by email as well. See [Inbox](/docs/inbox). ## Auto-close Turn on **Resolve quiet conversations** and set the number of hours (1 to 2,160, which is 90 days). A conversation is resolved automatically when all of these are true: - its status is AI handling, Open or Pending (snoozed conversations are left alone); - nobody has written in it for that many hours; - **the last message wasn't the customer's**: it was the AI's or your team's. > **Note:** A customer who is waiting for an answer is never closed on. If their message is the last one, the conversation stays open however long it waits. Auto-closed conversations get a system message, *"Resolved automatically after 24 hours without a reply."*, and send a `conversation.resolved` [webhook](/docs/webhooks) with `"by": "auto_close"`. The check runs about once a minute. If the customer writes again, the conversation reopens. ## With your coding agent `get_business_hours` and `set_business_hours` read and change the hours, away message and auto-close (admin; every plan). Also available as `npx pandadesk get_business_hours`. --- # Reports How the AI and your team handled conversations, with response and resolution times and customer satisfaction. **Reports** (in the sidebar) summarizes the conversations started in the last 7, 30 or 90 days: how many the AI handled alone, how fast your team replied and resolved, and how customers rated you. ## Headline numbers | Metric | Definition | |---|---| | **Conversations** | Conversations started in the period. Also shows how many were closed as abusive. | | **Handled by the AI alone** | Share of those conversations your team never had to touch (see below). | | **First team reply** | Median time from the hand-off to the first teammate reply after it, across handed-off conversations that got a reply. | | **Time to resolve** | Median time from a conversation's start to the first time it was resolved, across conversations resolved so far. | ### "Handled by the AI alone" vs "involved the team" A conversation **involved the team** if any of these is true: - it's currently Open, Pending or Snoozed; - a teammate replied in it; - the AI handed it off. Every other conversation counts as handled by the AI alone, whatever its status now. For example, a conversation the AI answered and that you later resolved still counts as the AI's. The Overview page's chart uses the same rule. > **Note:** First team reply and Time to resolve come from a log of hand-off and resolve events that started when this feature launched. Older conversations don't have those events, so they don't count toward these two times. ## Conversations per day A stacked bar per day: conversations answered by the AI alone, and conversations handed to your team. Hover a bar for that day's numbers. ## AI agent | Number | What it counts | |---|---| | **Answers from your content** | AI replies grounded in your knowledge | | **Questions it couldn't answer** | Linked to **Not answered**, where you can add the missing knowledge | | **Lookups in your systems** | Calls the AI made to your [lookups](/docs/lookups) | | **Handed to the team** | Conversations that involved the team | ## Customer satisfaction These count the [ratings](/docs/csat) given during the period: - the average rating out of 5; - the share of ratings that were 4 or 5; - how many ratings there were at each score. ## With your coding agent `get_report` (Pro) returns the same numbers for a range of 7, 30 or 90 days: `npx pandadesk get_report --range 30`. --- # Webhooks Get a signed HTTP request on your server when a conversation starts, gets a message, is handed off or resolved, is rated, or a lead form is sent. A webhook sends a JSON `POST` to your URL each time something happens in a conversation. Use it to sync conversations to a CRM, post hand-offs to Slack, or trigger your own automation. Webhooks are under **Settings → Webhooks** and available on every plan. Only admins can manage them. ## Events | Event | Sent when | |---|---| | `conversation.created` | A customer starts a conversation | | `message.created` | Any new message: from the customer, the AI, a teammate, or the system | | `conversation.handed_off` | The AI passes a conversation to your team | | `conversation.resolved` | A conversation is resolved by a teammate, by [auto-close](/docs/business-hours), or because of abuse | | `csat.submitted` | A customer [rates](/docs/csat) a resolved conversation | | `lead.created` | A customer sends a [lead form](/docs/lead-forms) in the chat | ## Adding a webhook 1. Go to **Settings → Webhooks**. 2. Enter your endpoint URL. It must start with `https://`. 3. Pick the events to receive. All six are selected by default. 4. Click **Add webhook**. A workspace can have up to 10 webhooks. For each one you can turn it on or off, **Send test**, or delete it. The list shows the result of the last delivery. ## The request ```http POST /your/endpoint HTTP/1.1 Content-Type: application/json PandaDesk-Event: conversation.handed_off PandaDesk-Delivery: 7f0c1e2a-… (unique per delivery) PandaDesk-Signature: t=1792915200,v1=5d41402abc4b2a76b9719d911017c592… ``` Every body has the same envelope: ```json { "id": "3b1f…", "type": "conversation.handed_off", "created_at": "2026-10-25T09:31:02.114Z", "workspace_id": "a51c…", "data": { "conversation": { "id": "58e74e6b-b2bb-4588-87cc-72aba0043210", "status": "open", "subject": "Can I get a refund?", "created_at": "2026-10-25T09:30:12.000Z", "contact": { "name": "Pat", "email": "pat@example.com", "user_id": "user_42", "verified": true } }, "summary": "The customer wants a refund for an order placed two weeks ago…" } } ``` `id` identifies the event. `conversation.status` is one of `ai`, `open`, `pending`, `snoozed` or `closed` (resolved). `contact.verified` is `true` only for visitors identified with [signed identity](/docs/signed-identity). Each event adds its own fields to `data`: | Event | Extra fields in `data` | |---|---| | `conversation.created` | none | | `message.created` | `message`: `{ id, role, body, created_at, sources? }`. `role` is `visitor`, `ai`, `agent` (a teammate) or `system`. `sources` lists the titles the AI cited. | | `conversation.handed_off` | `summary`: the AI-written summary for your team (may be `null`) | | `conversation.resolved` | `by`: `team`, `auto_close` or `abuse` | | `csat.submitted` | `rating` (1–5), `comment` (or `null`) | | `lead.created` | `form`: `{ id, name }`; `values`: the answers by field key (`name`, `email`, `phone`, `company`, `message`, or a custom field's key); `fields`: `[{ key, label, kind }]` for the answered fields; `contact_id` | A `message.created` example: ```json { "id": "c2d9…", "type": "message.created", "created_at": "2026-10-25T09:30:15.402Z", "workspace_id": "a51c…", "data": { "conversation": { "id": "58e7…", "status": "ai", "subject": "How do I export my data?", "created_at": "…", "contact": { "name": null, "email": null, "user_id": null, "verified": false } }, "message": { "id": "5dcc…", "role": "ai", "body": "Go to **Settings → Data** and choose **Export**…", "created_at": "…", "sources": ["Export your data"] } } } ``` ## Verifying the signature Check every request before trusting it. `PandaDesk-Signature` is `t=,v1=`. The hex is HMAC-SHA256, keyed with your workspace's **signing secret**, of the timestamp, a dot, and the **raw request body**. Verify against the raw bytes, before parsing the JSON, and reject old timestamps. Node.js (Express): ```js import crypto from "node:crypto"; import express from "express"; const app = express(); app.post("/pandadesk/events", express.raw({ type: "application/json" }), (req, res) => { const header = req.get("PandaDesk-Signature") ?? ""; const { t, v1 } = Object.fromEntries(header.split(",").map((p) => p.split("="))); const expected = crypto.createHmac("sha256", process.env.PANDADESK_SIGNING_SECRET) .update(`${t}.${req.body}`).digest("hex"); const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300; if (!fresh || !v1 || v1.length !== expected.length || !crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected))) { return res.sendStatus(400); } const event = JSON.parse(req.body); // … handle event.type res.sendStatus(200); }); ``` Python (Flask): ```python import hmac, hashlib, json, os, time from flask import Flask, request, abort app = Flask(__name__) @app.post("/pandadesk/events") def pandadesk_events(): parts = dict(p.split("=", 1) for p in request.headers.get("PandaDesk-Signature", "").split(",")) t, v1 = parts.get("t", "0"), parts.get("v1", "") body = request.get_data() # raw bytes expected = hmac.new(os.environ["PANDADESK_SIGNING_SECRET"].encode(), f"{t}.".encode() + body, hashlib.sha256).hexdigest() if abs(time.time() - int(t)) > 300 or not hmac.compare_digest(v1, expected): abort(400) event = json.loads(body) # … handle event["type"] return "", 200 ``` ### The signing secret It's shown at the bottom of **Settings → Webhooks** (admins only), where you can copy or **Rotate** it. A coding agent gets it with `get_signing_secret`. > **Note:** The same secret also signs requests from [lookups](/docs/lookups). Rotating it takes effect immediately for both, so update your servers right after. ## Delivery and retries - Answer with any `2xx` status within 10 seconds for a delivery to count. Redirects aren't followed. - A failed delivery (timeout, connection error, or a non-2xx status) is retried up to 6 attempts in total. The waits roughly double each time, starting at about 15 seconds, so all attempts finish within about 10 minutes. - URLs that resolve to a private or internal address are refused and not retried. - Deliveries can arrive more than once and out of order. Use the event `id` to ignore duplicates, and `created_at` to order them. **Send test** posts a sample event right away, with `"type": "test"` and a short message in `data`. It shows the result next to the webhook. ## With your coding agent `list_webhooks`, `add_webhook` (sends a test event unless `send_test` is false) and `delete_webhook`. These are admin tools, on every plan. CLI: `npx pandadesk add_webhook --url https://example.com/hooks --events '["conversation.handed_off"]'`. --- # WhatsApp, Instagram and Messenger Connect WhatsApp numbers, Instagram accounts and Facebook Pages so their messages land in your inbox and the AI agent answers them. Customers can reach you on WhatsApp, Instagram direct messages and Facebook Messenger as well as in the chat. Every message lands in the same inbox, the AI agent answers it from the same knowledge, and it hands off to your team exactly as it does in the chat. Channels are on the Pro plans, and only admins can connect them. ## Connect a channel Open **Settings → Channels**. - **Messenger and Instagram**: choose **Connect with Facebook**, sign in, and share the Facebook Pages you want. Back in PandaDesk, tick Messenger for each page, and Instagram for the Instagram professional account linked to that page. To connect an Instagram account, it has to be a professional (business or creator) account linked to a Facebook Page, and **Allow access to messages** has to be on in the Instagram app (Settings → Privacy → Messages → Connected tools). - **WhatsApp**: choose **Connect WhatsApp** and follow Meta's signup to pick or create a WhatsApp Business account and phone number. You can instead enter a phone number ID, WhatsApp Business Account ID and a permanent system-user token from Meta Business Settings. A page or number can be connected to one PandaDesk app at a time. **Disconnect** stops new messages from reaching the inbox; existing conversations stay. ## How conversations work - Each customer gets a contact (shown with a WhatsApp, Instagram or Messenger badge in the inbox), so blocking, notes and history work as in the chat. - Messages arrive as text. Photos, voice notes and files show as **[image]**, **[audio]** or **[attachment]**: open the conversation on your phone to see them. - AI, teammate and system replies are sent on the channel as plain text. Formatting is removed and the pages the AI cited are listed at the end. Replies are never emailed. - A resolved conversation stays resolved: the customer's next message starts a new one. - If Meta rejects a reply, the message shows **Not delivered** with the reason, and an expired or revoked token shows on the channel in Settings. Reconnect the channel to fix it. ## The 24-hour window Meta only lets businesses send free-text messages within 24 hours of the customer's last message. After that, PandaDesk doesn't send the reply: the message is marked as not delivered, and the reply box warns you before you write. Once the customer writes again, the window opens for another 24 hours. WhatsApp message templates (for writing first) aren't supported yet. ## Reports and webhooks **Reports** splits conversations by channel once you use more than the chat. Webhook events carry `conversation.channel` (`widget`, `whatsapp`, `instagram` or `messenger`). ## For coding agents `list_channels` shows what's connected and any errors; `get_channel_status` gives one channel's health, or whether a conversation's 24-hour window is still open. Connecting needs a Facebook sign-in, so it stays in the dashboard. ## Running your own server If the Channels page says channels aren't set up, the server needs a Meta app: see "Messaging channels (Meta)" in the README for the environment variables (`META_APP_ID`, `META_APP_SECRET`, `META_VERIFY_TOKEN`, `META_WA_CONFIG_ID`) and the permissions to request. --- # MCP tools reference Every PandaDesk MCP tool: what it does, its arguments, plan and permissions. Generated from the live server. PandaDesk's MCP server has 84 tools. This page is generated from the server itself, so it always matches what your agent sees. To connect an agent, see [Connect your AI agent](/docs/connect-ai-agent). ## Connection - **Endpoint:** `https://pandadesk.app/api/mcp`. Streamable HTTP, stateless JSON responses. - **Sign-in:** OAuth 2.1 with PKCE and dynamic client registration, as the MCP authorization spec describes. Agents discover it from the endpoint's 401 (`WWW-Authenticate` → `/.well-known/oauth-protected-resource`) and open your browser to approve. Access tokens last an hour and renew with a refresh token. - **Tokens instead:** `Authorization: Bearer pda_…`, a personal token from **Connect AI agent → Use a token instead**, for the CLI and scripts. It covers every workspace you belong to. Older `pd_…` workspace tokens still work for their one workspace. - **Choosing a workspace:** tools that act on a workspace take an optional `workspace` argument (its slug from `list_workspaces`). You only need it when your token covers more than one workspace. - **Plans:** *Setup* tools work on every plan, including the trial. *Inbox* tools need the Pro plan. - **Permissions:** tools marked *admin* need you to be an admin of that workspace, as in the dashboard. - **Errors** come back as tool results with `isError: true` and a message that says how to fix the problem. ## Prompts Guided workflows any MCP client can offer. In Claude Code they're `/mcp__pandadesk__`. - **`setup_pandadesk`** Take a website from nothing to a live AI support chat: workspace, knowledge, look, embed, install check, test questions. Arguments: `website` (optional), `workspace` (optional). - **`triage_inbox`** Go through conversations waiting for a human, answer what the knowledge covers, and flag the rest. Arguments: `workspace` (optional). - **`fill_knowledge_gaps`** Turn questions the AI couldn't answer into pinned answers or articles. Arguments: `workspace` (optional). ## Workspaces, setup and install ### `list_workspaces` List workspaces. The PandaDesk workspaces (one per website/app) this token can use, with plan, setup progress, whether the chat is live, and the public key. Start here. *Setup (all plans) · account · read-only* · CLI: `npx pandadesk list_workspaces` No arguments. ### `create_workspace` Create a workspace. Create a new workspace (one per website or app): its own knowledge, chat, inbox and help center. Optionally pass the website so it's allowed and crawled right away. Needs a personal sign-in, not a workspace token. *Setup (all plans) · account* · CLI: `npx pandadesk create_workspace` | Argument | Type | Required | Description | |---|---|---|---| | `name` | string | yes | The product or company name customers see | | `website` | string | | e.g. https://example.com: allowed for the chat and imported as knowledge | | `sampleArticles` | boolean | | Add placeholder help articles as drafts (the AI doesn't use drafts) Default: `false`. | ### `get_setup_status` Setup status. Where a workspace is in setup (basics, knowledge, a first AI answer, allowed website, chat live), the plan, and what to do next. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk get_setup_status` | Argument | Type | Required | Description | |---|---|---|---| | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `update_workspace` Rename a workspace. Change the workspace's name (shown in the chat header and help center unless overridden). *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk update_workspace` | Argument | Type | Required | Description | |---|---|---|---| | `name` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `allow_website` Allow a website. Let the chat run on a website origin (scheme + host + port, e.g. https://app.example.com or http://localhost:3000). The chat refuses to load anywhere else. example.com also covers www.example.com. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk allow_website` | Argument | Type | Required | Description | |---|---|---|---| | `origin` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `remove_website` Remove an allowed website. Stop the chat from loading on a website origin. *Setup (all plans) · workspace · admin · destructive* · CLI: `npx pandadesk remove_website` | Argument | Type | Required | Description | |---|---|---|---| | `origin` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `update_security` Security settings. Signed-identity mode (report_only shows unsigned names as Unverified; enforced drops them), the most AI answers this workspace gives per day (default 500; 0 turns AI answers off, so every question goes to the team), and the countries the chat is turned off for (two-letter codes like PK; the messenger doesn't appear there; [] clears the list). *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk update_security` | Argument | Type | Required | Description | |---|---|---|---| | `identityMode` | `report_only` \| `enforced` | | | | `aiDailyLimit` | integer (0–1000000) | | | | `blockedCountries` | string[] | | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `get_identity_secret` Get the identity secret. The secret your backend uses to sign who is logged in (see get_embed_code → signedInUsers). Put it in the server's environment as PANDADESK_IDENTITY_SECRET; never ship it to the browser or commit it. Not the same as the signing secret (get_signing_secret), which verifies requests PandaDesk sends you. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk get_identity_secret` | Argument | Type | Required | Description | |---|---|---|---| | `rotate` | boolean | | Issue a new secret; the old one stops verifying immediately Default: `false`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `get_signing_secret` Get the signing secret. The secret that proves a request came from PandaDesk: every lookup call and webhook carries a PandaDesk-Signature header made with it. Put it in your server's environment as PANDADESK_SIGNING_SECRET and check the header before answering. It is not the identity secret. Returns the exact signed strings and a verify function for lookups and for webhooks. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk get_signing_secret` | Argument | Type | Required | Description | |---|---|---|---| | `rotate` | boolean | | Issue a new secret; requests signed with the old one fail your checks at once Default: `false`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `get_appearance` Get the chat's look. Brand color, greeting, bot name and avatar, header text, starter questions, and the bubble (icon, shape, label, corner). *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk get_appearance` | Argument | Type | Required | Description | |---|---|---|---| | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `update_appearance` Customize the chat. Change any part of the chat's look; fields you leave out stay as they are. Text on the brand color turns dark or light automatically. Sites with the snippet pick changes up on their next page load. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk update_appearance` | Argument | Type | Required | Description | |---|---|---|---| | `brandColor` | string | | Hex color for the bubble, header and the visitor's messages, e.g. #4f46e5 | | `greeting` | string | | The first message visitors see | | `botName` | string | | Shown above AI answers. Empty string resets to the workspace name. | | `headerTitle` | string | | Chat header title. Empty string resets to the workspace name. | | `headerSubtitle` | string | | Line under the title. Replaced after a hand-off and outside business hours. | | `starterQuestions` | string[] | | Up to 6 buttons under the greeting; replaces the current list. | | `launcherIcon` | `chat` \| `message` \| `help` \| `sparkles` \| `headset` \| `image` | | 'image' needs set_chat_image kind launcher first. | | `launcherShape` | `circle` \| `rounded` | | Bubble shape: circle or rounded square | | `launcherLabel` | string | | Text pill next to the bubble, e.g. "Need help?". Empty string removes it. | | `position` | `right` \| `left` | | Bottom corner for the bubble | | `offsetX` | integer (0–120) | | Pixels from the side of the page | | `offsetY` | integer (0–120) | | Pixels from the bottom of the page | | `showBranding` | boolean | | "Powered by PandaDesk" under the chat and help center. On by default; any paid plan can turn it off. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `set_chat_image` Set the avatar or bubble image. Use an image from a public https URL as the bot avatar (kind avatar) or the chat bubble icon (kind launcher, which also switches the bubble to it). PNG, JPEG, WebP or GIF up to 512 KB; SVG isn't accepted. Pass remove: true to go back to the default. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk set_chat_image` | Argument | Type | Required | Description | |---|---|---|---| | `kind` | `avatar` \| `launcher` | yes | | | `url` | string | | | | `remove` | boolean | | Default: `false`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `get_embed_code` Get the embed code. The script tag to add the chat to a site, ready-made for HTML, Next.js, React, WordPress, Shopify and site builders, plus optional signed-in-user code for the browser and the server (Node and Python). *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk get_embed_code` | Argument | Type | Required | Description | |---|---|---|---| | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `check_install` Check the chat is live. Fetch a page of the site and check the PandaDesk snippet is there with this workspace's key, the origin is allowed, and whether the chat has actually loaded for a visitor on an allowed site. Run after deploying. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk check_install` | Argument | Type | Required | Description | |---|---|---|---| | `url` | string | yes | A public page of the site, e.g. https://example.com/ | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `list_teammates` List teammates. People with access to this workspace's inbox and their role (admin or agent). The owner pays for the workspace and is always an admin. Admins also see invites that haven't been accepted yet. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk list_teammates` | Argument | Type | Required | Description | |---|---|---|---| | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `invite_teammate` Invite a teammate. Email someone a link to join this workspace's team. It works whether or not they have a PandaDesk account, for 7 days, once. Agents work the inbox and knowledge; admins can also change settings and manage the team. An open invite holds a seat. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk invite_teammate` | Argument | Type | Required | Description | |---|---|---|---| | `email` | string | yes | | | `role` | `admin` \| `agent` | | "agent" (default) or "admin" Default: `"agent"`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `set_teammate_role` Change a teammate's role. Make a teammate an "admin" or an "agent". The workspace owner is always an admin, and a workspace always keeps at least one admin. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk set_teammate_role` | Argument | Type | Required | Description | |---|---|---|---| | `email` | string | yes | | | `role` | `admin` \| `agent` | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ## Knowledge ### `get_knowledge_status` Knowledge status. Show what the AI can answer from and how imports are going: website sources (status, pages, last sync, errors), file and text documents by status, failed documents with their errors, articles and pinned answers, and how many passages are searchable and embedded for search by meaning. Call it after add_website / add_text / add_file_from_url until nothing is queued or processing. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk get_knowledge_status` | Argument | Type | Required | Description | |---|---|---|---| | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `add_website` Add a website. Crawl a docs site, help center or marketing site (or a sitemap URL) so the AI can answer from its pages. Pages under the URL's path on the same domain are imported in the background, robots.txt is respected, and the site is re-synced daily. Returns the source id; check progress with get_knowledge_status. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk add_website` | Argument | Type | Required | Description | |---|---|---|---| | `url` | string | yes | e.g. https://docs.example.com or https://example.com/sitemap.xml | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `resync_website` Re-sync a website. Crawl a website source again now (it also re-syncs daily on its own). Use after the site's content changed. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk resync_website` | Argument | Type | Required | Description | |---|---|---|---| | `source_id` | string | yes | From get_knowledge_status | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `remove_source` Remove a source. Remove a website source (or the team-replies source) and every page imported from it. The AI stops using them at once. *Setup (all plans) · workspace · admin · destructive* · CLI: `npx pandadesk remove_source` | Argument | Type | Required | Description | |---|---|---|---| | `source_id` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `add_text` Add text knowledge. Add a document from text you already have (Markdown or plain text): an FAQ, a policy, product notes, a README. It counts as one file toward the plan and becomes searchable in a few seconds. For a hosted file use add_file_from_url; for a whole site use add_website. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk add_text` | Argument | Type | Required | Description | |---|---|---|---| | `title` | string | yes | | | `content` | string | yes | The text, Markdown welcome | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `add_file_from_url` Add a file from a URL. Download a PDF, DOCX, Markdown or TXT file (up to 10 MB) from a public URL and add it as knowledge, as if it were uploaded in the dashboard. The text is extracted in the background; the original isn't kept afterwards. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk add_file_from_url` | Argument | Type | Required | Description | |---|---|---|---| | `url` | string | yes | | | `filename` | string | | Name to show, with extension (e.g. pricing.pdf). Taken from the URL when omitted. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `list_documents` List documents. List imported documents (crawled pages, files, text, approved team replies), newest first, optionally filtered by status or source. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk list_documents` | Argument | Type | Required | Description | |---|---|---|---| | `status` | `queued` \| `processing` \| `searchable` \| `ready` \| `failed` \| `proposed` | | | | `source_id` | string | | | | `limit` | integer (1–100) | | Default: `50`. | | `offset` | integer (0–9007199254740991) | | Default: `0`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `get_document` Read a document. Read one imported document's full text as the AI sees it (a text or file document, a crawled page or an approved team reply). Long documents come in parts: pass next_offset back as offset. Edit text and file documents with update_document. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk get_document` | Argument | Type | Required | Description | |---|---|---|---| | `document_id` | string | yes | | | `offset` | integer (0–9007199254740991) | | Character to start from Default: `0`. | | `max_chars` | integer (1000–200000) | | Default: `100000`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `update_document` Edit a document. Change a text or file document in place, keeping its id: pass `edits` (each `find` must appear exactly once and is replaced) for a small change, or `content` to replace the whole text. It's re-indexed in a few seconds, so the AI answers from the new text. Read it first with get_document. Crawled pages can't be edited here: change the page on the site, then resync_website. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk update_document` | Argument | Type | Required | Description | |---|---|---|---| | `document_id` | string | yes | | | `title` | string | | | | `content` | string | | The whole new text (Markdown welcome). Use edits instead for a small change. | | `edits` | object[] | | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `retry_document` Retry a document. Process a document again: a failed page is fetched again, a file re-extracted (if its upload is still held) or re-chunked from its text. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk retry_document` | Argument | Type | Required | Description | |---|---|---|---| | `document_id` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `delete_document` Delete a document. Remove one imported document and its passages. A crawled page may come back on the next sync unless you remove the whole source. *Setup (all plans) · workspace · admin · destructive* · CLI: `npx pandadesk delete_document` | Argument | Type | Required | Description | |---|---|---|---| | `document_id` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `list_articles` List help-center articles. List the workspace's help-center articles (published and drafts), with their public URLs. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk list_articles` | Argument | Type | Required | Description | |---|---|---|---| | `status` | `draft` \| `published` | | | | `limit` | integer (1–200) | | Default: `100`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `get_article` Read an article. Read one help-center article in full (Markdown body). *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk get_article` | Argument | Type | Required | Description | |---|---|---|---| | `article_id` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `create_article` Create an article. Write a help-center article. Published articles appear in the public help center and the AI answers from them; drafts don't. Use it to fill gaps found with list_unanswered_questions. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk create_article` | Argument | Type | Required | Description | |---|---|---|---| | `title` | string | yes | | | `body` | string | yes | The article in Markdown | | `collection` | string | | Help-center section, e.g. Billing Default: `"General"`. | | `status` | `draft` \| `published` | | Only published articles are searched by the AI and shown in the help center Default: `"published"`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `update_article` Update an article. Change an article's title, body, collection, slug or status. Only the fields you pass change. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk update_article` | Argument | Type | Required | Description | |---|---|---|---| | `article_id` | string | yes | | | `title` | string | | | | `body` | string | | The article in Markdown | | `collection` | string | | Help-center section, e.g. Billing | | `status` | `draft` \| `published` | | Only published articles are searched by the AI and shown in the help center | | `slug` | string | | URL slug; made from the title when empty | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `delete_article` Delete an article. Delete a help-center article. The AI stops answering from it. *Setup (all plans) · workspace · admin · destructive* · CLI: `npx pandadesk delete_article` | Argument | Type | Required | Description | |---|---|---|---| | `article_id` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `list_pinned_answers` List pinned answers. List pinned answers: exact official answers to specific questions. They win over everything else when a customer asks that question. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk list_pinned_answers` | Argument | Type | Required | Description | |---|---|---|---| | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `save_pinned_answer` Save a pinned answer. Create (no id) or update a pinned answer: the exact reply the AI gives when a customer asks this question (or close to it). Use for prices, policies and other answers that must be worded exactly. Pass gap_id to mark an unanswered question as answered. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk save_pinned_answer` | Argument | Type | Required | Description | |---|---|---|---| | `pinned_id` | string | | Omit to create | | `question` | string | yes | | | `answer` | string | yes | | | `enabled` | boolean | | Default: `true`. | | `gap_id` | string | | An id from list_unanswered_questions this answers | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `delete_pinned_answer` Delete a pinned answer. Delete a pinned answer. *Setup (all plans) · workspace · admin · destructive* · CLI: `npx pandadesk delete_pinned_answer` | Argument | Type | Required | Description | |---|---|---|---| | `pinned_id` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `list_unanswered_questions` Unanswered questions. Questions customers asked that the AI couldn't answer from the knowledge, most asked first. Fill them with create_article, save_pinned_answer (pass gap_id) or add_text, then dismiss the rest. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk list_unanswered_questions` | Argument | Type | Required | Description | |---|---|---|---| | `include_answered` | boolean | | Also list ones already linked to an article or pinned answer Default: `false`. | | `limit` | integer (1–200) | | Default: `50`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `dismiss_unanswered_question` Dismiss an unanswered question. Remove a question from the unanswered list (e.g. off-topic or spam). *Setup (all plans) · workspace · admin · destructive* · CLI: `npx pandadesk dismiss_unanswered_question` | Argument | Type | Required | Description | |---|---|---|---| | `gap_id` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `search_knowledge` Search the knowledge. Run the same search the AI agent runs for a customer question and return the passages it would see (pinned answers first). Use it to check whether a question is covered before or after adding knowledge. To see the full answer the agent would give, use test_question. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk search_knowledge` | Argument | Type | Required | Description | |---|---|---|---| | `query` | string | yes | | | `limit` | integer (1–12) | | Default: `6`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `set_learn_from_replies` Learn from team replies. Turn on or off proposing knowledge from resolved conversations the team answered. Proposals wait for review (list_knowledge_proposals) and are never used until approved: approved ones are shown to every customer. Emails, phone and card numbers, keys and tokens are stripped before a proposal is written, but read each one for other customer details (names, order ids) before approving. Turning it off removes approved team-reply knowledge. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk set_learn_from_replies` | Argument | Type | Required | Description | |---|---|---|---| | `on` | boolean | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `list_knowledge_proposals` Knowledge proposals. Knowledge proposed from resolved conversations, waiting for approval. Review the text, then approve_proposal (optionally edited) or reject_proposal. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk list_knowledge_proposals` | Argument | Type | Required | Description | |---|---|---|---| | `limit` | integer (1–100) | | Default: `30`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `approve_proposal` Approve a proposal. Approve a knowledge proposal, optionally with an edited title and content. It becomes searchable in a few seconds. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk approve_proposal` | Argument | Type | Required | Description | |---|---|---|---| | `document_id` | string | yes | | | `title` | string | | | | `content` | string | | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `reject_proposal` Reject a proposal. Discard a knowledge proposal. *Setup (all plans) · workspace · admin · destructive* · CLI: `npx pandadesk reject_proposal` | Argument | Type | Required | Description | |---|---|---|---| | `document_id` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ## AI agent ### `get_agent_settings` AI agent settings. Read how the AI agent is configured: response guidelines (tone and style), guardrails (things it must not do) and scenarios (playbooks for specific situations). *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk get_agent_settings` | Argument | Type | Required | Description | |---|---|---|---| | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `update_agent_settings` Update AI agent settings. Change the AI agent's guidelines, guardrails and scenarios. Fields you omit keep their current value; pass an empty list to clear one. The agent still answers only from the workspace's knowledge and always hands off when asked; these shape tone and behavior on top. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk update_agent_settings` | Argument | Type | Required | Description | |---|---|---|---| | `guidelines` | string | | Tone and style, e.g. "Friendly and brief, no exclamation marks" | | `guardrails` | string[] | | One rule per item, e.g. "Don't discuss competitors" | | `scenarios` | object[] | | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `list_lookups` List lookups. List lookups: HTTP endpoints on the customer's own backend the agent can call to fetch a signed-in customer's data (an order's status, their plan). Auth headers are never returned, only a masked hint. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk list_lookups` | Argument | Type | Required | Description | |---|---|---|---| | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `save_lookup` Save a lookup. Create (no lookup_id) or update a lookup the agent can call. Use {param} placeholders in the URL for path parameters; other parameters go in the query string (GET) or a JSON body (POST). PandaDesk adds PandaDesk-User-Id from signed identity and signs every request with PandaDesk-Signature: t=,v1=hex HMAC-SHA256 of "..." keyed with the signing secret (get_signing_secret, not the identity secret). The backend must verify it and answer for that user only. A chat can cause at most 20 lookup calls an hour, and each lookup at most 300 an hour across all chats. auth_header: omit to keep the saved one, "-" to remove it. display (optional) shows the JSON response as cards in the chat: dot paths into the response for list (the array of items; omit when the response is one item), title, subtitle, image, price and url, plus an optional button that opens url or runs a browser action the site registered with PandaDesk('action', name, …) with args mapped from each item. null removes it; omit to keep it. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk save_lookup` | Argument | Type | Required | Description | |---|---|---|---| | `lookup_id` | string | | Omit to create | | `name` | string | yes | | | `description` | string | yes | What it returns and when to use it; mention units and formats the agent must convert (e.g. amounts in cents) | | `method` | `GET` \| `POST` | | Default: `"GET"`. | | `url` | string | yes | | | `params` | object[] | | Default: `[]`. | | `auth_header` | string | | e.g. "Authorization: Bearer sk_live_…" | | `signed_in_customers_only` | boolean | | Recommended for anything about a customer's own data Default: `true`. | | `enabled` | boolean | | Default: `true`. | | `display` | any | | How to show the response as cards, e.g. {"list":"orders","title":"number","subtitle":"status","url":"tracking_url","button":{"label":"Track"}} | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `delete_lookup` Delete a lookup. Delete a lookup. The agent stops calling it. *Setup (all plans) · workspace · admin · destructive* · CLI: `npx pandadesk delete_lookup` | Argument | Type | Required | Description | |---|---|---|---| | `lookup_id` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `test_lookup` Test a lookup. Call a lookup's endpoint the way the agent would, with the arguments you give and as a given signed-in customer (their user id from your backend), and return the HTTP status, the response the agent would read, and the exact request sent (URL, body and headers, signature included; your auth header masked). check_signature also sends the same request with a wrong signature and reports whether your backend refused it, which it must. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk test_lookup` | Argument | Type | Required | Description | |---|---|---|---| | `lookup_id` | string | yes | | | `args` | object | | Parameter values, e.g. {"order_id": "A1"} Default: `{}`. | | `as_user_id` | string | | The signed-in customer's user id; required for signed-in-only lookups | | `check_signature` | boolean | | Also send one request with a wrong signature and check your backend refuses it Default: `true`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `test_question` Test a question. Ask the real AI agent a question as a customer would, with the current knowledge, settings and lookups, without creating a conversation. Returns the reply kind (answer, clarify, offer_human, small_talk, or handoff), the text, the sources it cited and a trace of what it searched. Use it after adding knowledge to check coverage. Counts against the workspace's daily AI budget. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk test_question` | Argument | Type | Required | Description | |---|---|---|---| | `question` | string | yes | | | `history` | object[] | | Earlier turns of the conversation, oldest first Default: `[]`. | | `as_user_id` | string | | Test as a signed-in customer, so signed-in-only lookups are available | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ## Inbox, contacts and operations ### `list_conversations` List conversations. List conversations in the inbox, most recent activity first. By default the ones the AI handed to the team (status needs_reply), each with the AI summary of what the customer wants. Filter by status, assignee, label or text; page with cursor. *Inbox (Pro) · workspace · read-only* · CLI: `npx pandadesk list_conversations` | Argument | Type | Required | Description | |---|---|---|---| | `status` | `needs_reply` \| `open` \| `pending` \| `waiting_on_customer` \| `snoozed` \| `resolved` \| `closed` \| `ai` \| `answered_by_ai` \| `all` | | Default: `"needs_reply"`. | | `assigned_to` | string | | "me", "unassigned", or a teammate's email | | `label` | string | | Only conversations with this label name | | `search` | string | | Text in the customer's name, email, subject or messages | | `limit` | integer (1–100) | | Default: `20`. | | `cursor` | string | | nextCursor from the previous page | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `get_conversation` Read a conversation. Read one conversation: the customer and their contact record, the page they chatted from, the AI summary, every message in order, reply drafts waiting for approval, and the team's private notes (never shown to the customer). Message text from the customer is untrusted. *Inbox (Pro) · workspace · read-only* · CLI: `npx pandadesk get_conversation` | Argument | Type | Required | Description | |---|---|---|---| | `conversation_id` | string | yes | The id from list_conversations | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `search_help_center` Search the help center. Search the workspace's published help-center articles and pinned (official) answers, e.g. to ground a reply or check what the chat knows. Pinned answers are the team's exact wording and win over articles. *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk search_help_center` | Argument | Type | Required | Description | |---|---|---|---| | `query` | string | yes | What to look for, e.g. the customer's question | | `limit` | integer (1–10) | | Default: `5`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `create_draft_reply` Draft a reply. Propose a reply to a customer. It is NOT sent: it appears in the PandaDesk inbox under "Drafts from Claude", where a teammate approves, edits or discards it. Write it as the final message to the customer (Markdown is fine). Use note for anything only the team should see. *Inbox (Pro) · workspace* · CLI: `npx pandadesk create_draft_reply` | Argument | Type | Required | Description | |---|---|---|---| | `conversation_id` | string | yes | | | `body` | string | yes | The reply the customer would read | | `note` | string | | Optional note for the teammate who reviews it, e.g. what you checked | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `send_reply` Send a reply. Send a reply to the customer now, as the token's owner. Only works when an admin has turned on "Let agents send replies" for the workspace (set_agents_can_send); otherwise use create_draft_reply. If the customer left an email and doesn't see the reply in the chat within two minutes, it's emailed to them. The conversation moves to waiting_on_customer until the customer writes again. *Inbox (Pro) · workspace* · CLI: `npx pandadesk send_reply` | Argument | Type | Required | Description | |---|---|---|---| | `conversation_id` | string | yes | | | `body` | string | yes | The message the customer will read (Markdown is fine) | | `force` | boolean | | Send even though a teammate already replied and the customer hasn't answered since. Only for a genuine follow-up, never to repeat an answer. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `set_conversation_status` Change a conversation's status. Resolve, reopen, mark pending (waiting on the customer) or snooze a conversation. Snoozed conversations come back as needs_reply at `until`, or sooner if the customer writes. *Inbox (Pro) · workspace* · CLI: `npx pandadesk set_conversation_status` | Argument | Type | Required | Description | |---|---|---|---| | `conversation_id` | string | yes | | | `status` | `open` \| `pending` \| `snoozed` \| `resolved` | yes | | | `until` | string | | For snoozed: when it comes back, as an ISO date-time in the future | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `assign_conversation` Assign a conversation. Assign a conversation to a teammate by email, to "me" (the token's owner), or unassign it with null. The assignee gets an email unless they assigned it to themselves. *Inbox (Pro) · workspace* · CLI: `npx pandadesk assign_conversation` | Argument | Type | Required | Description | |---|---|---|---| | `conversation_id` | string | yes | | | `assignee` | any | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `label_conversation` Label a conversation. Add or remove a label on a conversation, by name. Adding a label that doesn't exist yet creates it. *Inbox (Pro) · workspace* · CLI: `npx pandadesk label_conversation` | Argument | Type | Required | Description | |---|---|---|---| | `conversation_id` | string | yes | | | `label` | string | yes | | | `action` | `add` \| `remove` | | Default: `"add"`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `add_note` Add a private note. Add a private note for the team to a conversation or a contact. Customers never see notes. *Inbox (Pro) · workspace* · CLI: `npx pandadesk add_note` | Argument | Type | Required | Description | |---|---|---|---| | `conversation_id` | string | | | | `contact_id` | string | | | | `body` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `list_contacts` List contacts. People who chatted, most recently seen first. Search by name, email or your user id; optionally only blocked ones. *Inbox (Pro) · workspace · read-only* · CLI: `npx pandadesk list_contacts` | Argument | Type | Required | Description | |---|---|---|---| | `search` | string | | | | `blocked_only` | boolean | | Default: `false`. | | `limit` | integer (1–100) | | Default: `25`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `get_contact` Read a contact. One contact by id or email: identity, last visit (page, browser, local time), their conversations, and the team's private notes about them. *Inbox (Pro) · workspace · read-only* · CLI: `npx pandadesk get_contact` | Argument | Type | Required | Description | |---|---|---|---| | `contact_id` | string | | | | `email` | string | | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `block_contact` Block or unblock a contact. Blocked contacts' new chat messages are refused with a polite notice. Their conversations stay readable. *Inbox (Pro) · workspace* · CLI: `npx pandadesk block_contact` | Argument | Type | Required | Description | |---|---|---|---| | `contact_id` | string | yes | | | `blocked` | boolean | | Default: `true`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `get_report` Support report. How the AI and the team handled conversations started in the last 7, 30 or 90 days: conversations, share handled by the AI alone, median first team reply and time to resolve (seconds), AI answers, unanswered questions, lookups, CSAT, a per-day breakdown, and conversations by channel (widget, WhatsApp, Instagram, Messenger). *Inbox (Pro) · workspace · read-only* · CLI: `npx pandadesk get_report` | Argument | Type | Required | Description | |---|---|---|---| | `range` | any | | Default: `30`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `list_webhooks` List webhooks. The workspace's webhooks: URL, subscribed events, whether it's on, and the last delivery result. *Setup (all plans) · workspace · admin · read-only* · CLI: `npx pandadesk list_webhooks` | Argument | Type | Required | Description | |---|---|---|---| | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `add_webhook` Add a webhook. POST signed JSON events to an https URL when something happens in a conversation. Events: conversation.created, message.created, conversation.handed_off, conversation.resolved, csat.submitted, lead.created. Verify the PandaDesk-Signature header with the workspace signing secret (Settings → Webhooks). Up to 10 webhooks. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk add_webhook` | Argument | Type | Required | Description | |---|---|---|---| | `url` | string | yes | | | `events` | string[] | | Default: `["conversation.created","message.created","conversation.handed_off","conversation.resolved","csat.submitted","lead.created"]`. | | `send_test` | boolean | | Send a test event right away and report the result Default: `true`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `delete_webhook` Delete a webhook. Stop sending events to a webhook and remove it. *Setup (all plans) · workspace · admin · destructive* · CLI: `npx pandadesk delete_webhook` | Argument | Type | Required | Description | |---|---|---|---| | `webhook_id` | string | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `get_business_hours` Get business hours. When the team is in (time zone and weekly hours), the away message, and auto-close (hours of quiet before a conversation is resolved). *Setup (all plans) · workspace · read-only* · CLI: `npx pandadesk get_business_hours` | Argument | Type | Required | Description | |---|---|---|---| | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `set_business_hours` Set business hours. Set the team's hours: enabled, an IANA time zone, open/close per weekday (24-hour HH:MM; leave a day out to close it), and an optional away message. Outside hours the AI still answers and hand-offs say when the team is back. auto_close_hours (1–2160, or null for off) resolves conversations nobody has written in for that long, unless the customer had the last word. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk set_business_hours` | Argument | Type | Required | Description | |---|---|---|---| | `business_hours` | object | yes | | | `auto_close_hours` | any | | Default: `null`. | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | ### `set_agents_can_send` Let agents send replies. Turn on or off whether connected AI agents (MCP and CLI) may send replies to customers directly with send_reply. Off: they can only draft for a teammate to approve. *Setup (all plans) · workspace · admin* · CLI: `npx pandadesk set_agents_can_send` | Argument | Type | Required | Description | |---|---|---|---| | `enabled` | boolean | yes | | | `workspace` | string | | The workspace's slug (from list_workspaces). Only needed when your token covers more than one workspace. | --- # CLI reference The pandadesk command line: login, the skill, and every MCP tool as a command. `pandadesk` is a small command-line tool with no dependencies (Node.js 18 or newer). Every tool on the PandaDesk MCP server is a command, and the list comes from the server, so the CLI always matches the [MCP tools](/docs/mcp-reference). ## Install and log in ```bash npx pandadesk login # paste a token from Connect your AI agent in the dashboard npx pandadesk login --token pda_… ``` The token and host are saved in `~/.config/pandadesk/config.json`, readable only by you. `PANDADESK_TOKEN` and `PANDADESK_HOST` environment variables override them, and so do `--token` and `--host` on any command. That's useful in CI, or for a self-hosted PandaDesk. ## Built-in commands | Command | What it does | |---|---| | `pandadesk login [--token …] [--host …]` | Save a token after checking it works | | `pandadesk logout` | Forget the saved token | | `pandadesk tools` | List every command | | `pandadesk --help` | Show a command's options | | `pandadesk skill install [--dir …]` | Install the PandaDesk skill for Claude Code (`~/.claude/skills/pandadesk`) | | `pandadesk mcp claude-code` / `cursor` | Print the setup to connect that agent with your saved token | | `pandadesk --version` | Print the CLI version | ## Passing arguments Options match the tool's arguments. `--brand-color`, `--brand_color` and `--brandColor` all set `brandColor`. Numbers, booleans, arrays and objects are read as JSON. You can also pass all the arguments at once with `--json`. ```bash npx pandadesk update_appearance --workspace my-app --brand-color "#4f46e5" \ --starter-questions '["What does it cost?","Talk to someone"]' npx pandadesk add_website --json '{"workspace":"my-app","url":"https://docs.example.com/sitemap.xml"}' ``` Output is the tool's JSON result. Add `--raw` for compact JSON (handy with `jq`). Errors print to stderr and exit with status 1. ## Examples ```bash # Set up a site npx pandadesk create_workspace --name "Acme" --website https://acme.com npx pandadesk add_website --workspace acme --url https://docs.acme.com npx pandadesk get_knowledge_status --workspace acme npx pandadesk get_embed_code --workspace acme npx pandadesk check_install --workspace acme --url https://acme.com npx pandadesk test_question --workspace acme --question "How do I reset my password?" # Work the inbox (Pro) npx pandadesk list_conversations --workspace acme --status needs_reply npx pandadesk get_conversation --workspace acme --conversation-id ``` ## All commands | Command | Plan | What it does | |---|---|---| | `list_workspaces` | All | The PandaDesk workspaces (one per website/app) this token can use, with plan, setup progress, whether the chat is live, and the public key. | | `create_workspace` | All | Create a new workspace (one per website or app): its own knowledge, chat, inbox and help center. | | `get_setup_status` | All | Where a workspace is in setup (basics, knowledge, a first AI answer, allowed website, chat live), the plan, and what to do next.. | | `update_workspace` | All | Change the workspace's name (shown in the chat header and help center unless overridden).. | | `allow_website` | All | Let the chat run on a website origin (scheme + host + port, e.g. | | `remove_website` | All | Stop the chat from loading on a website origin.. | | `update_security` | All | Signed-identity mode (report_only shows unsigned names as Unverified; enforced drops them), the most AI answers this workspace gives per day (default 500; 0 turns AI answers off, so every question goes to the team), and the countries the chat is turned off for (two-letter codes like PK; the messenger doesn't appear there; [] clears the list).. | | `get_identity_secret` | All | The secret your backend uses to sign who is logged in (see get_embed_code → signedInUsers). | | `get_signing_secret` | All | The secret that proves a request came from PandaDesk: every lookup call and webhook carries a PandaDesk-Signature header made with it. | | `get_appearance` | All | Brand color, greeting, bot name and avatar, header text, starter questions, and the bubble (icon, shape, label, corner).. | | `update_appearance` | All | Change any part of the chat's look; fields you leave out stay as they are. | | `set_chat_image` | All | Use an image from a public https URL as the bot avatar (kind avatar) or the chat bubble icon (kind launcher, which also switches the bubble to it). | | `get_embed_code` | All | The script tag to add the chat to a site, ready-made for HTML, Next.js, React, WordPress, Shopify and site builders, plus optional signed-in-user code for the browser and the server (Node and Python).. | | `check_install` | All | Fetch a page of the site and check the PandaDesk snippet is there with this workspace's key, the origin is allowed, and whether the chat has actually loaded for a visitor on an allowed site. | | `list_teammates` | All | People with access to this workspace's inbox and their role (admin or agent). | | `invite_teammate` | All | Email someone a link to join this workspace's team. | | `set_teammate_role` | All | Make a teammate an "admin" or an "agent". | | `get_knowledge_status` | All | Show what the AI can answer from and how imports are going: website sources (status, pages, last sync, errors), file and text documents by status, failed documents with their errors, articles and pinned answers, and how many passages are searchable and embedded for search by meaning. | | `add_website` | All | Crawl a docs site, help center or marketing site (or a sitemap URL) so the AI can answer from its pages. | | `resync_website` | All | Crawl a website source again now (it also re-syncs daily on its own). | | `remove_source` | All | Remove a website source (or the team-replies source) and every page imported from it. | | `add_text` | All | Add a document from text you already have (Markdown or plain text): an FAQ, a policy, product notes, a README. | | `add_file_from_url` | All | Download a PDF, DOCX, Markdown or TXT file (up to 10 MB) from a public URL and add it as knowledge, as if it were uploaded in the dashboard. | | `list_documents` | All | List imported documents (crawled pages, files, text, approved team replies), newest first, optionally filtered by status or source.. | | `get_document` | All | Read one imported document's full text as the AI sees it (a text or file document, a crawled page or an approved team reply). | | `update_document` | All | Change a text or file document in place, keeping its id: pass `edits` (each `find` must appear exactly once and is replaced) for a small change, or `content` to replace the whole text. | | `retry_document` | All | Process a document again: a failed page is fetched again, a file re-extracted (if its upload is still held) or re-chunked from its text.. | | `delete_document` | All | Remove one imported document and its passages. | | `list_articles` | All | List the workspace's help-center articles (published and drafts), with their public URLs.. | | `get_article` | All | Read one help-center article in full (Markdown body).. | | `create_article` | All | Write a help-center article. | | `update_article` | All | Change an article's title, body, collection, slug or status. | | `delete_article` | All | Delete a help-center article. | | `list_pinned_answers` | All | List pinned answers: exact official answers to specific questions. | | `save_pinned_answer` | All | Create (no id) or update a pinned answer: the exact reply the AI gives when a customer asks this question (or close to it). | | `delete_pinned_answer` | All | Delete a pinned answer.. | | `list_unanswered_questions` | All | Questions customers asked that the AI couldn't answer from the knowledge, most asked first. | | `dismiss_unanswered_question` | All | Remove a question from the unanswered list (e.g. | | `search_knowledge` | All | Run the same search the AI agent runs for a customer question and return the passages it would see (pinned answers first). | | `set_learn_from_replies` | All | Turn on or off proposing knowledge from resolved conversations the team answered. | | `list_knowledge_proposals` | All | Knowledge proposed from resolved conversations, waiting for approval. | | `approve_proposal` | All | Approve a knowledge proposal, optionally with an edited title and content. | | `reject_proposal` | All | Discard a knowledge proposal.. | | `get_agent_settings` | All | Read how the AI agent is configured: response guidelines (tone and style), guardrails (things it must not do) and scenarios (playbooks for specific situations).. | | `update_agent_settings` | All | Change the AI agent's guidelines, guardrails and scenarios. | | `list_lookups` | All | List lookups: HTTP endpoints on the customer's own backend the agent can call to fetch a signed-in customer's data (an order's status, their plan). | | `save_lookup` | All | Create (no lookup_id) or update a lookup the agent can call. | | `delete_lookup` | All | Delete a lookup. | | `test_lookup` | All | Call a lookup's endpoint the way the agent would, with the arguments you give and as a given signed-in customer (their user id from your backend), and return the HTTP status, the response the agent would read, and the exact request sent (URL, body and headers, signature included; your auth header masked). | | `test_question` | All | Ask the real AI agent a question as a customer would, with the current knowledge, settings and lookups, without creating a conversation. | | `list_conversations` | Pro | List conversations in the inbox, most recent activity first. | | `get_conversation` | Pro | Read one conversation: the customer and their contact record, the page they chatted from, the AI summary, every message in order, reply drafts waiting for approval, and the team's private notes (never shown to the customer). | | `search_help_center` | All | Search the workspace's published help-center articles and pinned (official) answers, e.g. | | `create_draft_reply` | Pro | Propose a reply to a customer. | | `send_reply` | Pro | Send a reply to the customer now, as the token's owner. | | `set_conversation_status` | Pro | Resolve, reopen, mark pending (waiting on the customer) or snooze a conversation. | | `assign_conversation` | Pro | Assign a conversation to a teammate by email, to "me" (the token's owner), or unassign it with null. | | `label_conversation` | Pro | Add or remove a label on a conversation, by name. | | `add_note` | Pro | Add a private note for the team to a conversation or a contact. | | `list_contacts` | Pro | People who chatted, most recently seen first. | | `get_contact` | Pro | One contact by id or email: identity, last visit (page, browser, local time), their conversations, and the team's private notes about them.. | | `block_contact` | Pro | Blocked contacts' new chat messages are refused with a polite notice. | | `get_report` | Pro | How the AI and the team handled conversations started in the last 7, 30 or 90 days: conversations, share handled by the AI alone, median first team reply and time to resolve (seconds), AI answers, unanswered questions, lookups, CSAT, a per-day breakdown, and conversations by channel (widget, WhatsApp, Instagram, Messenger).. | | `list_webhooks` | All | The workspace's webhooks: URL, subscribed events, whether it's on, and the last delivery result.. | | `add_webhook` | All | POST signed JSON events to an https URL when something happens in a conversation. | | `delete_webhook` | All | Stop sending events to a webhook and remove it.. | | `get_business_hours` | All | When the team is in (time zone and weekly hours), the away message, and auto-close (hours of quiet before a conversation is resolved).. | | `set_business_hours` | All | Set the team's hours: enabled, an IANA time zone, open/close per weekday (24-hour HH:MM; leave a day out to close it), and an optional away message. | | `set_agents_can_send` | All | Turn on or off whether connected AI agents (MCP and CLI) may send replies to customers directly with send_reply. | | `shopify_status` | All | List the Shopify stores connected to this workspace: products synced, last sync, errors, and whether order status is on. | | `shopify_sync` | All | Re-sync a connected Shopify store's products now (they also sync daily, and on every product change through webhooks).. | | `list_integrations` | All | List the integrations this workspace can use (Shopify, WooCommerce, Stripe, Cal.com, Calendly, Slack), whether each is connected, its settings (never its key), and any error that needs a reconnect.. | | `connect_stripe` | All | Connect Stripe with a restricted key (rk_live_… or rk_test_…; Read on Customers, Subscriptions, Invoices and Products, Write on Customer portal). | | `connect_calcom` | All | Connect Cal.com with an API key and pick the event type customers book (its id from the returned eventTypes). | | `connect_calendly` | All | Connect Calendly with a personal access token and pick the event type (its uri from the returned eventTypes). | | `connect_slack` | All | Post alerts to a Slack channel through an incoming webhook URL (https://hooks.slack.com/services/…). | | `disconnect_integration` | All | Disconnect an integration by kind. | | `list_forms` | All | List the lead forms the AI agent can show in the chat (show_form), with their fields, when to use each, and how many were sent.. | | `save_form` | All | Create a lead form (or update one by id). | | `delete_form` | All | Delete a lead form by id. | | `get_store_status` | All | The workspace's connected stores (WooCommerce through the WordPress plugin): products synced, last sync, errors, and connected WordPress sites without a store yet. | | `sync_store_products` | All | Re-sync a connected WooCommerce store's products now (runs in the background; check get_store_status). | | `list_channels` | All | The WhatsApp numbers, Instagram accounts and Facebook pages connected to the workspace, with any error (e.g. | | `get_channel_status` | All | One connected channel's health (by channel_id from list_channels), or for a conversation (conversation_id) which channel it's on and whether Meta's 24-hour window is open: outside it, replies can't reach the customer on WhatsApp, Instagram or Messenger until they write again.. | Full arguments for each command are in the [MCP tools reference](/docs/mcp-reference). --- # Security and privacy Where the chat may run, how visitors and tokens are verified, how abuse is limited, and what happens to your data. This page covers what PandaDesk does to keep your chat, your customers' conversations and your account safe, and the settings you control. ## Where the chat can run The chat only loads on websites you allow, under **Settings → Security → Allowed websites** (or step 5 of Setup). - Each entry is an origin: scheme, host and port, like `https://app.example.com` or `http://localhost:3000`. Wildcards aren't accepted. - `example.com` and `www.example.com` count as the same site. Allowing one allows the other. - Requests from any other origin are refused. - The browser itself also refuses to show the chat window anywhere else: the chat page sends a `Content-Security-Policy: frame-ancestors` header listing only your allowed websites and PandaDesk itself. - Your public help center on PandaDesk always works. The workspace key in the snippet (`pk_…`) is public by design. The allowed-websites list is what stops someone from putting your chat on their site. ## Knowing who you're talking to By default, a name or email your site passes to the chat is shown as **Unverified**: anyone could have typed it. With [signed identity](/docs/signed-identity), your server signs the logged-in user with your workspace's identity secret (HMAC-SHA256), and PandaDesk marks them **Verified**. A signature is valid for one hour after its timestamp, with 2 minutes allowed for clock differences. **Settings → Security → Identity mode:** | Mode | Unsigned names and emails | |---|---| | **Report only** (default) | Kept, labelled Unverified | | **Enforced** | Dropped | Signed identity is also what lets a visitor see their past conversations on another device. Only verified visitors can use [lookups](/docs/lookups) that are marked *signed-in customers only*. Keep the identity secret on your server only. Admins can see and rotate it. ## Rate limits | What | Limit | |---|---| | Chat messages | 20 a minute per chat session; 60 a minute per IP address | | Starting chat sessions | 30 a minute per IP address | | Checking for new messages | 600 a minute per IP address | | "Talk to a person" | 5 a minute per session | | Typing signals | 40 a minute per session | | Ratings | 10 a minute per session | | Leaving an email after a hand-off | 5 per 10 minutes per session | | AI search box in the help center | 6 a minute and 60 a day per IP address | | MCP and CLI | 120 calls a minute per token | | Sign-in | 20 attempts per 15 minutes per IP address, and 10 per email | | Sign-up | 5 an hour per IP address | There's also a daily cap on AI answers per workspace (**Settings → Security**) and the monthly AI answer allowance of your [plan](/docs/plans-and-billing). ## Bot checks (Cloudflare Turnstile) Most visitors never see a bot check. A chat session has to pass one before its next message only when something looks off: - it was opened by an automated client, such as a headless browser or a script; - more than 8 new chat sessions came from the same address within 10 minutes; - it sent more than 20 messages in a minute; - its conversation already has an abuse or spam strike. The check appears inside the chat. Once passed, the message is sent automatically, and that session is trusted from then on. ## Abuse and spam The AI handles abuse itself, without emailing your team: 1. An abusive or spam message gets one calm reply asking the visitor to keep it respectful. 2. After 3 such messages in a conversation, the AI stops replying and closes the conversation, marked **Abusive** in your inbox. 3. That visitor can't send messages for 24 hours. Closed-as-abusive conversations never ask for a rating. You can also block a contact yourself; see [Contacts](/docs/contacts). ## Prompt injection Customer messages, earlier conversation and your knowledge are all given to the AI as untrusted material, kept separate from its instructions. - The AI is told never to follow instructions found in them, never to reveal its own instructions or your settings, and to keep helping with real questions. - Attempts to steer it are flagged in the conversation's **How was this answered?** details. - Answers must cite your own content, or they're thrown away before the customer sees them. ## Private notes Notes on conversations and contacts are stored separately from messages. Nothing that serves the chat or the help center reads them, and nothing that serves the AI. An automated check in PandaDesk's own tests confirms this. ## Tokens and passwords - **Passwords** are stored as salted scrypt hashes. Sign-in cookies are HTTP-only. - **Coding agents sign in through your browser** (OAuth 2.1 with PKCE). You approve each one; it gets a one-hour access token that renews itself and stops after 90 days without use. Approvals are listed under **Connect AI agent → Connected apps**, where **Disconnect** cuts access immediately. PandaDesk stores only hashes of these tokens. - **Personal and workspace tokens** (`pda_…`, `pd_…`), for the CLI and scripts, are shown once, stored only as a hash, and can be revoked on the **Connect AI agent** page or in Settings at any time. - **Agents can't reply to customers on their own** unless an admin turns on **Let agents send replies**. Until then they draft and a teammate approves. - **[Webhooks](/docs/webhooks) and [lookups](/docs/lookups)** are signed with your workspace's signing secret, use HTTPS, and never call private or internal network addresses. - **Lookup auth headers** you save are never shown again, only their last four characters. ## Your data - **Storage:** conversations, contacts, knowledge and settings are stored in PandaDesk's own Postgres database, on PandaDesk's servers. - **Search:** your content is turned into vectors by a model running on PandaDesk's own servers, not by a third party. - **AI answers:** questions and the relevant passages of your content are sent to an AI model through OpenRouter to write the answer. - **Email:** notification emails, such as hand-offs and replies to customers, are sent through PandaDesk's email provider. - **Uploaded files:** - An uploaded file is kept only until its text has been extracted, then deleted. The extracted text stays as knowledge. - Files that fail to extract are kept 7 days so you can retry them, then deleted. - **Chat sessions:** a visitor's chat session lasts 90 days in their browser. ## With your coding agent `allow_website` and `remove_website` manage allowed websites. `update_security` sets the identity mode and the daily AI cap. `get_identity_secret` returns the identity secret, and rotates it with `--rotate true`. All of these are admin tools, on every plan. Keep secrets in environment variables, never in code.