# Authentication Source: https://docs.gurubase.ai/api-reference/authentication Learn how to authenticate your Gurubase API requests ![Gurubase API Keys](https://mintcdn.com/gurubase/1KgbSST6n33uTAt6/images/gurubase-api-keys.jpg?fit=max\&auto=format\&n=1KgbSST6n33uTAt6\&q=85\&s=35f08d86676998c4f911931aeee5b0e6) All API endpoints require authentication using an API key. You can obtain your API key from [Gurubase Cloud](https://app.gurubase.io/api-keys) or Gurubase Self-Hosted (Enterprise plan only - contact us at [contact@gurubase.io](mailto:contact@gurubase.io) for access). ## API Key Authentication Include your API key in the `x-api-key` header with all requests: ```bash theme={null} curl --location 'https://api.gurubase.io/api/v1//answer' \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "question": "What is Gurubase?" }' ``` > [!NOTE] > > The full API key is shown only once, immediately after you create it. Copy it and store it in a secure location (such as a password manager) before dismissing the dialog. Afterwards the dashboard only shows a masked preview (prefix and last four characters), and the plaintext key cannot be retrieved. If you lose a key, delete it and generate a new one. > [!NOTE] > > Keep your API key secure and never share it publicly. If you believe your API key has been compromised, delete it from the dashboard and generate a new one. ## Restricted API Keys By default, an API key can call every endpoint within its Guru scope. When creating a key, you can enable **Restrict to specific endpoints** and select only the endpoints that key should be able to call. Requests to any other endpoint are rejected with `403`. For endpoints that serve multiple HTTP methods (such as Data Sources, which supports `GET`, `POST`, and `DELETE`), you can additionally limit the key to specific methods. For example, selecting only `GET` on Data Sources produces a key that can list data sources but cannot add or delete them. This makes it possible to create read-only keys for reporting or monitoring use cases. ## Guru-Scoped API Keys Every API key is scoped to one or more gurus you administer, selected when the key is created. Requests to a guru not included in that list are rejected with `403`, even if the endpoint itself is allowed. This limits the blast radius if a key ever leaks: a key scoped to a single guru cannot be used to reach any other guru on your account. You can change which gurus a key can access at any time from the API Keys page, without generating a new key. # Export Analytics Data Source: https://docs.gurubase.ai/api-reference/endpoints/analytics-export POST /{guru_slug}/analytics/export/ Export analytics data in various formats (Excel, CSV, or JSON) Export analytics data for questions, out-of-context queries, and referenced sources. The data can be exported in different formats and filtered based on various criteria. ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ## Request Body **export\_type** `string` *required* (default: xlsx) Format of the export file. Possible values: `xlsx`, `csv`, `json` * `xlsx`: Microsoft Excel format * `csv`: Compressed ZIP containing CSV files * `json`: JSON format **interval** `string` (default: today) Time period for the analytics data. Possible values: * `today`: Current day * `yesterday`: Previous day * `7d`: Last 7 days * `30d`: Last 30 days * `3m`: Last 3 months * `6m`: Last 6 months * `12m`: Last 12 months **filters** `object` Filters for different types of data **Filter options** **questions** `string` (default: all) Filter for questions data. Possible values: * `all`: All sources * `widget`: Widget source * `user`: Gurubase UI source * `api`: API source * `discord`: Discord source * `slack`: Slack source * `github`: GitHub source **out\_of\_context** `string` (default: all) Filter for out-of-context queries. Same values as questions filter. **referenced\_sources** `string` (default: all) Filter for referenced sources. Possible values: * `all`: All sources * `github_repo`: GitHub repositories * `website`: Websites * `youtube`: YouTube videos * `pdf`: PDF documents ### Response The response will be a file download with the appropriate content type header based on the export\_type: * XLSX: `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` * CSV: `application/zip` * JSON: `application/json` Each answered and unable-to-answer row includes an `Auto-Generated` column (`Yes`/`No` in XLSX and CSV, `auto_generated` boolean in JSON) that flags questions fired automatically by an integration (for example, the Zendesk app asking a ticket the moment it is opened) rather than typed by an end user. Each export also adds an auto-generated distribution (type, count, percentage) for questions and for unable-to-answer entries: the `Auto-Gen Dist - Questions` and `Auto-Gen Dist - Unable` sheets in XLSX, `auto_generated_distribution_questions.csv` and `auto_generated_distribution_unable_to_answer.csv` in CSV, and an `auto_generated_distribution` object with `questions` and `unable_to_answer` in JSON. Empty distributions are omitted. ```json 200 (JSON) theme={null} { "questions": [ { "datetime": "2025-04-10 07:06", "source": "Gurubase UI", "question": "details for self hosted", "trust_score": 0.6, "follow_up": true, "auto_generated": false, "url": "https://app.gurubase.io/g/gurubase/what-is-gurubase/binge/0f973a34-7867-46ca-9c38-896d4b644d63?question_slug=details-for-self-hosting-gurubase-6014cb17-1a95-4308-969d-b61cf435f312" } ], "out_of_context": [ { "datetime": "2025-04-08 06:45", "source": "Github", "question": "who made gurubase?" } ], "referenced_sources": [ { "last_update_date": "2025-04-04 12:23", "data_source_type": "Website", "data_source_title": "Quickstart - Gurubase", "referenced_count": 187, "url": "https://docs.gurubase.ai/quickstart" } ] } ``` ```binary 200 (XLSX) theme={null} [Binary Excel file content] ``` ```binary 200 (ZIP/CSV) theme={null} [Binary ZIP file containing CSV files] ``` ```json 404 theme={null} { "msg": "No data found to export" } ``` ```json 400 theme={null} { "msg": "Invalid request" } ``` ```json 500 theme={null} { "msg": "Internal server error" } ``` # Answer Progress Source: https://docs.gurubase.ai/api-reference/endpoints/answer-progress GET /{guru_slug}/answer-progress/ Read the live progress line for an in-flight answer The streaming [Ask Question](/api-reference/endpoints/ask-question) call holds one connection, so a client that wants to show what the Guru is doing right now (retrieval, which tool is running) polls this endpoint instead of guessing from elapsed time. Each end user gets their own progress line, keyed by the `external_user_id` you pass. Poll while the answer stream is open and stop as soon as the stream ends. Polls count against the same per-end-user rate limit as Ask Question, so poll no more than every 1 to 2 seconds. > [!NOTE] > > Progress text is generated from the pipeline stages. Only the argument values an > [Agentic Action](/guides/actions) declares as an `enum` are echoed into the line. > Treat the line as a status hint, not as content to store. ## Path Parameters **guru\_slug** `string` *required* The slug of the Guru whose in-flight answer is being polled. ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ## Query Parameters **external\_user\_id** `string` *required* The same `external_user_id` you passed to the [Ask Question](/api-reference/endpoints/ask-question) call whose progress you want to read. ### Response **status\_text** `string` A short human-readable line describing what the pipeline is doing right now (for example `Gathering context...`, `Searching the knowledge base...`, `Using: search_orders`, `Writing the answer...`). Empty string when nothing has been reported yet or the line has expired (about 2 minutes after its last update). The last line (`Writing the answer...`) stays after the stream ends until it expires. **updated\_at** `number | null` Unix timestamp (seconds, float) of when `status_text` was last written. `null` when nothing has been reported yet or the line has expired. Compare it against the time you started the answer request to discard a stale line left over from a previous question on the same `external_user_id`. ```bash cURL theme={null} curl --request GET \ --url 'https://api.gurubase.io/api/v1/{guru_slug}/answer-progress/?external_user_id=end-user-123' \ --header 'x-api-key: YOUR_API_KEY' ``` ```python Python theme={null} import requests url = "https://api.gurubase.io/api/v1/{guru_slug}/answer-progress/" params = {"external_user_id": "end-user-123"} headers = {"x-api-key": "YOUR_API_KEY"} response = requests.get(url, params=params, headers=headers) print(response.json()) ``` ```json 200 theme={null} { "status_text": "Searching the knowledge base...", "updated_at": 1755846130.482 } ``` ```json 200 (nothing reported yet) theme={null} { "status_text": "", "updated_at": null } ``` ```json 400 theme={null} { "msg": "external_user_id is required" } ``` ```json 401 theme={null} { "msg": "Invalid API key" } ``` ```json 404 theme={null} { "msg": "Guru type {guru_slug} not found" } ``` ```json 429 theme={null} { "msg": "Request was throttled. Expected available in 56 seconds." } ``` # Ask Question Source: https://docs.gurubase.ai/api-reference/endpoints/ask-question POST /{guru_slug}/answer/ Ask a question to your Guru Ask a question to your AI-powered Q\&A assistant and receive a detailed response with references. > [!NOTE] > > To ask follow-up questions, include the `session_id` from a previous response in your request. This allows the Guru to maintain context of the conversation. ## Path Parameters **guru\_slug** `string` *required* The slug of the Guru to ask a question to ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **question** `string` *required* The question to ask your Guru **stream** `boolean` (default: false) Whether to stream the response or not. If true, only the content of the response will be returned in chunks. **mode** `string` (default: chat) Selects the answer pipeline for this request. Accepted values: * `chat` (default): the classic single-pass answer pipeline. * `agent`: the autonomous tool loop, which lets the Guru chain [Agentic Actions](/guides/agents) and other tools before answering. `agent` requires an agent-capable Guru (multi-step answers enabled with at least one usable tool). If the Guru does not qualify, the request silently falls back to `chat`. Any unrecognized value is also treated as `chat`. **session\_id** `string` Maintain conversation context for follow-up questions. When a question is asked, the response includes a session\_id that can be used in subsequent requests. On the Gurubase platform, these conversation sessions are called "Binges". **external\_user\_id** `string` External user identifier for tracking user-specific conversation sessions. When provided, this ID is stored in the session. If a session already exists with a different external\_user\_id, the request will be rejected. **metadata** `object` Optional free-form caller labels attached to the question. The object is stored with the question; it is never injected into the prompt on its own. Limits: * Flat object only (no nested objects or arrays); at most 10 keys. * Keys are strings up to 64 characters and must match `[A-Za-z0-9_.-]+`. * Keys starting with `gurubase_` are reserved and rejected. * Values must be a string, number, or boolean. String values are limited to 256 characters. * `null` values are accepted and dropped from the stored object before persistence (the key is not stored). * Any other violation returns HTTP 400 before any answer is generated. Gurubase can configure a Guru to map a specific metadata key onto a subject inside the stored user profile (contact support to enable it). For example, an `accountId` key can select one account from a profile that covers several, pushed via [Upsert Profiles](/api-reference/endpoints/upsert-profiles). When such a mapping is configured on the Guru, sending that key on the request pins the answer to that subject: only that subject's profile detail is used, memories about other subjects are held back, and identical wording asked about a different subject gets its own answer. Subject pinning requires the request to also include the same `external_user_id` used when the profile was pushed via Upsert Profiles; that identifier is how the profile is looked up. Without it no profile is loaded and the mapped metadata key does not pin the answer. Omit the mapped key to answer against the whole profile. An unknown subject id degrades to an unpinned answer rather than failing the request. **fetch\_existing** `boolean` (default: false) Fetch an existing answer. Do not ask a new question (generally used after streaming to fetch the answer fields like references etc.). **selected\_sources** `number[]` Optional list of data source IDs to scope the answer to. When provided, retrieval only reads from these sources, so a question like "what did we decide in Monday's standup" can be pinned to a single transcript instead of the full knowledge base. IDs are the numeric identifiers returned by [Create](/api-reference/endpoints/create-datasources) / [Get Data Sources](/api-reference/endpoints/get-datasources) and must belong to the same Guru. **selected\_labels** `string[]` Optional list of data source labels to scope the answer to. Only sources tagged with at least one of the given labels are considered during retrieval. **use\_user\_memory** `boolean` (default: true) Whether the Guru's [End-User Memory](/guides/memory) is read from or written to for this request. Set to `false` when a bot or integration is asking on behalf of a user whose profile should not be built up (for example, a meeting assistant asking on a participant's behalf). Disables both reading and writing for the single request. **images** `array` Optional list of image attachments to include with the question. Each item is an object with: * `data` (string): Base64-encoded image as a data URL, formatted as `data:;base64,` (see the `encode_binary` helper in the "Asking With Attachments" example). * `name` (string): File name (e.g. `screenshot.png`). * `type` (string): MIME type (e.g. `image/png`). Item count and per-file size are subject to the Guru's limits. Images exceeding the limits are silently skipped and the response includes a note with how many were dropped. **log\_files** `array` Optional list of log file attachments to include with the question. Each item is an object with: * `data` (string): Raw UTF-8 log text (see the `read_log` helper in the "Asking With Attachments" example). Not base64-encoded. * `name` (string): File name (e.g. `app.log`). Item count and per-file size are subject to the Guru's limits. Log files exceeding the limits are silently skipped and the response includes a note with how many were dropped. **pdf\_files** `array` Optional list of PDF attachments to include with the question. Each item is an object with: * `data` (string): Base64-encoded PDF as a data URL, formatted as `data:;base64,` (see the `encode_binary` helper in the "Asking With Attachments" example). * `name` (string): File name (e.g. `doc.pdf`). * `type` (string): MIME type (typically `application/pdf`). Item count and per-file size are subject to the Guru's limits. Unlike images and log files, PDFs are validated upfront: if the request exceeds the limits, the endpoint returns HTTP 400 and no answer is generated. ### Response **slug** `string` Unique identifier for the question-answer pair **content** `string` The answer in Markdown format **question** `string` The original question **date\_updated** `string` The date when the answer was generated **trust\_score** `number` How closely the retrieved sources match the question (0-100). It is not the probability that the answer is correct. **references** `array` Array of reference sources used to generate the answer **Reference Object** **link** `string` URL of the reference **icon** `string` Icon URL for the reference source **title** `string` Title of the reference **inherited** `boolean` Present and `true` only when the reference is an attachment (log, PDF, or image) that was uploaded in an earlier turn of the same conversation session and is being surfaced again on a follow-up. Omitted for fresh attachments and knowledge base sources. **session\_id** `string` Unique identifier for the conversation session **question\_url** `string` URL link to open the question on the app **can\_receive\_feedback** `boolean` Whether the question can receive votes and feedback. Returns `false` for simple interactions and clarifications, `true` for normal answers. See the [Record Vote](/api-reference/endpoints/record-vote) endpoint for more information on providing feedbacks and votes. > [!NOTE] > > When `stream=true`, the response will be a text stream containing only the answer content in chunks, not the full JSON object. The JSON response format shown below applies only when `stream=false` (default). ```json 200 theme={null} { "slug": "is-slack-supported-on-anteon-5fdf19ad-de4c-4f07-9dff-0fe1003dccac", "content": "# Is Slack supported on Anteon?\n\n**Yes, Slack is supported on Anteon.** You can integrate Slack to receive notifications about anomalies in your Kubernetes cluster. This integration is available for Anteon Cloud and the Self-Hosted Enterprise Edition. For the Self-Hosted version, you need to create a Slack application and configure it with specific OAuth scopes. Once set up, you can receive alerts directly in your Slack channels. For detailed instructions, refer to the [Slack Integration Guide](https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/).", "question": "Is Slack supported on Anteon?", "date_updated": "22 January 2025", "trust_score": 76, "references": [ { "link": "https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/", "icon": "https://getanteon.com/img/favicon.ico", "title": "📧 Slack Integration | Anteon" } ], "session_id": "3cdbdc4c-023f-45ce-832f-f1881b4f238b", "question_url": "https://app.gurubase.io/g/gurubase/is-slack-supported-on-anteon-5fdf19ad-de4c-4f07-9dff-0fe1003dccac", "can_receive_feedback": true } ``` ```text 200 (stream=true) theme={null} # Is Slack supported on Anteon? **Yes, Slack is supported on Anteon.** You can integrate Slack to receive notifications about anomalies in your Kubernetes cluster. This integration is available for Anteon Cloud and the Self-Hosted Enterprise Edition. For the Self-Hosted version, you need to create a Slack application and configure it with specific OAuth scopes. Once set up, you can receive alerts directly in your Slack channels. For detailed instructions, refer to the [Slack Integration Guide](https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/). ``` ```json 400 theme={null} { "msg": "" } ``` ```json 401 theme={null} { "msg": "Invalid API key" } ``` ```json 429 theme={null} { "msg": "Request was throttled. Expected available in 56 seconds." } ``` ```json 400 theme={null} { "msg": "External user ID mismatch for this session. Code: S-902" } ``` ```json 400 theme={null} { "msg": "This question is not related to .", "code": "QUESTION_NOT_RELATED" } ``` ```json 400 theme={null} { "msg": " Guru doesn't have enough data as a source to generate a reliable answer for this question.", "code": "NOT_ENOUGH_DATA" } ``` > [!NOTE] > > When the Guru refuses a question, the error response carries a stable `code` field so callers can branch without matching on the wording of `msg`. `QUESTION_NOT_RELATED` means the question falls outside the Guru's topic; `NOT_ENOUGH_DATA` means the knowledge base did not contain enough context to answer confidently. Branch on `code`, not on `msg`: a Guru can set its own refusal messages, and `msg` then carries that text. ## Code Examples > [tab] Streaming and Fetching > > Stream a response for real-time output, then fetch the completed answer to get metadata like `trust_score`, `references`, and `session_id`. > > ```javascript theme={null} > // Configuration > const API_KEY = 'your-api-key-here'; > const BASE_URL = 'https://api.gurubase.io/api/v1'; > const GURU_SLUG = 'your-guru-slug'; > > // Simple stream example > async function askGurubase(question) { > console.log("Asking question:", question); > const response = await fetch(`${BASE_URL}/${GURU_SLUG}/answer/`, { > method: 'POST', > headers: { > 'X-API-KEY': API_KEY, > 'Content-Type': 'application/json' > }, > body: JSON.stringify({ > question: question, > stream: true > }) > }); > > // Read stream chunks > const reader = response.body.getReader(); > const decoder = new TextDecoder(); > > console.log("Answer below:\n"); > > while (true) { > const { done, value } = await reader.read(); > if (done) break; > > const chunk = decoder.decode(value); > process.stdout.write(chunk.replace(/\n/g, ' ')); > } > > console.log("\n"); > } > > // Fetch existing answer with metadata > async function fetchExisting(question) { > const response = await fetch(`${BASE_URL}/${GURU_SLUG}/answer/`, { > method: 'POST', > headers: { > 'X-API-KEY': API_KEY, > 'Content-Type': 'application/json' > }, > body: JSON.stringify({ > question: question, > stream: false, > fetch_existing: true > }) > }); > > const data = await response.json(); > console.log('Answer JSON:'); > console.log(data); > return data; > } > > // Usage > const question = "Does Gurubase support Slack?"; > > // 1. Ask with stream > await askGurubase(question); > > // 2. Then fetch the answer from the db (for the JSON fields) > await fetchExisting(question); > ``` > [tab] Asking With Attachments > > Ask a question with image, log, and PDF attachments. Images and PDFs are base64-encoded into `data:;base64,...` URLs; log files are sent as raw UTF-8 text. > > Fill in the `Config` block, list file paths under `IMAGE_PATHS`, `LOG_PATHS`, and `PDF_PATHS`, then run: > > ```bash theme={null} > pip install requests > python ask_with_attachments.py > ``` > > ```python ask_with_attachments.py theme={null} > import base64 > import json > import mimetypes > import sys > from pathlib import Path > from typing import List > > import requests > > # ---------- Config ---------- > BASE_URL = "https://api.gurubase.io/api/v1" > API_KEY = "your-api-key-here" > GURU_SLUG = "your-guru-slug" > QUESTION = "Summarize the attached files." > STREAM = False > > # ---------- Attachments (absolute paths) ---------- > IMAGE_PATHS: List[str] = [ > # "/path/to/screenshot.png", > ] > LOG_PATHS: List[str] = [ > # "/path/to/app.log", > ] > PDF_PATHS: List[str] = [ > # "/path/to/doc.pdf", > ] > > > def encode_binary(path: Path, fallback_mime: str) -> dict: > mime = mimetypes.guess_type(path.name)[0] or fallback_mime > b64 = base64.b64encode(path.read_bytes()).decode("ascii") > return { > "data": f"data:{mime};base64,{b64}", > "name": path.name, > "type": mime, > } > > > def read_log(path: Path) -> dict: > return { > "data": path.read_text(encoding="utf-8", errors="replace"), > "name": path.name, > } > > > def build_payload() -> dict: > payload: dict = {"question": QUESTION, "stream": STREAM} > if IMAGE_PATHS: > payload["images"] = [encode_binary(Path(p), "image/png") for p in IMAGE_PATHS] > if LOG_PATHS: > payload["log_files"] = [read_log(Path(p)) for p in LOG_PATHS] > if PDF_PATHS: > payload["pdf_files"] = [encode_binary(Path(p), "application/pdf") for p in PDF_PATHS] > return payload > > > def main() -> int: > url = f"{BASE_URL.rstrip('/')}/{GURU_SLUG}/answer/" > headers = {"x-api-key": API_KEY, "Content-Type": "application/json"} > payload = build_payload() > > resp = requests.post(url, headers=headers, json=payload, timeout=180, stream=STREAM) > > if STREAM: > for chunk in resp.iter_content(chunk_size=None, decode_unicode=True): > if chunk: > sys.stdout.write(chunk) > sys.stdout.flush() > sys.stdout.write("\n") > return 0 if resp.ok else 1 > > try: > print(json.dumps(resp.json(), indent=2, ensure_ascii=False)) > except ValueError: > print(resp.text) > return 0 if resp.ok else 1 > > > if __name__ == "__main__": > sys.exit(main()) > ``` > > > [!NOTE] > > > > **PDFs** are validated upfront: if the request exceeds the Guru's PDF count or per-file size limit, the endpoint returns HTTP 400 and no answer is generated. > > > > **Images** and **log files** that exceed the Guru's count or size limits are silently skipped during answering, and the response includes a note stating how many attachments were dropped. # Start Website Crawl Source: https://docs.gurubase.ai/api-reference/endpoints/crawler-start POST /{guru_slug}/crawl/start/ Initiate a crawl to explore the URLs of a website Starts an **asynchronous** website crawl operation to find all the sub URLs of the provided root URL. You can check the status of created crawl operation using the [Get Crawl Status](/api-reference/endpoints/crawler-status) endpoint or stop it using the [Stop Crawl](/api-reference/endpoints/crawler-stop) endpoint. Crawling does not mean that the discovered URLs are indexed immediately. You need to manually add the discovered URLs as a data source by passing them to [Create Data Source](/api-reference/endpoints/create-datasources) endpoint. > [!NOTE] > > Crawls are rate limited to 1 concurrent operation per Guru type. Subsequent requests will fail if a crawl is already running. > [!NOTE] > > **Skipped Paths**: The crawler automatically skips non-content paths like `/feed/`, `/rss/`, `/static/`, `/assets/`, `/media/`, `/wp-admin/`, `/wp-json/`, `/_static/`, `/_sources/`, and common file extensions (images, PDFs, CSS, JS, etc.). ## Path Parameters **guru\_slug** `string` *required* The slug of the Guru type to associate the crawled content with ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **url** `string` *required* The root URL to start crawling from. Must include http\:// or https\:// protocol. **Important**: The crawler only discovers URLs that start with this path. For example: * `https://example.com/` → crawls entire site * `https://example.com/docs/` → only crawls URLs under `/docs/` **ignore\_query\_params** `boolean` (default: true) When `true`, query parameters are stripped from discovered URLs (e.g., `?utm_source=...`, `?id=123`). Set to `false` if you need to crawl paginated content like `?page=1`, `?page=2`. ### Response **id** `string` Unique identifier for the crawl operation **url** `string` The root URL to be crawled. The crawler will start from this URL and follow all links that begin with it. For example, if the URL is [https://example.com/a/b/c](https://example.com/a/b/c), the crawler will extract all links that start with [https://example.com/a/b/c](https://example.com/a/b/c). **status** `string` Current status of the crawl operation **guru\_type** `string` The Guru type that the crawl was initiated for **discovered\_urls** `list` List of URLs discovered during crawling **start\_time** `string` Timestamp when crawl started (ISO 8601 format) **end\_time** `string` Timestamp when crawl ended (ISO 8601 format) **ignore\_query\_params** `boolean` Whether query parameters are being stripped from discovered URLs ```json 200 theme={null} { "id": 211, "url": "https://getanteon.com/", "status": "RUNNING", "guru_type": "anteon", "discovered_urls": [], "start_time": "2025-02-21T10:25:22.710211Z", "end_time": null, "link_limit": 1500, "ignore_query_params": true } ``` ```json 400 theme={null} { "msg": "Invalid URL format" } ``` ```json 429 theme={null} { "msg": "Request was throttled. Expected available in 56 seconds." } ``` # Get Crawl Status Source: https://docs.gurubase.ai/api-reference/endpoints/crawler-status GET /{guru_slug}/crawl/{crawl_id}/status/ Get the current status of a website crawl operation Retrieves the current status and details of a specific crawl operation. This endpoint allows you to monitor the progress of an ongoing crawl or check the results of a completed crawl. When the crawl is completed, the discovered URLs are not indexed immediately. You need to manually add the discovered URLs as a data source by passing them to [Create Data Source](/api-reference/endpoints/create-datasources) endpoint. ## Path Parameters **guru\_slug** `string` *required* The slug of the Guru type associated with the crawl **crawl\_id** `string` *required* The unique identifier of the crawl operation to check ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Response **id** `string` Unique identifier for the crawl operation **url** `string` The root URL that was crawled **status** `string` Current status of the crawl operation **guru\_type** `string` The Guru type that the crawl was initiated for **discovered\_urls** `list` List of URLs discovered during crawling **start\_time** `string` Timestamp when crawl started (ISO 8601 format) **end\_time** `string` Timestamp when crawl ended (ISO 8601 format) **error\_message** `string` Error message if the crawl failed (only present if there was an error) **ignore\_query\_params** `boolean` Whether query parameters are being stripped from discovered URLs ```json 200 theme={null} { "id": 211, "url": "https://getanteon.com/", "status": "COMPLETED", "guru_type": "anteon", "discovered_urls": ["https://getanteon.com/features/", "https://getanteon.com/pricing/"], "start_time": "2025-02-21T10:25:22.710211Z", "end_time": "2025-02-21T10:35:45.521433Z", "link_limit": 1500, "ignore_query_params": true } ``` ```json 404 theme={null} { "msg": "Crawl not found" } ``` ```json 400 theme={null} { "msg": "Invalid request" } ``` # Stop Website Crawl Source: https://docs.gurubase.ai/api-reference/endpoints/crawler-stop POST /{guru_slug}/crawl/{crawl_id}/stop/ Stop an ongoing website crawl operation Stops a running website crawl operation. This endpoint allows you to halt the crawling process before it completes naturally. ## Path Parameters **guru\_slug** `string` *required* The slug of the Guru type associated with the crawl **crawl\_id** `string` *required* The unique identifier of the crawl operation to stop ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Response **id** `string` Unique identifier for the crawl operation **url** `string` The root URL that was being crawled **status** `string` Current status of the crawl operation **guru\_type** `string` The Guru type that the crawl was initiated for **discovered\_urls** `list` List of URLs discovered during crawling **start\_time** `string` Timestamp when crawl started (ISO 8601 format) **end\_time** `string` Timestamp when crawl ended (ISO 8601 format) **ignore\_query\_params** `boolean` Whether query parameters were being stripped from discovered URLs ```json 200 theme={null} { "id": 211, "url": "https://getanteon.com/", "status": "STOPPED", "guru_type": "anteon", "discovered_urls": [], "start_time": "2025-02-21T10:25:22.710211Z", "end_time": "2025-02-21T10:26:15.521433Z", "link_limit": 1500, "ignore_query_params": true } ``` ```json 404 theme={null} { "msg": "Crawl not found" } ``` ```json 400 theme={null} { "msg": "Invalid request" } ``` # Create Data Sources Source: https://docs.gurubase.ai/api-reference/endpoints/create-datasources POST /{guru_slug}/data-sources/ Add new data sources to your Guru Add new data sources (YouTube videos, websites, Zendesk tickets/articles, etc.) to your Guru. The processing is asynchronous. Check the status of the data sources with the [Get Data Sources](/api-reference/endpoints/get-datasources) endpoint. > [!NOTE] > > PDF, Word (.docx), UDF (.udf), and Excel files should be uploaded directly through the Gurubase platform interface. We will add support for uploading these files via the API in the future. > [!NOTE] > > If you do not have the relevant integration for Jira, Zendesk, and Confluence while adding a new data source, an error is returned. ## Path Parameters **guru\_slug** `string` *required* The slug of the Guru to add data sources to ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **youtube\_urls** `string[]` Array of YouTube video URLs to process **website\_urls** `string[]` Array of website URLs to index **zendesk\_urls** `string[]` Array of Zendesk ticket/article URLs to index > [!NOTE] > > For Gurubase Self-hosted version, Zendesk integration is currently in beta and available to selected users. > For Gurubase Cloud version, Zendesk integration is available to all users. **jira\_urls** `string[]` Array of Jira Issue URLs to index > [!NOTE] > > For Gurubase Self-hosted version, Jira integration is currently in beta and available to selected users. > For Gurubase Cloud version, Jira integration is available to all users. **confluence\_urls** `string[]` Array of Confluence Page URLs to index > [!NOTE] > > For Gurubase Self-hosted version, Confluence integration is currently in beta and available to selected users. > For Gurubase Cloud version, Confluence integration is available to all users. **text\_sources** `object[]` Array of text sources to index. Each object should contain: * `name` (string): Name of the source * `content` (string): Text content to index * `external_id` (string, optional): Caller-owned identifier for the source. When you send the same `external_id` again, the existing source is updated in place instead of a duplicate being created. Reads (see [Get Data Sources](/api-reference/endpoints/get-datasources)) return this id so you can reconcile against your own identifiers without keeping a mapping table. Must be 1-256 characters, start with a letter or number, and use only letters, numbers, dot, underscore, colon, or hyphen. If omitted, the legacy replace-by-name behavior applies. * `context_prefix` (string, optional): Text prepended to every chunk before it is indexed. Useful when a source is a transcript or fragment that needs a heading (for example a meeting date or a document title) so a chunk retrieved on its own still names its origin. Up to 4000 characters. > [!NOTE] > > If you send a text data source without `external_id` that has the same name as an existing one, it will be updated with the new content. > [!NOTE] > > Re-sending a source with an unchanged `external_id`, content, and `context_prefix` is reported as `unchanged` and does not consume the plan's source quota, so a caller can safely replay its set on a schedule. ### Response The response is an array of processed data sources. **type** `string` Type of data source (Website, YouTube, Jira, Zendesk, Confluence, etc.) **url** `string` URL of the data source > [!NOTE] > > This field is not present for data sources of `Text` type. **status** `string` Processing status (e.g., "exists", "success") **id** `number` Unique identifier for the data source **title** `string` Title of the data source (can be null) **content** `string` Content of the data source > [!NOTE] > > This field is only present for data sources of `Text` type. ```json 200 theme={null} [ { "type": "YouTube", "url": "https://youtu.be/gAkwW2tuIqE", "status": "success", "id": 3275, "title": null }, { "type": "YouTube", "url": "https://youtu.be/AhZ3YStdaQs", "status": "exists", "id": 3274, "title": null }, { "type": "Website", "url": "https://kubernetes.io/docs/home/", "status": "success", "id": 3276, "title": null }, { "type": "Website", "url": "https://kubernetes.io/docs/concepts/", "status": "exists", "id": 3269, "title": null }, { "type": "Zendesk", "url": "https://gurubase.zendesk.com/hc/en-us/articles/36075266746139-How-to-troubleshoot-Gurubase-self-hosted", "status": "success", "id": 3231, "title": "How to troubleshoot Gurubase self hosted" }, { "type": "Zendesk", "url": "https://gurubase.zendesk.com/agent/tickets/7", "status": "exists", "id": 3232, "title": "Test Subject" },  { "type": "Jira", "url": "https://domain.atlassian.net/browse/KAN-1", "status": "success", "id": 3167, "title": null }, { "type": "Jira", "url": "https://domain.atlassian.net/browse/KAN-2", "status": "exists", "id": 3168, "title": "Test issue" }, { "type": "Confluence", "url": "https://aral-yektatest.atlassian.net/wiki/spaces/araltestsp/overview", "status": "success", "id": 3335, "title": null }, { "type": "Confluence", "url": "https://aral-yektatest.atlassian.net/wiki/spaces/araltestsp/pages/884737/Gurubase+inner+workings", "status": "exists", "id": 3342, "title": "Gurubase inner workings" }, { "type": "Text", "title": "Text data source", "content": "This is a text data source", "status": "success", "id": 8302 } ] ``` ```json 400 theme={null} { "msg": "Invalid request parameters" } ``` ```json 401 theme={null} { "msg": "Invalid API key" } ``` ```json 429 theme={null} { "msg": "Request was throttled. Expected available in 56 seconds." } ``` # Delete Data Sources Source: https://docs.gurubase.ai/api-reference/endpoints/delete-datasources DELETE /{guru_slug}/data-sources/ Delete one or more data sources Delete one or more data sources from your Guru. ## Path Parameters **guru\_slug** `string` *required* The slug of the Guru to delete data sources from ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **ids** `number[]` *required* Array of data source IDs to delete (e.g., \[3268, 3273]) ### Response **msg** `string` Status message for the operation ```json 200 theme={null} { "msg": "Data sources deleted successfully" } ``` ```json 400 theme={null} { "msg": "Invalid request parameters" } ``` ```json 401 theme={null} { "msg": "Invalid API key" } ``` ```json 429 theme={null} { "msg": "Request was throttled. Expected available in 56 seconds." } ``` # Delete Session Source: https://docs.gurubase.ai/api-reference/endpoints/delete-session DELETE /sessions/{session_id}/delete/ Delete a conversation session Delete a conversation session (binge). ## Path Parameters **session\_id** `string` *required* The unique identifier of the session to delete ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Response **msg** `string` Success message indicating the session was deleted **session\_id** `string` The ID of the deleted session ```json 200 theme={null} { "msg": "Session deleted successfully", "session_id": "1b9e86c9-87a8-472a-a6bf-6522e89b2de8" } ``` ```json 400 theme={null} { "msg": "Binge ID is required" } ``` ```json 400 theme={null} { "msg": "Session is already deleted" } ``` ```json 401 theme={null} { "msg": "Invalid API key" } ``` ```json 403 theme={null} { "msg": "Forbidden" } ``` ```json 404 theme={null} { "msg": "Session not found" } ``` ```json 404 theme={null} { "msg": "Guru type not found" } ``` ```json 429 theme={null} { "msg": "Request was throttled. Expected available in 56 seconds." } ``` # Get End-User Data Source: https://docs.gurubase.ai/api-reference/endpoints/end-user-data GET /{guru_slug}/end-users/{external_user_id}/data/ Read everything a Guru holds about one end user People who reach your Guru through a widget, a chat bot or the API do not have a Gurubase account, so they cannot use the account tools to see or delete their data. This endpoint is how the team running the Guru answers their access (GDPR Art. 15) and erasure (Art. 17) requests. Which party is the controller for that data depends on your deployment and your agreement with us; see the [privacy policy](https://gurubase.io/privacy-policy/) and your DPA rather than treating this page as the answer. Everything is scoped to the Guru in the path, so a key cannot reach another Guru's data even for the same end-user id. ## Path Parameters **guru\_slug** `string` *required* The Guru the end user interacted with **external\_user\_id** `string` *required* The identifier your integration supplied when the questions were asked ## Headers **x-api-key** `string` *required* Your API key. You can obtain one from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ## Reading their data `GET` returns their questions, the questions the Guru declined to answer, their conversations, their semantic searches, any stored profile, and any memories held about them. Results are paged. Each collection reports whether more remains, so keep raising `offset` until every `has_more` is false: an access response has to be complete, and stopping at the first page would understate what you hold. Memories come back on the first page only. **limit** `integer` (default: 100) Records per collection, per page. Maximum 1000. **offset** `integer` (default: 0) How many records to skip. ```json 200 theme={null} { "external_user_id": "end-user-123", "data": { "questions": [ { "slug": "where-is-my-order", "question": "Where is my order?", "user_question": "where is my order", "content": "Your order shipped on...", "source": "WIDGET QUESTION", "date_created": "2026-08-01T09:12:44Z" } ], "rejected_questions": [], "conversations": [ { "id": "1b9e86c9-87a8-472a-a6bf-6522e89b2de8", "date_created": "2026-08-01T09:12:40Z", "last_used": "2026-08-01T09:15:02Z" } ], "searches": [ { "query": "how do I appeal a decision", "selected_labels": [], "date_created": "2026-08-01T09:10:11Z" } ], "profile": [ { "profile_data": { "name": "Ada", "children": [{ "name": "Byron" }] }, "created_at": "2026-07-02T11:00:00Z", "updated_at": "2026-08-01T09:10:11Z" } ], "memories": [ { "memory": "Prefers to be contacted by email" } ], "page": { "limit": 100, "offset": 0, "has_more": { "questions": false, "rejected_questions": false, "conversations": false, "searches": false } } } } ``` `profile` is not paged. There is at most one per person per Guru, and it is the most sensitive record here, so it is returned on every page rather than only the first. If the memory store cannot be read, the request fails with `500` rather than returning a partial copy. An access response that silently omits data understates what you hold, which is worse than an error you can retry. To erase the same person's data, see [Erase End-User Data](/api-reference/endpoints/erase-end-user-data). # Erase End-User Data Source: https://docs.gurubase.ai/api-reference/endpoints/erase-end-user-data DELETE /{guru_slug}/end-users/{external_user_id}/data/ Erase everything a Guru holds about one end user People who reach your Guru through a widget, a chat bot or the API do not have a Gurubase account, so they cannot use the account tools to see or delete their data. This endpoint is how the team running the Guru answers their access (GDPR Art. 15) and erasure (Art. 17) requests. Which party is the controller for that data depends on your deployment and your agreement with us; see the [privacy policy](https://gurubase.io/privacy-policy/) and your DPA rather than treating this page as the answer. Everything is scoped to the Guru in the path, so a key cannot reach another Guru's data even for the same end-user id. ## Path Parameters **guru\_slug** `string` *required* The Guru the end user interacted with **external\_user\_id** `string` *required* The identifier your integration supplied when the questions were asked ## Headers **x-api-key** `string` *required* Your API key. You can obtain one from the [Gurubase dashboard](https://app.gurubase.io/api-keys). Choose the mode with the `mode` query parameter. **mode** `string` (default: detach) `detach` removes the identifiers from their questions, their rejected questions and their conversations, keeping the question text as your Guru's analytics history. `purge` deletes those questions, rejected questions and conversations outright. > [!WARNING] > > `detach` is the default because it cannot destroy content you did not mean to > lose, but it leaves the person's own words in your Guru. To answer a genuine > erasure request in full, use `mode=purge`. Stored memories, the stored profile, the semantic search history and any files the person uploaded are deleted in **both** modes. > [!NOTE] > > The mode only decides what happens to the question text, which is your Guru's > analytics history. A profile is not your content: it is a record built about the > person, holding whatever they told the Guru about themselves. Neither is a file > they attached, which is their own document. There is no mode that keeps either. Uploaded files means the stored object itself, not only the row pointing at it: the images, log files and documents attached to their questions are removed from storage, along with the cached description of each image and the debugging record of each log file. > [!WARNING] > > Deleting a file cannot be undone or rolled back, so it happens before the > database work. If the request then fails, retry it: the second attempt finds the > files already gone and finishes the rest. ```json 200 theme={null} { "external_user_id": "end-user-123", "result": { "mode": "detach", "questions": 4, "rejected_questions": 1, "conversations": 1, "searches": 2, "profile": 1, "question_text_retained": true, "memories_cleared": true, "files": { "files": 3, "cached_image_descriptions": 1, "log_extractions": 1 }, "notice": "Identifiers were removed but the question text was kept as guru analytics. Use mode=purge to delete the questions themselves. The stored profile, search history and any uploaded files were deleted in either mode." } } ``` ```json 400 theme={null} { "msg": "mode must be one of detach, purge" } ``` ```json 404 theme={null} { "msg": "Guru type my-guru not found" } ``` `memories_cleared` is reported separately: if the memory store was unreachable the rows are still gone but the memories are not, and you should retry rather than record the request as complete. To read the same person's data before erasing it, see [Get End-User Data](/api-reference/endpoints/end-user-data). # Follow-up Examples Source: https://docs.gurubase.ai/api-reference/endpoints/follow-up-examples POST /{guru_type}/follow-up/examples/ Generate follow-up question examples for a given question. This endpoint generates a list of suggested follow-up questions based on a previous question. You can identify the previous question by its slug or by providing the question text directly. Upon first hit, the endpoint generates them. The consecutive hits retrieve the generated follow-up examples. ```bash cURL theme={null} curl --request POST \ --url https://api.gurubase.io/api/v1/{guru_slug}/follow-up/examples/ \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "question_slug": "what-is-gurubase-151e2d23-4316-4d85-936c-d806d431a014" }' ``` ```python Python theme={null} import requests url = "https://api.gurubase.io/api/v1/{guru_slug}/follow-up/examples/" payload = { "question_slug": "what-is-gurubase-151e2d23-4316-4d85-936c-d806d431a014" } headers = { "x-api-key": "YOUR_API_KEY", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ## Path Parameters **guru\_type** `string` *required* The guru type identifier for the request. ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **question\_slug** `string` The slug of the question to get follow-up examples for. Either `question_slug` or `question` is required. **question** `string` The text of the question to get follow-up examples for. Either `question_slug` or `question` is required. **binge\_id** `string` The ID of the binge session (if exists) associated with the question. ### Response **follow\_up\_examples** `array\` A list of suggested follow-up questions. **question\_slug** `string` The slug of the question for which the examples were generated. **cached** `boolean` Indicates whether the follow-up examples were retrieved from cache. ```json 200 theme={null} { "follow_up_examples": [ "How can Gurubase be integrated with platforms like Slack or Discord?", "What are the benefits of using Gurubase's real-time updates feature?", "How does Gurubase handle multiple data sources for creating a Guru?" ], "question_slug": "what-is-gurubase-151e2d23-4316-4d85-936c-d806d431a014", "cached": true } ``` ```json 400 theme={null} { "error": "Question slug or question text is required" } ``` ```json 400 theme={null} { "error": "Binge does not exist" } ``` ```json 401 theme={null} { "error": "Invalid API key" } ``` ```json 404 theme={null} { "error": "Question does not exist" } ``` ```json 404 theme={null} { "error": "Guru type does not exist" } ``` ```json 429 theme={null} { "error": "Rate limit exceeded" } ``` ```json 500 theme={null} { "error": "An error occurred while generating follow-up examples" } ``` # Get Data Sources Source: https://docs.gurubase.ai/api-reference/endpoints/get-datasources GET /{guru_slug}/data-sources/ Retrieve all data sources (YouTube URLs, Website URLs, and PDFs) for your Guru Get a list of all data sources added to your Guru, including their status and metadata. ## Path Parameters **guru\_slug** `string` *required* The slug of the Guru to get data sources from ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Response > [!NOTE] > > The response includes pagination information and an array of data sources. Page size is 1000. **count** `number` Total number of data sources **next** `string` URL for the next page of results (null if no more pages) **previous** `string` URL for the previous page of results (null if first page) **results** `array` Array of data sources **Data Source Object** **id** `number` Unique identifier for the data source **type** `string` Type of data source (PDF, WEBSITE, YOUTUBE) **url** `string` URL for website and YouTube sources **external\_id** `string` Caller-owned identifier for text sources created with an `external_id` via [Create Data Sources](/api-reference/endpoints/create-datasources). `null` for text sources with no `external_id` and for every non-text source. **title** `string` Title of the data source **status** `string` Processing status (NOT\_PROCESSED, SUCCESS, FAIL) **error** `string` Error message if processing failed **date\_created** `string` Creation date in ISO format **private** `boolean` Privacy setting for PDF files. For other data sources, this is always false. **last\_reindex\_date** `string` Date of last reindexing in ISO format **reindex\_count** `number` Number of times the source has been reindexed ```json 200 theme={null} { "count": 2, "next": null, "previous": null, "results": [ { "id": 3272, "type": "YOUTUBE", "url": "https://youtube.com/watch?v=example1", "external_id": null, "title": null, "status": "NOT_PROCESSED", "error": "", "date_created": "2025-01-22T21:45:17.212381Z", "private": false, "last_reindex_date": "2025-01-22T21:45:17.212394Z", "reindex_count": 0 }, { "id": 3271, "type": "PDF", "external_id": null, "title": "document.pdf", "status": "SUCCESS", "error": "", "date_created": "2025-01-22T21:43:58.423588Z", "private": false, "last_reindex_date": "2025-01-22T21:43:58.423608Z", "reindex_count": 0 } ] } ``` ```json 401 theme={null} { "msg": "Invalid API key" } ``` ```json 429 theme={null} { "msg": "Request was throttled. Expected available in 56 seconds." } ``` # Get Session Source: https://docs.gurubase.ai/api-reference/endpoints/get-session POST /sessions/{session_id}/conversation/ Retrieve a complete conversation session Retrieve a complete conversation session (binge) including all questions and answers in the conversation chain, ordered chronologically. ## Path Parameters **session\_id** `string` *required* The unique identifier of the session to retrieve ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Response **binge\_id** `string` Unique identifier for the session. This has the same meaning as `session_id`. **root\_question\_slug** `string` Slug of the initial question that started this conversation session **date\_created** `string` Timestamp when the session was created (ISO format) **last\_used** `string` Timestamp when the session was last used (ISO format) **conversation** `array` Array of messages in the conversation, ordered chronologically **Message Object** **id** `string` Unique identifier for the message **slug** `string` Human-readable slug for the message **user\_question** `string` The original question asked by the user **question** `string` The enhanced/processed question used by the AI **answer** `string` The AI's response in Markdown format **date\_created** `string` Timestamp when the message was created (ISO format) **date\_updated** `string` Timestamp when the message was last updated (ISO format) **references** `array` Array of reference sources used to generate the answer **Reference Object** **link** `string` URL of the reference **icon** `string` Icon URL for the reference source **title** `string` Title of the reference **trust\_score** `number` How closely the retrieved sources match the question (0-100). It is not the probability that the answer is correct. **parent\_slug** `string` Slug of the parent message (for follow-up questions) **source** `string` Source of the question (e.g., "USER", "api", "web", "slack") **user\_vote** `string` User's vote on the answer (if any). Can be "upvote", "downvote", or null ```json 200 theme={null} { "binge_id": "1b9e86c9-87a8-472a-a6bf-6522e89b2de8", "root_question_slug": "what-is-gurubase-e2dd49bd-45da-4915-8ee0-3a1c09ee97a1", "date_created": "2025-07-30T14:11:45.421172+00:00", "last_used": "2025-07-30T14:13:09.459496+00:00", "conversation": [ { "id": "2183", "slug": "what-is-gurubase-e2dd49bd-45da-4915-8ee0-3a1c09ee97a1", "user_question": "what is gurubase", "question": "What is Gurubase?", "answer": "# What is Gurubase?\n\nGurubase is a platform that transforms your existing content into intelligent, topic-specific AI assistants known as \"Gurus.\" These AI-powered assistants are designed to answer questions, provide support, and guide users through your documentation, code, and knowledge base. Gurubase supports a wide range of data sources, including websites, PDF documents, Excel files, GitHub repositories, Confluence documents, Zendesk tickets, Jira issues, and YouTube videos, among others. \n\nThe platform allows for seamless integration into existing workflows through website widgets, chatbots, and APIs. It offers flexible deployment options, including a hosted platform at Gurubase.io and an enterprise self-hosted solution. Key features of Gurubase include advanced AI Q&A capabilities, multi-source integration, real-time synchronization, and codebase intelligence. These features ensure that the knowledge base remains current and accurate, providing reliable responses to user queries. For more detailed information, you can visit the [Gurubase Introduction](https://docs.gurubase.ai/introduction) page.", "date_created": "2025-07-30T14:11:45.426114+00:00", "date_updated": "2025-07-30T14:14:37.789405+00:00", "references": [ { "link": "https://docs.gurubase.ai/introduction", "icon": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3", "title": "Welcome to Gurubase - Gurubase" }, { "link": "https://docs.gurubase.ai/guides/create-guru", "icon": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3", "title": "Create Your First Guru - Gurubase" } ], "trust_score": 90, "parent_slug": null, "source": "USER", "user_vote": "downvote" }, { "id": "2184", "slug": "add-website-to-guru-knowledge-base-0ad07b24-1c30-4245-a1d9-9ea26d7c039e", "user_question": "How can I add a website to my Guru's knowledge base?", "question": "How to add a website to my Guru's knowledge base?", "answer": "# How to add a website to my Guru's knowledge base?\n\nTo add a website to your Guru's knowledge base in Gurubase, follow these steps:\n\n1. **Access the Dashboard**: Navigate to your Gurubase dashboard. If you are using a self-hosted version, you can access it at your local instance URL.\n\n2. **Create or Select a Guru**: If you haven't created a Guru yet, you will need to do so. Click on the \"Create New Guru\" button to start the setup process. If you already have a Guru, select it from your list.\n\n3. **Configure Basic Settings**: During the creation process, you will need to configure basic settings such as the Guru's name, logo, and topics. These settings help define the scope and expertise of your Guru.\n\n4. **Add Knowledge Sources**: \n - Go to the section where you can add knowledge sources.\n - **Websites**: Enter the URLs of the websites you want to include. Gurubase allows you to index website content by importing sitemaps or crawling the website. This feature enables the Guru to answer questions based on the indexed content of the website.\n\n5. **Publish Your Guru**: Once you have added the website URLs and any other knowledge sources, click \"Publish Guru.\" This action will initiate the indexing process, where Gurubase will process and embed the content from the provided sources into your Guru's knowledge base.\n\n6. **Manage and Update**: After publishing, you can manage your website sources by editing, deleting, or reindexing them to ensure the information remains current and accurate.\n\nFor more detailed guidance, you can refer to the [Create Your First Guru](https://docs.gurubase.ai/guides/create-guru) page on the Gurubase documentation site.", "date_created": "2025-07-30T14:12:29.647988+00:00", "date_updated": "2025-07-30T14:12:33.309291+00:00", "references": [ { "link": "https://docs.gurubase.ai/integrations/website-widget", "icon": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3", "title": "Website Widget Integration - Gurubase" }, { "link": "https://docs.gurubase.ai/guides/create-guru", "icon": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3", "title": "Create Your First Guru - Gurubase" }, { "link": "https://github.com/gurubase/gurubase-widget/tree/master/README.md", "icon": "https://github.com/favicon.ico", "title": "README.md" }, { "link": "https://github.com/gurubase/gurubase-widget/tree/master/examples/pure_js/README.md", "icon": "https://github.com/favicon.ico", "title": "README.md" }, { "link": "https://github.com/gurubase/gurubase-widget/tree/master/examples/remix/README.md", "icon": "https://github.com/favicon.ico", "title": "README.md" }, { "link": "https://github.com/gurubase/gurubase-widget/tree/master/examples/mintlify/README.md", "icon": "https://github.com/favicon.ico", "title": "README.md" }, { "link": "https://github.com/gurubase/gurubase-widget/tree/master/examples/mintlify/gurubase.js", "icon": "https://github.com/favicon.ico", "title": "gurubase.js" } ], "trust_score": 90, "parent_slug": "what-is-gurubase-e2dd49bd-45da-4915-8ee0-3a1c09ee97a1", "source": "USER", "user_vote": null }, { "id": "2185", "slug": "control-pdf-visibility-guru-knowledge-base-1b3689ca-5445-409b-81e7-8bcfdaf00df9", "user_question": "How can I control the visibility of my PDF documents within my Guru's knowledge base?", "question": "How to control PDF visibility in my Guru's knowledge base?", "answer": "# How to control PDF visibility in my Guru's knowledge base?\n\nTo control the visibility of PDF documents within your Guru's knowledge base in Gurubase, follow these steps:\n\n1. **Access the Dashboard**: Navigate to your Gurubase dashboard where you manage your Guru.\n\n2. **Locate the PDF Source**: Find the PDF document you wish to manage. This can be done by accessing the list of knowledge sources associated with your Guru.\n\n3. **Open the PDF Management Interface**: Click the menu icon (⋮) next to the PDF source you want to manage. This will open the management options for that specific document.\n\n4. **Toggle Visibility Settings**: \n - You will see options to toggle between \"Public\" and \"Private\" visibility settings.\n - **Private PDFs**: These are accessible only to you and your team members. They will not be visible in answer references or citations provided by the Guru.\n - **Public PDFs**: These are visible in answer references and citations, allowing users to access the content when the Guru provides answers.\n\n5. **Save Changes**: Ensure that you save any changes you make to the visibility settings to apply them effectively.\n\nBy managing the visibility settings, you can control who has access to the content of your PDF documents, ensuring that sensitive information remains protected while still allowing public access to non-sensitive documents. For more detailed guidance, you can refer to the [Create Your First Guru](https://docs.gurubase.ai/guides/create-guru) page on the Gurubase documentation site.", "date_created": "2025-07-30T14:13:09.444277+00:00", "date_updated": "2025-07-30T14:14:17.257488+00:00", "references": [ { "link": "https://docs.gurubase.ai/guides/create-guru", "icon": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3", "title": "Create Your First Guru - Gurubase" } ], "trust_score": 100, "parent_slug": "add-website-to-guru-knowledge-base-0ad07b24-1c30-4245-a1d9-9ea26d7c039e", "source": "USER", "user_vote": "upvote" } ] } ``` ```json 400 theme={null} { "msg": "Binge ID is required" } ``` ```json 401 theme={null} { "msg": "Invalid API key" } ``` ```json 403 theme={null} { "msg": "You don't have access to this binge" } ``` ```json 404 theme={null} { "msg": "Binge not found" } ``` ```json 429 theme={null} { "msg": "Request was throttled. Expected available in 56 seconds." } ``` # Import YouTube Channel Source: https://docs.gurubase.ai/api-reference/endpoints/import-youtube-channel POST /youtube/channel/ Fetch video URLs from a YouTube channel This endpoint allows you to fetch the list of all uploaded videos from a YouTube channel URL. The operation is **synchronous** and returns the list directly in the response. > [!NOTE] > > To be able to use this feature on self-hosted, you need to specify your YouTube API Key in the settings page. You can create one by following the instructions [here](https://developers.google.com/youtube/registering_an_application). After this, you also need to enable the "Youtube Data API v3" API in your Google Cloud project. ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **url** `string` *required* The YouTube channel URL to fetch data from. Must be a valid YouTube channel URL. The allowed formats look like these: * `youtube.com/channel/{channel_id}` * `youtube.com/@{user_handler}` ### Response **channel\_identifier** `string` Identifier used to find the channel. Can be either the id or the handler of the channel. **identifier\_type** `string` Identifier type used to find the channel. Can be either "channel\_id" or "username" **video\_count** `int` The number of videos in the channel **videos** `list` The urls of the videos ```json 200 theme={null} { "channel_identifier": {identifier}, "identifier_type": "username", "video_count": 3, "videos": [ {url1}, {url2}, {url3} ] } ``` ```json 400 theme={null} { "msg": "URL is required" } ``` ```json 429 theme={null} { "msg": "Request was throttled." } ``` # Import YouTube Playlist Source: https://docs.gurubase.ai/api-reference/endpoints/import-youtube-playlist POST /youtube/playlist/ Fetch video URLs from a YouTube playlist This endpoint allows you to fetch the list of videos from a YouTube playlist. The operation is **synchronous** and returns the list directly in the response. > [!NOTE] > > To be able to use this feature on self-hosted, you need to specify your YouTube API Key in the settings page. You can create one by following the instructions [here](https://developers.google.com/youtube/registering_an_application). After this, you also need to enable the "Youtube Data API v3" API in your Google Cloud project. ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **url** `string` *required* The YouTube channel URL to fetch data from. Must be a valid YouTube playlist URL. The expected URL is of type `https://www.youtube.com/watch?v={video_id}&list={playlist_id}` ### Response **playlist\_id** `string` The ID of the playlist **video\_count** `int` The number of videos in the channel **videos** `list` The urls of the videos ```json 200 theme={null} { "playlist_id": {playlist_id}, "video_count": 3, "videos": [ {url1}, {url2}, {url3} ] } ``` ```json 400 theme={null} { "msg": "URL is required" } ``` ```json 429 theme={null} { "msg": "Request was throttled." } ``` # List Sessions Source: https://docs.gurubase.ai/api-reference/endpoints/list-sessions POST /{guru_slug}/sessions/ Retrieve conversation sessions for a Guru Retrieve conversation sessions for a specific Guru. This endpoint supports pagination and search functionality, returning sessions grouped by time periods. ## Path Parameters **guru\_slug** `string` *required* The slug of the Guru to retrieve sessions for ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **page\_num** `integer` (default: 1) The page number for pagination. Must be a positive integer. **search\_query** `string` Search query to filter sessions. Searches across question text, user questions, and session slugs. **external\_user\_id** `string` Filter sessions by external user ID. When provided, only returns sessions associated with this external user ID. ### Response **today** `array` Sessions from today **Session Object** **id** `string` Unique identifier for the session **last\_used** `string` Timestamp when the session was last used **guru\_type\_slug** `string` The slug of the guru type **guru\_type\_name** `string` The name of the guru type **root\_question\_name** `string` The name/title of the root question that started this session **root\_question\_slug** `string` The slug of the root question **root\_question\_link** `string` Link to the root question **last\_week** `array` Sessions from the last 7 days (excluding today) **older** `array` Sessions older than 7 days **has\_more** `boolean` Whether there are more sessions available beyond the current page ```json 200 theme={null} { "today": [ { "last_used": "2025-07-29T10:23:27.535170Z", "id": "0389210e-720d-442c-8fd4-2c6ecda89627", "guru_type_slug": "gurubase", "guru_type_name": "Gurubase", "root_question_name": "What is Gurubase?", "root_question_slug": "what-is-gurubase-73d46ea7-12b5-49c7-ab5e-1dffdb8b71de-69e06b42-d549-4624-8400-768f7388361a", "root_question_link": "" } ], "last_week": [ { "last_used": "2025-07-28T16:05:10.579616Z", "id": "25dffa55-b947-41af-9bca-a2361afca8be", "guru_type_slug": "gurubase", "guru_type_name": "Gurubase", "root_question_name": "Does Gurubase support Slack ?", "root_question_slug": "does-gurubase-support-slack-64911f4a-03c7-4105-a477-80d68f030dfe", "root_question_link": "" } ], "older": [], "has_more": false } ``` ```json 400 theme={null} { "msg": "Page number must be an integer" } ``` ```json 401 theme={null} { "msg": "Invalid API key" } ``` ```json 403 theme={null} { "msg": "Forbidden" } ``` ```json 404 theme={null} { "msg": "Guru type {guru_slug} not found" } ``` ```json 429 theme={null} { "msg": "Request was throttled. Expected available in 56 seconds." } ``` # Record Vote Source: https://docs.gurubase.ai/api-reference/endpoints/record-vote POST /{guru_type}/record_vote/ Record a vote (upvote or downvote) on a question Record a user's vote on a specific question. Multiple votes can be submitted for the same question, with each new vote overwriting the previous one. Downvotes can include optional feedback. > [!NOTE] > > **Important:** Feedback (votes) can only be given for normal answers. Simple interactions and clarifications cannot receive votes. Attempting to vote on these question types will return a 400 error. You can check whether a question can receive feedback by checking the `can_receive_feedback` field returned by the [Ask Question](/api-reference/endpoints/ask-question) endpoint. ## Path Parameters **guru\_type** `string` *required* The type/slug of the Guru ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ## Body Parameters **content\_slug** `string` *required* The slug identifier of the question to vote on **binge\_id** `string` Optional binge session identifier. Can be None **vote\_type** `string` *required* The type of vote to record. Must be either "upvote" or "downvote" **feedback** `string` Optional feedback text for downvotes. Maximum 200 characters ## Response **vote** `string` The recorded vote type ("upvote" or "downvote") **feedback** `string` The feedback provided with the vote (if any) **msg** `string` Error message or status message ```json 200 Success - Vote Recorded theme={null} { "vote": "upvote", "feedback": null } ``` ```json 200 Success - Downvote with Feedback theme={null} { "vote": "downvote", "feedback": "This answer was not helpful because..." } ``` ```json 400 Invalid Parameters theme={null} { "msg": "Invalid parameters" } ``` ```json 400 Feedback Too Long theme={null} { "msg": "Feedback must be 200 characters or less" } ``` ```json 400 Feedback Not Allowed theme={null} { "msg": "Feedback can only be given for normal answers" } ``` ```json 404 Question Not Found theme={null} { "msg": "Question not found" } ``` ## Notes * Multiple votes can be submitted for the same question. Each new vote overwrites the previous vote. * Feedback (votes) can only be given for normal answers. Simple interactions and clarifications cannot receive votes. * Feedback is optional but limited to 200 characters * The `binge_id` parameter can be null, empty string, or "None" and will be treated as null * Only "upvote" and "downvote" are valid vote types # Reindex Data Sources Source: https://docs.gurubase.ai/api-reference/endpoints/reindex-datasources POST /{guru_slug}/data-sources/reindex/ Reindex one or more data sources Reindex one or more data sources to update their content in your Guru. This is useful when the source content has changed. > [!NOTE] > > For file and text sources (PDF, Word, Excel, and Text), reindex re-embeds the content Gurubase already extracted. The file is not re-fetched, so uploaded documents and Google Drive-synced documents behave the same way and no live source connection is required. To ingest a newer version of a file, upload the new version instead. ## Path Parameters **guru\_slug** `string` *required* The slug of the Guru to reindex data sources from ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **ids** `number[]` *required* Array of data source IDs to reindex (e.g., \[3271, 3272]) ### Response **msg** `string` Status message for the operation ```json 200 theme={null} { "msg": "Data sources reindexed successfully" } ``` ```json 400 theme={null} { "msg": "Invalid request parameters" } ``` ```json 401 theme={null} { "msg": "Invalid API key" } ``` ```json 429 theme={null} { "msg": "Request was throttled. Expected available in 56 seconds." } ``` # Semantic Search Source: https://docs.gurubase.ai/api-reference/endpoints/semantic-search POST /{guru_slug}/semantic-search/ Fetch related sources for a question Retrieve sources that are most relevant to a given question. This endpoint fetches from all data source types. ## Path Parameters **guru\_slug** `string` *required* The slug of the Guru to query sources from ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **question** `string` *required* The question to find related sources for **labels** `array` Array of labels to filter sources by. If provided, only sources with matching labels will be returned. If multiple labels are provided, they are OR'ed. Meaning data sources belonging to any of those labels are returned. **external\_user\_id** `string` External user identifier. This allows you to track search queries per user in your analytics. It should be UUID. ### Response The response contains an array of source objects and total count. **sources** `object[]` Array of source objects relevant to the question (maximum 10) Each source object contains: * `title` (string): The title of the source document or page * `link` (string): The URL link to the source (can be null for internal sources) * `display_link` (boolean): Whether to display the link in the UI * `icon_url` (string): URL of the icon representing the source * `labels` (array): Array of labels associated with this source **total\_sources** `number` Total number of sources returned ```json 200 theme={null} { "sources": [ { "title": "Slack Bot Integration - Gurubase", "link": "https://docs.gurubase.ai/integrations/slack-bot", "display_link": true, "labels": [ "integrations", "slack", "bots" ], "icon_url": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3" }, { "title": "GitHub Bot Integration - Gurubase", "link": "https://docs.gurubase.ai/integrations/github-bot", "display_link": true, "labels": [ "integrations", "github", "bots" ], "icon_url": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3" }, { "title": "Welcome to Gurubase - Gurubase", "link": "https://docs.gurubase.ai/introduction", "display_link": true, "labels": [ "documentation", "getting-started" ], "icon_url": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3" }, { "title": "Quickstart - Gurubase", "link": "https://docs.gurubase.ai/quickstart", "display_link": true, "labels": [ "documentation", "getting-started", "tutorial" ], "icon_url": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3" }, { "title": "Create Your First Guru - Gurubase", "link": "https://docs.gurubase.ai/guides/create-guru", "display_link": true, "labels": [ "documentation", "guides", "tutorial" ], "icon_url": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3" }, { "title": "head.html", "link": "https://github.com/gurubase/gurubase-widget/tree/master/examples/retype/_includes/head.html", "display_link": true, "labels": [ "code", "github", "widget", "examples" ], "icon_url": "https://github.com/favicon.ico" }, { "title": "widget.js", "link": "https://github.com/gurubase/gurubase-widget/tree/master/src/widget.js", "display_link": true, "labels": [ "code", "github", "widget", "javascript" ], "icon_url": "https://github.com/favicon.ico" }, { "title": "Website Widget Integration - Gurubase", "link": "https://docs.gurubase.ai/integrations/website-widget", "display_link": true, "labels": [ "integrations", "widget", "website" ], "icon_url": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3" }, { "title": "Jira Integration - Gurubase", "link": "https://docs.gurubase.ai/integrations/jira-bot", "display_link": true, "labels": [ "integrations", "jira", "bots" ], "icon_url": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3" }, { "title": "API Reference - Gurubase", "link": "https://docs.gurubase.ai/api-reference/introduction", "display_link": true, "labels": [ "documentation", "api", "reference" ], "icon_url": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3" } ], "total_sources": 10 } ``` ```json 400 theme={null} { "error": "Question is required" } ``` ```json 401 theme={null} { "error": "Invalid API key" } ``` ```json 404 theme={null} { "error": "Guru not found" } ``` ```json 429 theme={null} { "error": "Rate limit exceeded" } ``` ```json 500 theme={null} { "error": "Error fetching sources: [error details]" } ``` # Text-to-Speech Stream Source: https://docs.gurubase.ai/api-reference/endpoints/text-to-speech POST /{guru_type}/text-to-speech/stream/ Convert text to speech and stream audio response Convert text to speech and stream the audio response. This endpoint processes text by replacing code blocks with "Code block" and inline code with "Inline code" before generating speech. ````bash cURL theme={null} curl --request POST \ --url https://api.gurubase.io/api/v1/{guru_slug}/text-to-speech/stream/ \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "text": "Hello, this is a test message with some code: `console.log(\"hello\")` and a code block:\n```python\ndef hello():\n print(\"hello\")\n```" }' ```` ## Path Parameters **guru\_type** `string` *required* The guru type identifier for the text-to-speech request ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **text** `string` *required* The text to convert to speech. Code blocks and inline code will be processed and replaced with "Code block" and "Inline code" respectively. ### Response The response is a streaming audio file in MP3 format. **audio\_stream** `audio/mpeg` Streaming audio response in MP3 format ```json 400 theme={null} { "msg": "No text provided" } ``` ```json 401 theme={null} { "error": "Invalid API key" } ``` ```json 403 theme={null} { "msg": "Text-to-speech is not enabled for this guru type" } ``` ```json 429 theme={null} { "error": "Rate limit exceeded" } ``` ```json 500 theme={null} { "msg": "Error generating speech stream" } ``` ## Text Processing The endpoint automatically processes text before converting to speech: * **Code blocks**: Any text wrapped in triple backticks (\`\`\`) is replaced with "Code block" * **Inline code**: Any text wrapped in single backticks (\`) is replaced with "Inline code" This ensures that code syntax doesn't interfere with speech generation and provides a better listening experience. ## Streaming Response The endpoint returns a streaming audio response with the following headers: * `Content-Type: audio/mpeg` * `Cache-Control: no-cache` * `X-Accel-Buffering: no` (disables nginx buffering for real-time streaming) # Text-to-Speech Stream V2 Source: https://docs.gurubase.ai/api-reference/endpoints/text-to-speech-v2 POST /{guru_type}/text-to-speech-v2/stream/ Convert text to speech using Gurubase TTS stream audio response Convert text to speech using advanced TTS providers and stream the audio response. Code blocks and inline code are automatically processed for better speech generation. > [!NOTE] > > This feature requires special activation. Please contact our support team to > enable TTS for your account. ```bash cURL theme={null} curl --request POST \ --url https://api.gurubase.io/api/v1/{guru_slug}/text-to-speech-v2/stream/ \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "text": "Hello, this is a test message using Gurubase text to speech" }' ``` ## Path Parameters **guru\_type** `string` *required* The guru type identifier for the text-to-speech request ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **text** `string` *required* The text to convert to speech ### Response The response is a streaming audio file in MP3 format. **audio\_stream** `audio/mpeg` Streaming audio response in MP3 format ```json 400 theme={null} { "msg": "No text provided" } ``` ```json 401 theme={null} { "error": "Invalid API key" } ``` ```json 403 theme={null} { "msg": "Text-to-speech is not enabled for this guru type" } ``` ```json 429 theme={null} { "error": "Rate limit exceeded" } ``` ```json 500 theme={null} { "msg": "Error generating speech stream" } ``` ## Streaming Response The endpoint returns a streaming audio response with the following headers: * `Content-Type: audio/mpeg` * `Cache-Control: no-cache` * `X-Accel-Buffering: no` (disables nginx buffering for real-time streaming) ## Code Examples The following examples show how to implement streaming TTS in your web application. These are complete, working examples that you can use immediately. ### Streaming the TTS This is a single self-contained HTML file that streams audio playback in real time without waiting for the entire response to finish. Save it, update the configuration, and open it in your browser. > [!WARNING] > > Before running the example, you **must** update two constants at the top of the ` > > > >
>

Text to Speech Demo — Gurubase

> >
> >
> > > >
> >
> > >
>
> > >
> > > > > ``` > [!TIP] > > **Testing Tips:** - **CORS errors?** Serve the file from a local web server > (e.g. `npx serve .`) instead of opening `gurubase-tts.html` directly via > `file://`. - **Safari / iOS:** The example automatically falls back to a > non-streaming blob approach on browsers that do not support the MediaSource > Extensions API. - Audio begins playing as soon as the first chunks arrive from > the server. - Open the browser console to inspect any errors if audio does not > play. # Transcribe Audio Source: https://docs.gurubase.ai/api-reference/endpoints/transcribe-audio POST /{guru_type}/transcribe/ Transcribe audio file to text Transcribe an audio file to text. This endpoint supports various audio formats and handles mobile recordings. ```bash cURL theme={null} curl --request POST \ --url https://api.gurubase.io/api/v1/{guru_slug}/transcribe/ \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: multipart/form-data' \ --form 'audio=@/path/to/your/audio.mp3' ``` ## Path Parameters **guru\_type** `string` *required* The guru type identifier for the transcription request ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **audio** `file` *required* The audio file to transcribe. Supported formats: webm, mp3, wav, m4a, ogg. Maximum size: 25MB. ### Response The response contains the transcribed text from the audio file. **text** `string` The transcribed text from the audio file ```json 200 theme={null} { "text": "Hello, this is a test transcription of the audio file." } ``` ```json 400 theme={null} { "msg": "No audio file provided" } ``` ```json 400 theme={null} { "msg": "Audio file too large. Maximum size is 25MB" } ``` ```json 400 theme={null} { "msg": "Invalid audio format. Supported formats: webm, mp3, wav, m4a, ogg" } ``` ```json 401 theme={null} { "error": "Invalid API key" } ``` ```json 403 theme={null} { "msg": "Voice recording is not enabled for this guru type" } ``` ```json 429 theme={null} { "error": "Rate limit exceeded" } ``` ```json 500 theme={null} { "msg": "Error transcribing audio" } ``` # Upsert User Profiles Source: https://docs.gurubase.ai/api-reference/endpoints/upsert-profiles POST /{guru_slug}/profiles/ Upsert one or more user profiles with their memory data. This endpoint allows you to create or update user profiles in bulk. It is an idempotent operation, meaning you can safely retry requests without creating duplicate profiles. ## Path Parameters **guru\_slug** `string` *required* The slug of the Guru to which the profiles belong. ## Headers **x-api-key** `string` *required* Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys). ### Body Parameters **users** `object[]` *required* An array of user profile objects to upsert. **User Object Properties** **external\_user\_id** `string` *required* A `uuid` for the user from your system. If you want to use this with "Ask Question" endpoint, you need to provide the same `external_user_id` there. **memory** `object` *required* A JSON object containing the user's profile data or "memory". The structure of this object is up to you. ### Example Request ```json theme={null} { "users": [ { "external_user_id": "user1-id", "memory": { "name": "John Doe", "email": "john.doe@example.com" } }, { "external_user_id": "user2-id", "memory": { "name": "Jane Doe", "plan": "premium" } } ] } ``` ### Response The response provides a detailed breakdown of the upsert operation. **status** `string` Indicates the overall status of the request. Will be "success" if the request was accepted and partially or fully processed. **total\_users** `number` The total number of users in the request payload. **processed\_users** `number` The number of users successfully processed. **users\_results** `array` An array of result objects, one for each user in the request, in the same order. **User Result Object** **user\_index** `number` The index of the user in the original request array. **external\_user\_id** `string` The external user ID provided. **success** `boolean` Whether the upsert was successful for this user. **errors** `array` A list of errors if the upsert failed for this user. ```json 200 theme={null} { "status": "success", "total_users": 2, "processed_users": 2, "users_results": [ { "user_index": 0, "external_user_id": "user1-id", "success": true, "errors": [] }, { "user_index": 1, "external_user_id": "user2-id", "success": true, "errors": [] } ] } ``` ```json 400 theme={null} { "error": "Failed to process some users", "details": [], "users_results": [ { "user_index": 0, "external_user_id": "user1-id", "success": false, "errors": [ "Missing memory data" ] }, { "user_index": 1, "external_user_id": "user2-id", "success": true, "errors": [] } ] } ``` ```json 401 theme={null} { "msg": "Invalid API key" } ``` ```json 403 theme={null} { "msg": "Forbidden" } ``` ```json 404 theme={null} { "msg": "Guru type my-guru not found" } ``` ```json 429 theme={null} { "msg": "Request was throttled. Expected available in 56 seconds." } ``` ```json 500 theme={null} { "error": "Internal server error while saving profiles" } ``` # API Reference Source: https://docs.gurubase.ai/api-reference/introduction Complete API reference for Gurubase Welcome to the Gurubase API reference documentation. Our API enables you to programmatically manage AI-powered Q\&A assistants ("Gurus"). > [!NOTE] > > Gurus can only be created through the Gurubase platform interface. The API is used for managing and interacting with existing Gurus. ## Base URL ```bash theme={null} https://api.gurubase.io/api/v1/ ``` > [!NOTE] > > If you're using a self-hosted Gurubase (available exclusively under the Enterprise plan), you must call its backend API URL. The default backend URL for a self-hosted Gurubase API is `http://localhost:8029/api/v1/`. To request access to the self-hosted package, contact us at [contact@gurubase.io](mailto:contact@gurubase.io). The `guru_slug` is a unique identifier for your Guru that can be found in the URL when accessing your Guru through the Gurubase platform interface. For example, if your Guru is accessible at [https://app.gurubase.io/g/anteon](https://app.gurubase.io/g/anteon), then the `guru_slug` is `anteon`. > [!NOTE] > > Youtube channel/playlist API endpoints do not require `guru_slug`. ## Rate Limiting All API endpoints are subject to rate limiting: * 10 requests per minute per user * Returns `429` status code if exceeded * Contact [contact@gurubase.io](mailto:contact@gurubase.io) for increased limits ## Response Codes | Code | Description | | - | - | | 200 | Success | | 400 | Bad Request - Invalid input | | 401 | Unauthorized - Invalid or missing API key | | 429 | Too Many Requests - Rate limit exceeded | | 500 | Internal Server Error | # Changelog Source: https://docs.gurubase.ai/changelog Gurubase Product updates and announcements # Changelog Stay up to date with the latest Gurubase features, improvements, and bug fixes. **July 2026** **New Features** **Chat / Agent mode on the Ask API**: The [Ask Question](/api-reference/endpoints/ask-question) endpoint accepts a new `mode` field. Send `mode: "agent"` to run the question through the autonomous tool loop instead of the default single-pass answer; agent-capable Gurus only, others fall back to Chat. **Anthropic (Claude) Provider Support** — External providers now include a Provider Type dropdown with **OpenAI-compatible** and **Anthropic** options. When Anthropic is selected, any pipeline stage (answer, summary, trust score, triage, follow-ups, agentic actions) runs on the native Anthropic Messages API using Claude models (Opus, Sonnet, Haiku, Fable). Provider rows display a kind badge, and Claude models must be paired with an Anthropic-kind external provider. **Analytics Follow-up & Auto-Generated Filters** — Analytics gains two new page-wide filters: **Follow-up** (First Question / Follow-up) and **Auto-Generated** (Auto-Generated / User-Asked). Exports also include a new "Follow-up" column for unable-to-answer entries. [Learn more →](/guides/analytics) **Multi-Step Agentic Answering (opt-in)**: A new answer path lets a Guru call multiple tools across several steps before writing its final answer, with parallel tool calls per step and built-in safety limits (max steps and doom-loop detection). Off by default, with a per-Guru toggle and a single global default. When enabled, live progress ("what the Guru is doing right now") is shown while the answer is generated and survives page reloads. **MCP Tool Enable / Disable**: Uncheck individual tools in the MCP server tool viewer to hide them from the model. Discovery stays dynamic, so newly added tools appear automatically and only the tools you disable are filtered out. The Clients tab header now reports enabled and disabled counts alongside the per-guru cap. [Learn more →](/guides/mcp-client#view-discovered-tools) **KB Editor Bulk Improve** — Run an AI preset on a batch of up to 10 Zendesk help center articles and review each result one by one, with a resumable queue that survives a page refresh. [Learn more →](/integrations/bots/zendesk#bulk-improve) **KB Editor Diff Modes** — The diff picker splits into two axes: switch **View** (Rendered / Source) and **Layout** (Inline / Split) independently, get a proper Rendered side-by-side comparison, jump between changes with prev/next controls, and copy the full proposed HTML. [Learn more →](/integrations/bots/zendesk#diff-modes) **KB Editor Layout** — Collapse the article list to give the editor the full width, and see the open article's title, Draft badge, Help Center link, and labels pinned to a new top-bar breadcrumb. **Compare HTML Inline Edit** — Edit the compared HTML before publishing on the KB Editor Compare tab; the rendered view and raw HTML stay in sync. **Ticket Editor Simplify** — New Simplify action shortens a draft reply and cuts filler words while keeping every fact, the recipient, greeting, and sign-off. Every Ticket Editor action now preserves the addressee and signature exactly and never inserts boilerplate openers. [Learn more →](/integrations/bots/zendesk#ticket-editor) **January 2026** v0.10.4 **New Features** **Increased API Key Limits** — Maximum API keys per account increased from 5 to 20. [Learn more →](/api-reference/authentication) **Manual Action Triggers** — Trigger Actions manually from the Actions table with a dedicated trigger modal. [Learn more →](/guides/actions) **Manual Agent Triggers** — Run Agents on-demand via manual trigger support in the Agents table. **Agent Model Override** — Override Agent models with persisted configuration details (reasoning effort, verbosity, temperature) for better observability. **Analytics cURL Viewer** — View cURL details for API-sourced questions directly in Analytics. **January 2026** v0.10.3 **New Features** **Google Drive Integration** — Full Google Drive ingestion support with on-demand sync, JSON file import, tree-based file listing with parent folder paths, and data source status visibility. [Learn more →](/integrations/ingestion/google_drive) **Follow-up Questions** — AI-generated follow-up questions in responses to improve multi-turn discovery. **Excel URL Indexing** — Index Excel files directly from URLs with automatic .xls to .xlsx conversion support. **Secret Key Updates** — Update secret keys from the UI and API with full audit log tracking. [Learn more →](/guides/actions) **Example Questions** — Configure example questions per Guru type for better starting prompts. **Viewer Role Excel Access** — Viewer role users can now access and run multi-answer Excel jobs on self-hosted deployments. [Learn more →](/guides/multi-answer) **January 2026** v0.10.2 **Improvements** Enhanced AI model configuration with reasoning effort support. Fixed temperature settings for model responses. **January 2026** v0.10.1 **New Features** **Cost Analytics Dashboard** — Track and visualize LLM usage costs with detailed breakdowns, histograms, and filtering options on Self-Hosted. **Image Compression** — Configurable image compression for attachments to optimize storage and processing. **Fuzzy Search** — Database-backed fuzzy search for semantic search with improved partial matching. [Learn more →](/api-reference/endpoints/semantic-search) **Temperature Control** — Configure AI model temperature for more predictable or creative responses. **Improvements** Improved analytics date range selection across all widgets. Enhanced prompt templates for better context understanding. Faster label selection in semantic search (from \~15s to \~1.3s). Better log chunk selection with stratified sampling. **December 2025** v0.10.0 **New Features** **Agent Actions** — Create custom Python actions that execute during answer generation, with secrets management, syntax highlighting, and scheduling support. [Learn more →](/guides/actions) **Semantic Search Analytics** — Track and analyze semantic search usage patterns. [Learn more →](/guides/analytics) **External User Filtering** — Filter analytics by external user for deeper insights. **Slack Bot Enhancements** — Configure trust score, references, and feedback buttons for Slack responses. [Learn more →](/integrations/bots/slack) **Login Header** — Quick access to login from the header navigation. **Improvements** Enhanced sub-agent handling with better result processing. Improved data source selection with better permissions. Syntax highlighting for JSON data sources. Better Zendesk, Jira, and Slack attachment handling. **November 2025** v0.9.3 **New Features** **Answer Editing** — Edit and improve AI-generated answers directly from the analytics dashboard. [Learn more →](/guides/analytics) **Topics & Sentiment Analysis** — Automatic topic categorization and sentiment detection for questions. [Learn more →](/guides/analytics) **Country Analytics** — Geographic distribution of questions with IP geolocation. [Learn more →](/guides/analytics) **Custom Time Selection** — Specify custom date ranges for analytics queries. [Learn more →](/guides/analytics) **Slack Binges** — Thread-based conversation memory in Slack with binge mapping. [Learn more →](/integrations/bots/slack) **Improvements** Enhanced analytics export with new metrics and filters. Better action clarification and selection logic. Improved bar chart grouping for custom time intervals. Performance optimizations for Milvus vector insertions. **November 2025** v0.9.2 **New Features** **Slack Attachments** — Send and receive images and files in Slack conversations. [Learn more →](/integrations/bots/slack) **GitHub Private Repos** — Index private GitHub repositories with token authentication. [Learn more →](/guides/data-sources) **Zendesk Article Labels** — Automatic label assignment to Zendesk data sources. [Learn more →](/integrations/ingestion/zendesk) **Improvements** Enhanced Actions with timeout configuration and cURL import. Better Excel job error handling and JSON serialization. Improved web widget UI and attachment handling. **October 2025** v0.9.1 **New Features** **Source Ordering** — Configure custom source ordering rules in Guru settings. **Log Filter Phrases** — Manage phrases for filtering log content. **Improvements** Enhanced Guru creation flow with new settings visibility. **October 2025** v0.9.0 **New Features** **Custom Actions** — Execute custom API calls during answer generation with parameter validation and SSRF protection. [Learn more →](/guides/actions) **Audit Logs** — Track all changes to your Guru with a dedicated audit log viewer. [Learn more →](/guides/audit-logs) **Multi-Answer Excel Jobs** — Process Excel files with multiple answers per row. [Learn more →](/guides/multi-answer) **Team Management** — Role-based access control for self-hosted deployments. [Learn more →](/guides/team) **TTS** — Text-to-speech API.[Learn more →](/api-reference/endpoints/text-to-speech-v2) **VTT Subtitle Support** — Import video subtitles in VTT format. [Learn more →](/guides/data-sources) **Zendesk Time-Based Sync** — Schedule Zendesk ingestion jobs with custom intervals. [Learn more →](/integrations/ingestion/zendesk) **Log Download** — Download application logs for self-hosted troubleshooting. **Improvements** Enhanced analytics with vote filtering and trust score ordering. Better YouTube title extraction via oEmbed/yt-dlp. Improved Excel job UI with pagination and search. Automatic orphaned vector cleanup in the background. **September 2025** v0.8.3 **New Features** **API Rate Limiting** — Configurable rate limits with per-end-user throttling support. [Learn more →](/api-reference/authentication) **Jira Bot Signature** — Custom bot signatures for Jira message filtering. [Learn more →](/integrations/bots/jira) **Improvements** Optimized analytics queries for better performance. Enhanced merge logic for adjacent search results. Lazy loading for attachment processing. **September 2025** v0.8.2 **New Features** **Zendesk Diff View** — Review changes before applying in the Zendesk ticket editor. **Improvements** Enhanced subscription page UI with clearer plan presentation. Improved Jira integration with Atlassian terminology and subdomain support. Better Zendesk KB editor with increased app size. **September 2025** v0.8.0 **New Features** **Jira Bot Integration** — Automatic question answering directly in Jira tickets. [Learn more →](/integrations/bots/jira) **Follow-up Question Permissions** — Customizable follow-up question limits per plan. **Manual Reindex** — Trigger ingestion job reindexes manually from the UI. [Learn more →](/api-reference/endpoints/reindex-datasources) **Improvements** Better Jira attachment handling in prompts. Improved log extraction without errors on empty matches. Increased timeout for self-hosted deployments. **September 2025** v0.7.1 **New Features** **Reranker** — Alternative reranker option for improved search relevance. **Zendesk Ticket Editor** — AI-powered ticket editing and rewriting. **Improvements** Unsaved changes confirmation in source dialogs. Better job handling across Slack, Jira, and file sources. Default embedding model now configurable via admin. **August 2025** v0.7.0 **New Features** **Follow-up Question API** — Generate follow-up suggestions via API. [Learn more →](/api-reference/endpoints/follow-up-examples) **Text Rewrite API** — Dedicated endpoint for article rewriting. **Memory** — Personalized memory for API requests with external user IDs. [Learn more →](/api-reference/endpoints/upsert-profiles) **Text-to-Speech** — Listen to answers with audio playback support. [Learn more →](/api-reference/endpoints/text-to-speech) **Zendesk KB Editor** — AI-powered Knowledge Base article improvement. **Clarification Questions** — AI can ask clarifying questions before answering. **Multiple Backfill Jobs** — Multiple jobs from the same integration per Guru. **User Profiles** — Store user context for personalized responses. [Learn more →](/api-reference/endpoints/upsert-profiles) **Improvements** Unified backfill job model across all integrations. Better YouTube Shorts URL support. Enhanced semantic search with label filtering. Improved JQL/CQL validation in UI. **July 2025** v0.6.1 **New Features** **Session Management API** — External user ID support with session retrieval and deletion. [Learn more →](/api-reference/endpoints/list-sessions) **Language Analytics** — Visualize question language distribution over time. [Learn more →](/guides/analytics) **Excel Extraction** — Initial Excel file processing for data ingestion. [Learn more →](/guides/excel-extraction) **Enforce Language** — Keep Guru responses in a configured language. [Learn more →](/guides/prompting-your-guru) **Voice Recording Timer** — Visual feedback with recording duration display. **Improvements** Multi-language support for follow-up questions. Better Discord error handling. Improved Slack streaming without duplicate questions. **July 2025** v0.6.0 **New Features** **Voice Typing** — Ask questions using voice with audio transcription. [Learn more →](/api-reference/endpoints/transcribe-audio) **Vote Recording API** — Track upvotes and downvotes for answers. [Learn more →](/api-reference/endpoints/record-vote) **Simple Interactions** — Quick responses without full RAG processing. **API Access Limits** — Plan-gated API access with usage limits. [Learn more →](/api-reference/authentication) **Downvote Reasons** — Modal for capturing feedback on negative votes. [Learn more →](/guides/analytics) **Improvements** Enhanced analytics with user names instead of IDs. Dynamic language detection and response. Better Confluence ingestion with pagination fixes. **June 2025** v0.5.9 **New Features** **Label Selection** — Filter semantic search results by data source labels. [Learn more →](/api-reference/endpoints/semantic-search) **Attachment Support** — Send images and files in widget conversations. [Learn more →](/integrations/bots/website-widget) **Improvements** Better PDF processing with improved chunking. Enhanced GitHub codebase indexing. **June 2025** v0.5.8 **New Features** **Image Answers** — Ask questions with image attachments. [Learn more →](/api-reference/endpoints/ask-question) **O3 Model Support** — Support for OpenAI o3 models. **Dynamic LLMs** — Configure different LLM models per Guru. [Learn more →](/guides/prompting-your-guru) **Source Content Viewer** — Preview data source content in the UI. [Learn more →](/guides/data-sources) **Improvements** Separate prompts and trust score handling. Better data source UX with improved selection. Jira image support in ingestion. # Actions Source: https://docs.gurubase.ai/guides/actions Extend your Guru's capabilities with external API calls and tool integrations Actions transform your Guru from a static knowledge base into a **dynamic AI agent** that can execute code, call APIs, and fetch real-time data. When users ask questions, your Guru automatically triggers relevant actions to provide live, accurate responses. > [!NOTE] > > Your Actions work in both **Chat** and **Agent** answer modes — the difference > is how they run. See [Answer Modes](/guides/answer-modes). ## What Can Actions Do? > [card] Billing & Payments > > Look up refunds, invoices, subscriptions, and charges in Stripe, billing systems, or ERPs > [card] Customer Context > > Pull account details, entitlements, and plan info from CRM or product databases > [card] System Status > > Check Statuspage, Datadog, or monitoring tools for outages and incidents > [card] Order & Inventory > > Track shipments, check stock levels, and query warehouse systems in real-time > [card] Ticketing & Jira > > Create bugs, update tickets, check SLAs, and manage queue hygiene > [card] Any REST API > > Connect to any system with an API — internal tools, third-party services, or custom endpoints ## Action Types | Type | Description | Latency | Best For | | - | - | - | - | | **Python Code** | Execute custom Python scripts in isolated sandbox containers | 2-3 seconds | Complex logic, data processing, multi-step API calls, AI integrations | | **API Call** | Make HTTP requests directly to external APIs | Very low (\~100ms) | Simple REST API lookups, single-endpoint queries | > [!TIP] > > Use **API Call** for simple lookups (faster response). Use **Python Code** when you need to process data, call multiple APIs, or add conditional logic. ## Scheduled Actions Actions can run automatically on a schedule using cron expressions — no user question required. | Use Case | Cron Expression | Description | | - | - | - | | Daily SLA report | `0 9 * * *` | Every day at 9 AM | | Hourly status check | `0 * * * *` | Every hour | | Weekly digest | `0 9 * * 1` | Every Monday at 9 AM | | Every 15 minutes | `*/15 * * * *` | For real-time monitoring | > [accordion] How to Enable Scheduling > > 1. Open the action editor > 2. Scroll to **Schedule Configuration** > 3. Toggle **Enable Scheduling** > 4. Enter a cron expression (e.g., `0 9 * * *` for daily at 9 AM) > > The action will run automatically at the scheduled time. Results are logged in the action history. **Common scheduled action patterns:** * **Morning SLA briefing** — Check at-risk tickets before the team starts * **Incident monitoring** — Poll status pages every 15 minutes * **Usage alerts** — Daily check for customers approaching limits * **Data sync** — Periodically update external systems ## High-Impact Actions for Common Pain Points > [!NOTE] > > **Customer asks:** *"I requested a refund 3 days ago but still haven't received it. Order #12345. What's going on?"* > [card] Without Actions > > * Open Stripe dashboard > * Search for customer email > * Copy transaction ID > * Check subscription status in another tab > * Cross-reference with CRM > * Type "let me check and get back to you" > * **5+ minutes per ticket** > [card] With Actions > > * Agent asks Guru: *"Check refund for order 12345"* > * Action fetches data from Stripe automatically > * AI responds with status, ETA, and next steps > * **Done in seconds** ### For Support Agents > [accordion] Refund / Invoice / Payment Lookup > > **Pain:** Billing questions are high-volume. Agents waste time hopping between Stripe, ERP, CRM, and email threads just to answer "where is my refund?" > > **User asks:** *"Where is my refund for order 12345?"* or *"Can you resend the invoice for December?"* > > **Integrations:** Stripe, Billing/ERP, CRM > > **Result:** Refund state + ETA + invoice link + next step (if failed) > > **Impact:** Reduces billing tickets 40%+, eliminates "let me check and get back to you" > > *** > > **Trigger:** "When the user asks about a refund status, invoice, or payment" > > **Parameters:** > > | Name | Type | What to Extract | Required | > | - | - | - | - | > | `order_id` | String | Order or invoice number | Yes | > | `customer_email` | String | Customer's email address | No | > > **Secrets:** `STRIPE_API_KEY` > > ```python theme={null} > import os > import requests > > order_id = os.environ.get('order_id') > api_key = os.environ.get('STRIPE_API_KEY') > > # Search for refunds related to this order > response = requests.get( > "https://api.stripe.com/v1/refunds", > auth=(api_key, ''), > params={"limit": 10} > ) > > refunds = response.json().get('data', []) > found = None > for r in refunds: > if order_id in str(r.get('metadata', {})) or order_id in r.get('id', ''): > found = r > break > > if found: > status = found['status'] > amount = found['amount'] / 100 > currency = found['currency'].upper() > print(f"💰 Refund Status: {status.upper()}") > print(f"💵 Amount: {amount} {currency}") > if status == 'succeeded': > print(f"✓ Refund completed - funds returned to original payment method") > print(f"⏱️ May take 5-10 business days to appear on statement") > elif status == 'pending': > print(f"⏳ Refund is processing - typically completes within 5-10 business days") > else: > print(f"⚠️ Refund status: {status} - may require manual review") > else: > print(f"No refund found for order {order_id}") > print(f"💡 Next step: Check if refund was requested or process new refund") > ``` > [accordion] Double Charge Investigation > > **Pain:** "I was charged twice!" claims escalate fast. Agents need exact transaction mapping to prevent unnecessary refunds. > > **User asks:** *"I see two charges of \$49.99. What happened?"* > > **Integrations:** Payment provider, Subscription ledger > > **Result:** Charge IDs, whether one is auth/hold, whether it was reversed, recommended response > > **Impact:** Prevents unnecessary refunds, reduces escalations, improves customer trust > > *** > > **Trigger:** "When the user reports duplicate charges, double billing, or being charged twice" > > **Parameters:** > > | Name | Type | What to Extract | Required | > | - | - | - | - | > | `customer_email` | String | Customer's email address | Yes | > | `amount` | Number | The charge amount in question | No | > > **Secrets:** `STRIPE_API_KEY` > > ```python theme={null} > import os > import requests > from datetime import datetime, timedelta > > email = os.environ.get('customer_email') > amount = os.environ.get('amount') > api_key = os.environ.get('STRIPE_API_KEY') > > # Get recent charges for this customer > response = requests.get( > "https://api.stripe.com/v1/charges", > auth=(api_key, ''), > params={"limit": 20} > ) > > charges = response.json().get('data', []) > recent = [c for c in charges if email in str(c.get('billing_details', {}).get('email', ''))] > > if len(recent) >= 2: > print(f"📋 Found {len(recent)} recent charges for {email}:\n") > for c in recent[:5]: > amt = c['amount'] / 100 > status = c['status'] > captured = "Captured" if c['captured'] else "Auth Hold (not captured)" > refunded = " [REFUNDED]" if c['refunded'] else "" > date = datetime.fromtimestamp(c['created']).strftime('%Y-%m-%d %H:%M') > print(f" • ${amt} - {status} - {captured}{refunded}") > print(f" ID: {c['id'][:20]}... | Date: {date}\n") > > # Check for auth holds > auth_holds = [c for c in recent if not c['captured']] > if auth_holds: > print(f"💡 {len(auth_holds)} charge(s) are authorization holds that will auto-release in 7 days") > > refunded = [c for c in recent if c['refunded']] > if refunded: > print(f"✓ {len(refunded)} charge(s) already refunded") > else: > print(f"Only {len(recent)} charge(s) found for {email} - no duplicate detected") > ``` > [accordion] Outage & Incident Status > > **Pain:** During outages, agents guess and customers get conflicting answers. Tickets pile up with the same question. > > **User asks:** *"Your app is down!"* or *"502 error - is this known?"* > > **Integrations:** Statuspage, Datadog/New Relic, Incident channel > > **Result:** Current incident status, impacted regions/features, workaround, ETA, subscribe link > > **Impact:** Deflects 80%+ of duplicate incident tickets, standardizes incident communication > > *** > > **Trigger:** "When the user reports an error, outage, downtime, or asks if there's a known issue" > > **Parameters:** > > | Name | Type | What to Extract | Required | > | - | - | - | - | > | `error_code` | String | Error code or message (e.g., 502, timeout) | No | > | `feature` | String | Feature or service affected | No | > > **Secrets:** `STATUSPAGE_API_KEY`, `STATUSPAGE_PAGE_ID` > > ```python theme={null} > import os > import requests > > api_key = os.environ.get('STATUSPAGE_API_KEY') > page_id = os.environ.get('STATUSPAGE_PAGE_ID') > error_code = os.environ.get('error_code', '') > feature = os.environ.get('feature', '') > > # Get current incidents > response = requests.get( > f"https://api.statuspage.io/v1/pages/{page_id}/incidents/unresolved", > headers={"Authorization": f"OAuth {api_key}"} > ) > > incidents = response.json() > > if incidents: > print(f"🚨 ACTIVE INCIDENT(S):\n") > for inc in incidents[:3]: > print(f"📌 {inc['name']}") > print(f" Status: {inc['status'].upper()}") > print(f" Impact: {inc['impact']}") > if inc.get('incident_updates'): > latest = inc['incident_updates'][0] > print(f" Latest update: {latest['body'][:200]}...") > print(f" 🔗 Track: {inc['shortlink']}\n") > > print(f"💡 Recommended response: We're aware of an issue and actively working on it.") > print(f" Share the status link above for real-time updates.") > else: > print(f"✓ No active incidents on status page") > print(f"💡 This may be an isolated issue - gather more details:") > print(f" • Browser/device?") > print(f" • When did it start?") > print(f" • Can you share a screenshot?") > ``` > [accordion] Entitlements & Plan Lookup > > **Pain:** "Why can't I use feature X?" causes long back-and-forth. Agents ask "What plan are you on?" when they could just look it up. > > **User asks:** *"Why can't I use SSO?"* or *"What's my seat limit?"* > > **Integrations:** CRM, Product DB, Feature flags > > **Result:** Plan, entitlements, usage limits, what to upgrade, exact remediation > > **Impact:** Fewer escalations to Sales/Engineering, faster resolution > > *** > > **Trigger:** "When the user asks about their plan, features, entitlements, limits, or why they can't access something" > > **Parameters:** > > | Name | Type | What to Extract | Required | > | - | - | - | - | > | `customer_email` | String | Customer's email or account ID | Yes | > | `feature` | String | Feature they're asking about | No | > > **Secrets:** `PRODUCT_DB_API_KEY` > > ```python theme={null} > import os > import requests > > email = os.environ.get('customer_email') > feature = os.environ.get('feature', '').lower() > api_key = os.environ.get('PRODUCT_DB_API_KEY') > > # Mock product database lookup - replace with your actual API > response = requests.get( > f"https://api.yourproduct.com/v1/accounts/lookup", > headers={"Authorization": f"Bearer {api_key}"}, > params={"email": email} > ) > > if response.status_code == 200: > data = response.json() > plan = data.get('plan', 'Free') > seats_used = data.get('seats_used', 1) > seats_limit = data.get('seats_limit', 5) > features = data.get('features', []) > > print(f"📋 Account: {email}") > print(f"📦 Plan: {plan}") > print(f"👥 Seats: {seats_used}/{seats_limit} used") > print(f"✨ Features enabled: {', '.join(features) or 'Basic only'}") > > if feature: > if feature in [f.lower() for f in features]: > print(f"\n✓ '{feature}' IS enabled on this account") > else: > print(f"\n✗ '{feature}' is NOT included in {plan} plan") > print(f"💡 To enable: Upgrade to Pro or Enterprise plan") > else: > print(f"Account not found for {email}") > ``` > [accordion] Create Jira Bug with Full Context > > **Pain:** Agents write low-quality Jira tickets. Engineers bounce them back asking for steps, logs, and environment details. > > **Agent asks:** *"Create a Jira bug for this crash with all the details"* > > **Integrations:** Jira/Linear, Log aggregator, Error tracking > > **Result:** Structured bug (steps, expected/actual, env, severity, customer impact) > > **Impact:** Fewer loops with engineering, faster MTTR, happier developers > > *** > > **Trigger:** "When the user asks to create a bug report, Jira issue, or ticket for engineering" > > **Parameters:** > > | Name | Type | What to Extract | Required | > | - | - | - | - | > | `summary` | String | Brief description of the bug | Yes | > | `steps` | String | Steps to reproduce | No | > | `customer_email` | String | Affected customer | No | > | `priority` | String | Priority level (low/medium/high/critical) | No | > > **Secrets:** `JIRA_API_TOKEN`, `JIRA_EMAIL`, `JIRA_DOMAIN`, `JIRA_PROJECT_KEY` > > ```python theme={null} > import os > import requests > from requests.auth import HTTPBasicAuth > > summary = os.environ.get('summary') > steps = os.environ.get('steps', 'Not provided') > customer = os.environ.get('customer_email', 'Unknown') > priority = os.environ.get('priority', 'medium') > > api_token = os.environ.get('JIRA_API_TOKEN') > email = os.environ.get('JIRA_EMAIL') > domain = os.environ.get('JIRA_DOMAIN') > project = os.environ.get('JIRA_PROJECT_KEY') > > priority_map = {'low': '4', 'medium': '3', 'high': '2', 'critical': '1'} > > description = f"""h3. Bug Report > > *Reported by:* Support Team > *Affected Customer:* {customer} > > h4. Steps to Reproduce > {steps} > > h4. Expected Behavior > [To be filled by engineering] > > h4. Actual Behavior > {summary} > > h4. Environment > * Browser: [Check with customer] > * OS: [Check with customer] > * Account type: [Add from CRM lookup] > > h4. Customer Impact > Customer reported this issue via support ticket. > """ > > response = requests.post( > f"https://{domain}.atlassian.net/rest/api/3/issue", > auth=HTTPBasicAuth(email, api_token), > headers={"Content-Type": "application/json"}, > json={ > "fields": { > "project": {"key": project}, > "summary": f"[Support] {summary}", > "issuetype": {"name": "Bug"}, > "priority": {"id": priority_map.get(priority, '3')}, > "description": { > "type": "doc", > "version": 1, > "content": [{"type": "paragraph", "content": [{"type": "text", "text": description}]}] > } > } > } > ) > > if response.status_code == 201: > issue = response.json() > key = issue['key'] > print(f"✓ Created Jira issue: {key}") > print(f"🔗 https://{domain}.atlassian.net/browse/{key}") > print(f"📋 Priority: {priority.upper()}") > else: > print(f"✗ Failed to create issue: {response.text}") > ``` ### For Support Leaders > [accordion] SLA Breach Prevention > > **Pain:** Missed SLAs create churn and fire drills. Agents don't notice until it's too late. > > **Leader asks:** *"Which tickets will breach SLA in the next 2 hours?"* > > **Integrations:** Ticketing system, SLA policies, Queue metrics > > **Result:** Prioritized list + recommended reassignment + breach countdown > > **Impact:** 60% fewer SLA breaches, better WBR metrics, reduced churn > > *** > > **Trigger:** "When the user asks about SLA status, at-risk tickets, or potential SLA breaches" > > **Parameters:** > > | Name | Type | What to Extract | Required | > | - | - | - | - | > | `hours_ahead` | Number | How many hours to look ahead | No | > | `team` | String | Specific team or queue to check | No | > > **Secrets:** none. `ZENDESK_DOMAIN` and `ZENDESK_ACCESS_TOKEN` are injected from the Guru's [Zendesk integration](/integrations/ingestion/zendesk). > > ```python theme={null} > import os > import requests > from datetime import datetime, timedelta > > hours = int(os.environ.get('hours_ahead', 2)) > domain = os.environ.get('ZENDESK_DOMAIN') > token = os.environ.get('ZENDESK_ACCESS_TOKEN') > > # Get tickets with SLA info > response = requests.get( > f"https://{domain}/api/v2/search.json", > headers={"Authorization": f"Bearer {token}"}, > params={ > "query": "type:ticket status "sort_by": "created_at", > "sort_order": "asc", > "per_page": 50 > } > ) > > tickets = response.json().get('results', []) > > # Filter for at-risk (simplified - real impl would use SLA policies API) > print(f"⚠️ SLA AT-RISK TICKETS (next {hours} hours):\n") > > at_risk = [] > for t in tickets[:20]: > created = datetime.fromisoformat(t['created_at'].replace('Z', '+00:00')) > age_hours = (datetime.now(created.tzinfo) - created).total_seconds() / 3600 > > # Simple SLA logic - replace with your actual SLA policies > if t.get('priority') == 'urgent' and age_hours > 1: > at_risk.append((t, 'CRITICAL', age_hours)) > elif t.get('priority') == 'high' and age_hours > 4: > at_risk.append((t, 'HIGH', age_hours)) > > if at_risk: > for ticket, risk, age in sorted(at_risk, key=lambda x: x[1])[:10]: > print(f"🔴 #{ticket['id']}: {ticket['subject'][:50]}...") > print(f" Risk: {risk} | Age: {age:.1f}h | Priority: {ticket.get('priority', 'normal')}") > print(f" Assignee: {ticket.get('assignee_id', 'Unassigned')}") > print(f" 🔗 https://{domain}/agent/tickets/{ticket['id']}\n") > > print(f"💡 Recommended: Reassign top 3 to available senior agents") > else: > print(f"✓ No tickets at immediate SLA risk") > ``` > [accordion] Proactive Incident Communications > > **Pain:** During incidents, teams manually compile who is impacted. Customers find out on Twitter before you tell them. > > **Leader asks:** *"Which customers are impacted by the EU latency issue?"* > > **Integrations:** Usage telemetry, Region mapping, CRM segments > > **Result:** Impacted customer list + suggested email template + Zendesk macro update > > **Impact:** Reduces churn by communicating fast and accurately, builds trust > > *** > > **Trigger:** "When the user asks which customers are affected by an incident, outage, or issue" > > **Parameters:** > > | Name | Type | What to Extract | Required | > | - | - | - | - | > | `incident_type` | String | Type of incident (latency, outage, feature) | Yes | > | `region` | String | Affected region (EU, US, APAC, etc.) | No | > > **Secrets:** `ANALYTICS_API_KEY` > > ```python theme={null} > import os > import requests > > incident = os.environ.get('incident_type') > region = os.environ.get('region', 'all') > api_key = os.environ.get('ANALYTICS_API_KEY') > > # Mock analytics lookup - replace with your telemetry API > print(f"📊 IMPACT ANALYSIS: {incident.upper()}\n") > print(f"Region filter: {region}\n") > > # Simulated response - replace with actual API call > print(f"👥 Impacted Customers: 47 accounts") > print(f" • Enterprise: 12 accounts (prioritize)") > print(f" • Pro: 28 accounts") > print(f" • Free: 7 accounts\n") > > print(f"📧 SUGGESTED COMMUNICATION:\n") > print(f"Subject: Service Degradation Notice - {incident}") > print(f""" > Dear Customer, > > We're currently experiencing {incident} affecting some users in {region}. > Our team is actively working on resolution. > > Current status: Investigating > ETA: Within 2 hours > > Track updates: [statuspage link] > > We apologize for the inconvenience. > """) > print(f"💡 Actions:") > print(f" 1. Update status page") > print(f" 2. Create Zendesk macro for incoming tickets") > print(f" 3. Notify CSMs for Enterprise accounts") > ``` ### For Customers (Self-Service) > [accordion] Order & Shipping Status > > **Pain:** "Where is my order?" is the #1 support question. Customers ask constantly, agents guess ETAs, wrong info causes refunds. > > **Customer asks:** *"Where is my order #12345?"* or *"When will my package arrive?"* > > **Integrations:** OMS, Carrier tracking (FedEx/UPS/USPS), Warehouse status > > **Result:** Real tracking summary, last scan location, expected delivery, exception handling > > **Impact:** Deflects 60%+ of WISMO tickets, reduces refunds from "lost" packages > > *** > > **Trigger:** "When the user asks about order status, shipping, tracking, or delivery" > > **Parameters:** > > | Name | Type | What to Extract | Required | > | - | - | - | - | > | `order_id` | String | Order number or tracking number | Yes | > > **Secrets:** `SHIPPO_API_KEY` > > ```python theme={null} > import os > import requests > > order_id = os.environ.get('order_id') > api_key = os.environ.get('SHIPPO_API_KEY') > > # Using Shippo for multi-carrier tracking - replace with your provider > response = requests.get( > f"https://api.goshippo.com/tracks/{order_id}", > headers={"Authorization": f"ShippoToken {api_key}"} > ) > > if response.status_code == 200: > data = response.json() > status = data.get('tracking_status', {}) > > print(f"📦 Order: {order_id}") > print(f"🚚 Carrier: {data.get('carrier', 'Unknown')}") > print(f"📍 Status: {status.get('status', 'Unknown').upper()}") > print(f"📍 Location: {status.get('location', {}).get('city', 'In transit')}") > > eta = data.get('eta') > if eta: > print(f"📅 Expected delivery: {eta}") > > # Show tracking history > history = data.get('tracking_history', [])[:3] > if history: > print(f"\n📋 Recent updates:") > for event in history: > print(f" • {event.get('status_details', 'Update')} - {event.get('status_date', '')[:10]}") > else: > print(f"📦 Order {order_id}: Processing") > print(f"💡 Tracking will be available once shipped (usually within 24-48 hours)") > ``` > [accordion] Account & Billing Self-Service > > **Pain:** Customers can't find basic account info. "What plan am I on?" "When does my trial end?" flood support. > > **Customer asks:** *"What plan am I on?"* or *"When does my subscription renew?"* > > **Integrations:** Billing system, Subscription management > > **Result:** Plan details, renewal date, usage stats, upgrade options > > **Impact:** Deflects 40% of account-related tickets, enables self-service upgrades > > *** > > **Trigger:** "When the user asks about their account, plan, subscription, billing, or renewal" > > **Parameters:** > > | Name | Type | What to Extract | Required | > | - | - | - | - | > | `customer_email` | String | Customer's email (from session/memory) | Yes | > > **Secrets:** `STRIPE_API_KEY` > > ```python theme={null} > import os > import requests > from datetime import datetime > > email = os.environ.get('customer_email') > api_key = os.environ.get('STRIPE_API_KEY') > > # Look up customer in Stripe > response = requests.get( > "https://api.stripe.com/v1/customers/search", > auth=(api_key, ''), > params={"query": f'email:"{email}"'} > ) > > customers = response.json().get('data', []) > > if customers: > customer = customers[0] > > # Get subscriptions > sub_response = requests.get( > "https://api.stripe.com/v1/subscriptions", > auth=(api_key, ''), > params={"customer": customer['id'], "limit": 1} > ) > > subs = sub_response.json().get('data', []) > > print(f"👤 Account: {email}\n") > > if subs: > sub = subs[0] > plan = sub.get('items', {}).get('data', [{}])[0].get('price', {}).get('nickname', 'Standard') > status = sub['status'] > period_end = datetime.fromtimestamp(sub['current_period_end']) > > print(f"📦 Plan: {plan}") > print(f"📊 Status: {status.upper()}") > print(f"📅 Renews: {period_end.strftime('%B %d, %Y')}") > > if sub.get('cancel_at_period_end'): > print(f"⚠️ Cancels at period end") > else: > print(f"📦 Plan: Free") > print(f"💡 Upgrade anytime at yourapp.com/pricing") > else: > print(f"No account found for {email}") > print(f"💡 Sign up at yourapp.com/signup") > ``` > [accordion] Real-Time Product Availability > > **Pain:** "Is this in stock?" questions are endless. Static KB answers are outdated by the time they're published. > > **Customer asks:** *"Is the Blue Widget in stock in size XL?"* > > **Integrations:** Inventory management, Warehouse systems > > **Result:** Real-time stock level, shipping estimate, alternatives if out of stock > > **Impact:** Reduces pre-sales questions 50%, increases conversions with accurate info > > *** > > **Trigger:** "When the user asks about stock, inventory, availability, or if a product is in stock" > > **Parameters:** > > | Name | Type | What to Extract | Required | > | - | - | - | - | > | `product_name` | String | Product name or SKU | Yes | > | `variant` | String | Size, color, or other variant | No | > > **Secrets:** `INVENTORY_API_KEY` > > ```python theme={null} > import os > import requests > > product = os.environ.get('product_name') > variant = os.environ.get('variant', 'default') > api_key = os.environ.get('INVENTORY_API_KEY') > > # Replace with your inventory API > response = requests.get( > "https://api.yourinventory.com/v1/stock", > headers={"Authorization": f"Bearer {api_key}"}, > params={"product": product, "variant": variant} > ) > > if response.status_code == 200: > data = response.json() > stock = data.get('quantity', 0) > > print(f"📦 {product}" + (f" ({variant})" if variant != 'default' else "")) > > if stock > 10: > print(f"✅ In Stock: {stock} available") > print(f"🚚 Ships within 1-2 business days") > elif stock > 0: > print(f"⚠️ Low Stock: Only {stock} left!") > print(f"🚚 Order now - ships within 1-2 business days") > else: > restock = data.get('restock_date', 'soon') > print(f"❌ Currently Out of Stock") > print(f"📅 Expected back: {restock}") > > # Suggest alternatives > alts = data.get('alternatives', []) > if alts: > print(f"\n💡 Similar items in stock:") > for alt in alts[:3]: > print(f" • {alt}") > else: > print(f"Product not found. Try searching on our website.") > ``` ![Actions](https://mintcdn.com/gurubase/L45gNxIKTPhmtYGQ/images/guides/actions/actions-page.png?fit=max\&auto=format\&n=L45gNxIKTPhmtYGQ\&q=85\&s=abf19278d8a50fb793a7cad63e666754) > [!NOTE] > > Each Guru has a limit on the number of actions based on your plan (shown as "5 of 10 actions used"). *** ## How Actions Work **1. Trigger Detection** The Guru checks if the user's question matches your defined trigger conditions. **2. Parameter Extraction** Parameters are automatically extracted from the user's question based on your descriptions. **3. Execution** Python code runs in an isolated container, or an HTTP request is made to your API endpoint. **4. Response Handling** The AI interprets and presents the results to the user. > [!NOTE] > > Actions only execute if all required parameters can be extracted from the user's question (or have default values). *** ## Creating an Action ![Empty Actions](https://mintcdn.com/gurubase/PMnPe4PheUTq6epp/images/guides/actions/empty.png?fit=max\&auto=format\&n=PMnPe4PheUTq6epp\&q=85\&s=3f34ce21ac64f0f8f6a7079686442c17) ### Step 1: Basic Information ![Action Basic Configuration](https://mintcdn.com/gurubase/zaLJLm9LRF1mIU4s/images/guides/actions/basic-action-fields.png?fit=max\&auto=format\&n=zaLJLm9LRF1mIU4s\&q=85\&s=1e7d23d7b4ae2ed313aa67872dc9d7c3) | Field | Description | Example | | - | - | - | | **Action Name** | Descriptive name for your action | "Get Weather Data" | | **When to Trigger** | Specific conditions for when this action should run | "When the user asks about current weather for a city" | > [!TIP] > > Be specific with trigger conditions. Instead of "When asking about data", use "When asking about current weather conditions for a specific location". ### Step 2: Define Parameters ![Action Parameters Configuration](https://mintcdn.com/gurubase/zaLJLm9LRF1mIU4s/images/guides/actions/parameters.png?fit=max\&auto=format\&n=zaLJLm9LRF1mIU4s\&q=85\&s=138cd6672d994d4e1381363b913fce45) Parameters are values extracted from the user's question: | Field | Description | | - | - | | **Name** | Letters and underscores only (e.g., `city`, `user_id`) | | **Type** | String, Number, or Boolean | | **What to Extract** | Clear description for extraction | | **Required** | Must be provided for action to run | | **Default Value** | Fallback if not extracted | **How to use parameters:** * **Python Code**: `os.environ.get('city')` * **API Call**: `https://api.example.com/weather/{city}` ### Step 3: Configure Action Type Choose **Python Code** or **API Call** and configure accordingly. See [Python Code Actions](#python-code-actions) or [API Call Actions](#api-call-actions) below. ### Step 4: Testing Before enabling the action, use **Test Action** to run it with sample parameters. This verifies that parameters, secrets, and the action logic work as expected. Check that the output looks correct and that secrets are masked in the result. *** ## Python Code Actions ![Python Code Configuration](https://mintcdn.com/gurubase/9LvzXJemI7W7BxJZ/images/guides/actions/python.png?fit=max\&auto=format\&n=9LvzXJemI7W7BxJZ\&q=85\&s=58bc8be847420a4b6c902b64975f539b) Execute custom Python code in isolated Docker containers. Secrets and parameters are injected as environment variables. > [card] Isolated Execution > > Each run uses a fresh container, destroyed after use > [card] Pre-installed Libraries > > pandas, numpy, requests, openai, and more ready to use > [card] Results via stdout > > Your `print()` output is captured and returned > [card] Secrets Protection > > All secrets are masked in output automatically ### Sandbox Environment Python code runs inside an isolated sandbox container: **Base Image:** `python:3.13-slim` with `git` and `curl` installed > [accordion] Pre-installed Python Packages > > ``` > anthropic==0.76.0 > beautifulsoup4==4.14.3 > boto3==1.43.36 > httpx==0.28.1 > instructor==1.14.3 > lxml==6.1.0 > matplotlib==3.10.8 > numpy==2.2.3 > openai==2.15.0 > opencv-python==4.12.0.88 > pandas==2.3.3 > pillow==12.1.0 > pydantic==2.12.5 > pypdf==6.1.1 > requests==2.32.5 > scikit-learn==1.8.0 > scipy==1.17.0 > seaborn==0.13.2 > urllib3==2.6.3 > ``` > [!NOTE] > > You cannot install additional packages at runtime. If you need a package that isn't listed, [contact us](https://gurubase.io/contact/). > [!NOTE] > > When using `boto3`, the AWS SDK endpoint URL must be a static string literal in your code. Dynamic values (env vars, kwargs expansion, computed strings) are rejected at validation time, and mutating AWS endpoint or metadata env vars (`AWS_ENDPOINT_URL*`, `AWS_EC2_METADATA_DISABLED`, `AWS_IGNORE_CONFIGURED_ENDPOINT_URLS`) from inside an action is blocked. EC2 instance metadata probing is disabled in the sandbox. ### Execution Limits | Resource | Limit | | - | - | | Memory | 512MB | | CPU | 1 core | | Max Processes | 128 | | Timeout | 30 seconds | | Temp Storage (`/tmp`) | 100MB | ### Security Restrictions | Restriction | Description | | - | - | | Read-only filesystem | Only `/tmp` is writable | | No binary execution | `/tmp` mounted with `noexec` flag | | Dropped capabilities | All Linux capabilities removed | | Network access | Allowed for API calls | ### Accessing Parameters and Secrets Parameters and secrets are injected as environment variables: ```python theme={null} import os # Access a parameter extracted from user's question username = os.environ.get('USERNAME') # Access a secret configured in Guru Settings api_key = os.environ.get('MY_API_KEY') print(f"Fetching data for {username}...") ``` > [!WARNING] > > The `os` module is restricted. Only `os.environ`, `os.environ.get()`, and `os.getenv()` are allowed. Other `os` functions (`os.system()`, `os.popen()`, file operations) are blocked, whether imported as `os.system(...)`, via `from os import system`, or under an alias like `from os import system as run` (the underlying name is what's checked, not the alias). > [!NOTE] > > For in-memory buffers, `from io import BytesIO, StringIO` is allowed (useful with `pypdf.PdfReader(BytesIO(...))` or `pandas.read_csv(StringIO(...))`). Importing the `io` module itself is not allowed, so `io.FileIO` and other file-backed helpers remain blocked. ### Basic Pattern Every Python action follows the same pattern: ```python theme={null} import os import requests # 1. Get parameters (extracted from user's question) order_id = os.environ.get('order_id') # 2. Get secrets (configured in Guru Settings) api_key = os.environ.get('STRIPE_API_KEY') # 3. Call your API response = requests.get( "https://api.stripe.com/v1/refunds", auth=(api_key, ''), params={"limit": 10} ) # 4. Process and print results (this is what the AI uses) data = response.json() print(f"Found {len(data.get('data', []))} refunds") ``` > [!NOTE] > > See [High-Impact Actions for Common Pain Points](#high-impact-actions-for-common-pain-points) for 10 production-ready examples with real API integrations. *** ## API Call Actions ![API Call Configuration](https://mintcdn.com/gurubase/zaLJLm9LRF1mIU4s/images/guides/actions/api-call-settings-1.png?fit=max\&auto=format\&n=zaLJLm9LRF1mIU4s\&q=85\&s=481592a4cff7364cdc6acd336f177483) Configure HTTP requests to external APIs: | Field | Description | Example | | - | - | - | | **HTTP Method** | GET, POST, PUT, PATCH, DELETE | `GET` | | **Endpoint URL** | API endpoint with parameter placeholders | `https://api.github.com/users/{username}` | | **Headers** | Authentication and content type | `Authorization: Bearer {API_KEY}` | | **Request Body** | JSON payload (for POST/PUT/PATCH) | See below | ![API Call Request Body](https://mintcdn.com/gurubase/zaLJLm9LRF1mIU4s/images/guides/actions/api-call-settings-2.png?fit=max\&auto=format\&n=zaLJLm9LRF1mIU4s\&q=85\&s=2270f37ee14ebeeb282e98d673e8de3a) **Request Body Example:** ```json theme={null} { "user_id": "{user_id}", "action": "update", "data": "{payload}" } ``` Use `{parameter_name}` or `{SECRET_NAME}` syntax anywhere in the URL, headers, or body. You can also reference the built-in variables `{GURUBASE_USER_EMAIL}`, `{GURUBASE_USER_NAME}`, `{GURUBASE_USER_GROUPS}`, and `{GURUBASE_GURU_SLUG}`. See [Built-in Variables](#built-in-variables) for details and limitations. **Example URL with built-in variables:** ``` https://api.example.com/v1/orders?user={GURUBASE_USER_EMAIL}&guru={GURUBASE_GURU_SLUG} ``` *** ## Built-in Variables Gurubase automatically injects a set of reserved variables at execution time. These are available in both **Python Code** and **API Call** actions. | Variable | Description | | - | - | | `GURUBASE_USER_EMAIL` | Email of the user currently calling the action (not the action creator) | | `GURUBASE_USER_NAME` | Display name of the calling user (falls back to email prefix if no name is set) | | `GURUBASE_USER_GROUPS` | Comma-separated content group names the user belongs to (default: `Everyone`) | | `GURUBASE_GURU_SLUG` | Slug of the Guru this action belongs to | ### Zendesk Variables These three are injected only when the Guru has a [Zendesk integration](/integrations/ingestion/zendesk). They let an Action call Zendesk without anyone storing a Zendesk credential. | Variable | Requires | Description | | - | - | - | | `ZENDESK_DOMAIN` | Any Zendesk integration | The integration's domain, e.g. `yourcompany.zendesk.com` | | `ZENDESK_ACCESS_TOKEN` | Zendesk integration with OAuth | Read-only access token | | `ZENDESK_WRITE_ACCESS_TOKEN` | Zendesk integration with OAuth | Write-capable token. Use it only where the Action actually modifies Zendesk. | Send either token as a bearer header: ```python theme={null} import os import requests domain = os.environ.get('ZENDESK_DOMAIN') token = os.environ.get('ZENDESK_ACCESS_TOKEN') response = requests.get( f"https://{domain}/api/v2/tickets.json", headers={"Authorization": f"Bearer {token}"} ) ``` > [!NOTE] > > Do not store a Zendesk OAuth token in a secret. Zendesk tokens expire after at most 48 hours, so a stored one breaks within two days. Gurubase re-mints the injected tokens automatically, and the OAuth client secret never leaves the backend. Referencing a Zendesk variable without the required integration is rejected when you save the Action, the same way a missing secret is. ### Python Code Usage ```python theme={null} import os user_email = os.environ.get('GURUBASE_USER_EMAIL') user_name = os.environ.get('GURUBASE_USER_NAME') user_groups = os.environ.get('GURUBASE_USER_GROUPS') guru_slug = os.environ.get('GURUBASE_GURU_SLUG') # Example: filter Supabase rows by calling user's email import requests supabase_key = os.environ.get('SUPABASE_KEY') response = requests.get( "https://your-project.supabase.co/rest/v1/orders", headers={ "apikey": supabase_key, "Authorization": f"Bearer {supabase_key}" }, params={"user_email": f"eq.{user_email}"} ) data = response.json() print(f"Found {len(data)} orders for {user_email}") ``` ### API Call Usage Use `{VARIABLE_NAME}` syntax in endpoint URL, headers, or request body: ``` https://api.example.com/v1/users/{GURUBASE_USER_EMAIL}/orders ``` Header example: ``` X-User-Email: {GURUBASE_USER_EMAIL} X-User-Groups: {GURUBASE_USER_GROUPS} ``` > [!WARNING] > > These names are reserved. You cannot create a parameter or secret named `GURUBASE_USER_EMAIL`, `GURUBASE_USER_NAME`, `GURUBASE_USER_GROUPS`, `GURUBASE_GURU_SLUG`, `GURUBASE_EXTERNAL_USER_ID`, `ZENDESK_ACCESS_TOKEN`, or `ZENDESK_WRITE_ACCESS_TOKEN`. The action will be rejected at validation time. > [!NOTE] > > User variables (`GURUBASE_USER_EMAIL`, `GURUBASE_USER_NAME`, `GURUBASE_USER_GROUPS`) are populated only when the action is called from the **Gurubase web UI** (chat or Test button). When the action runs via widget, bot integrations (Slack, Discord, Jira, GitHub, Zendesk), MCP, or any API-key-authenticated path, user email and name resolve to empty strings, and groups resolves to `Everyone`. `GURUBASE_GURU_SLUG` is always populated. Check for empty values if your action can be triggered from multiple paths. ## Platform-Provided Credentials Some credentials are injected only when the deployment is configured for them, so an action can use them without anyone copying the value into a secret. | Variable | Provided when | | - | - | | `FIRECRAWL_API_KEY` | Self-hosted only, and a Firecrawl API key is set in the **Web Scraper** section of the **Settings** page | The Zendesk variables are covered under [Zendesk Variables](#zendesk-variables). ```python theme={null} import os, requests # No secret needed: the key configured on the Settings page arrives as an env var. key = os.environ.get('FIRECRAWL_API_KEY') page = requests.post( "https://api.firecrawl.dev/v2/scrape", headers={"Authorization": f"Bearer {key}"}, json={"url": "https://example.com", "formats": ["markdown"]}, timeout=45, ) ``` The injected credentials travel on the same masked channel as secrets, so they are hidden from the action's output. `ZENDESK_DOMAIN` is configuration and is not masked. An **API Call** action that uses an injected credential is pinned to that credential's own service: `FIRECRAWL_API_KEY` may only call `firecrawl.dev`, and the Zendesk tokens may only call the Guru's own Zendesk domain. Calling another host fails with an explanatory error, because the credential belongs to the deployment rather than to the action's author. A Guru's own secret is not restricted this way. > [!NOTE] > > Referencing one of these names in an action that the deployment cannot provide it for is rejected when you save, with a message explaining what to configure. A Guru that defines its own `FIRECRAWL_API_KEY` secret keeps using that secret; the injected key never overrides it. The Zendesk token names are reserved and cannot be defined as secrets. On Gurubase Cloud, `FIRECRAWL_API_KEY` is not injected: define it as a secret on the Guru. *** ## Managing Actions ![Actions Management Dashboard](https://mintcdn.com/gurubase/9LvzXJemI7W7BxJZ/images/guides/actions/created.jpg?fit=max\&auto=format\&n=9LvzXJemI7W7BxJZ\&q=85\&s=51d964698bce042be3de43cc832a8c9b) ### Dashboard Actions | Action | Description | | - | - | | **History** | View execution history of all actions | | **Import** | Import action from JSON file | | **Create an Action** | Create new action from scratch | > [!NOTE] > > Execution history is retained for a limited number of days (5 days by default on Gurubase Cloud). The exact retention period is shown beneath the **Execution History** title on the History page. ### Per-Action Menu (⋮) | Action | Description | | - | - | | **Edit** | Modify configuration | | **Export** | Download as JSON file | | **Trigger Action** | Run manually | | **Disable** | Temporarily disable | | **Delete** | Permanently remove | > [!NOTE] > > If a secret used by an action is deleted, that action will be automatically disabled. ### How Actions Appear in Answers ![Action Reference](https://mintcdn.com/gurubase/9LvzXJemI7W7BxJZ/images/guides/actions/reference.jpg?fit=max\&auto=format\&n=9LvzXJemI7W7BxJZ\&q=85\&s=db7c70222d4610d334de77ebb7a198ff) When an action is used, it's shown with the action name in the response. *** ## Secrets Management ![Secrets](https://mintcdn.com/gurubase/9LvzXJemI7W7BxJZ/images/guides/actions/secrets.jpg?fit=max\&auto=format\&n=9LvzXJemI7W7BxJZ\&q=85\&s=e7f81e665c606eacc11e92557dbed8a4) Secrets are encrypted credentials (API keys, tokens, passwords) stored in **Guru Settings → Secrets**. | Feature | Description | | - | - | | **Encryption** | AES-256 encryption at rest | | **Masking** | Automatically masked in all output | | **Python Access** | `os.environ.get('SECRET_NAME')` | | **API Call Access** | `{SECRET_NAME}` syntax | > [!WARNING] > > Secret names cannot conflict with parameter or variable names. Secret, variable, and parameter names also cannot be `GURUBASE_USER_EMAIL`, `GURUBASE_USER_NAME`, `GURUBASE_USER_GROUPS`, or `GURUBASE_GURU_SLUG` -- those are reserved for [built-in variables](#built-in-variables). Deleting a secret automatically disables all actions using it. *** ## Variables ![Variables](https://mintcdn.com/gurubase/7QpQgnahSbZ1rPRI/images/guides/actions/variables.png?fit=max\&auto=format\&n=7QpQgnahSbZ1rPRI\&q=85\&s=233e149d0b4b68c6d8ca3bfe3064d031) Variables are plain-text values stored in **Guru Settings → Variables**. They are available to actions at runtime, but the delivery mechanism differs by action type: **Python Code** actions receive them as real environment variables (read with `os.environ.get('VARIABLE_NAME')`), while **API Call** actions do not get process-level env injection and instead resolve `{VARIABLE_NAME}` placeholders in the request template (endpoint, headers, body, basic-auth fields) via string substitution at execution time. Variables stay plain-text in both paths: they are not encrypted at rest and not masked in execution logs or output, so use them only for non-sensitive configuration like base URLs, default IDs, or feature flags. | Feature | Secrets | Variables | | - | - | - | | Encrypted at rest | Yes (AES-256) | No | | Masked in execution output | Yes | No | | Python Access | `os.environ.get('SECRET_NAME')` | `os.environ.get('VARIABLE_NAME')` | | API Call Access | `{SECRET_NAME}` | `{VARIABLE_NAME}` | | Visible in the UI after save | Hidden (show only on edit) | Show toggle on the list view | **When to use which** * **Secrets** for anything you would not want to appear in logs or exported audit data (API keys, tokens, passwords, signing keys). * **Variables** for everything else (URLs, region codes, default IDs, switches). Pulling these into Variables makes it easy to update them in one place without editing every action. > [!WARNING] > > Keys must be unique across Secrets and Variables for a guru. A variable named `API_BASE_URL` and a secret named `API_BASE_URL` cannot coexist. Reserved prefixes (`LD_`, `PYTHON_`, `EXECUTOR_`, `REDIS_`, `DOCKER_`) and reserved names like `GURUBASE_USER_EMAIL` are blocked for both. Deleting a variable automatically disables all actions that reference it. **Automatic variables** When you create an Action or Agent, Gurubase auto-creates a Variable whose value is that entity's slug: `ACTION__SLUG` holds the action's slug, and `AGENT__SLUG` holds the agent's slug. This lets one action invoke another by reference, for example by passing `os.environ.get('ACTION_LOOKUP_ORDER_SLUG')` to a tool call. These appear in the Variables page with an **Automatic** chip; edit and delete are disabled because the lifecycle is managed by Gurubase. Deleting the underlying action also removes the variable. The `ACTION_` and `AGENT_` prefixes are reserved for these auto-managed variables and cannot be used for user-created secrets or variables. *** ## Best Practices > [accordion] Write Specific Trigger Conditions > > | Avoid | Do Instead | > | - | - | > | "When asking about data" | "When asking about current weather conditions for a specific location" | > | "When user needs info" | "When user asks for a GitHub user's profile information" | > [accordion] Write Clear Parameter Descriptions > > | Avoid | Do Instead | > | - | - | > | `id` - "The ID" | `user_id` - "The unique identifier for the GitHub user whose profile information is being requested" | > | `city` - "City" | `city` - "The name of the city to get weather data for (e.g., London, New York)" | > [accordion] Test Before Enabling > > * Always test actions with various parameter combinations > * Verify error handling for missing or invalid parameters > * Check that secrets are properly masked in output > [accordion] Keep Actions Focused > > * Each action should do one specific task > * Avoid actions that try to do too many things > * Create multiple simple actions instead of one complex one *** ## Multi-Step Workflows Most real workflows don't fit into a single action. They chain reads with writes, or fan out writes across multiple systems in one turn. Gurubase runs every relevant action per turn, each selected and parameterized independently based on the user's question. **A single turn can include:** * **Reads** to pull live data from a database, CRM, or HR system. * **Writes** that actually change state in the systems you own (create a ticket, submit a request, post a message). * **Parallel fan-out** to multiple systems (create a Jira issue *and* DM an on-call engineer at the same time). ### How Gurubase Picks Multiple Actions per Turn **1. Every enabled action is evaluated** Each action's **condition prompt** is checked against the user's question. Any number of conditions can match in a single turn. **2. Parameters are extracted for each match** For every matched action, the LLM pulls the required parameters out of the conversation (including context from earlier turns). **3. Matched actions run in parallel** Up to 3 actions execute concurrently. Results stream back as they complete. **4. One unified answer is generated** Gurubase composes a single response that weaves together outputs from every action plus knowledge from your sources. ### Worked Example: Employee PTO Flow This is the pattern demonstrated in the [HR Guru demo video](https://gurubase.io/actions/): an employee assistant that **reads** a PTO balance in one turn, then **writes** the request to SAP and pings the manager on Slack in the next. One conversation, two action types, three systems. #### Action 1: Read the PTO balance (Python) > [accordion] pto\_balance\_lookup > > ```json theme={null} > { > "name": "pto_balance_lookup", > "condition_prompt": "When the user asks how many PTO, vacation, or time-off days they have remaining.", > "action_type": "PYTHON_CODE", > "parameters": [], > "config": { > "code": "import os\nimport requests\n\nuser = os.environ['GURUBASE_USER_EMAIL']\nr = requests.get(\n f\"{os.environ['HR_API']}/pto\",\n params={'user': user},\n headers={'Authorization': f\"Bearer {os.environ['HR_TOKEN']}\"},\n)\ndata = r.json()\nprint(f\"{data['remaining']} days remaining · last used {data['last_used']}\")\n", > "timeout": 30 > } > } > ``` > > **What it does:** Reads the signed-in user's email from the built-in `GURUBASE_USER_EMAIL` variable, calls the HR API, prints the balance. The printed output is injected into the agent's answer. > > **Sample response:** *"Hi Alex, you have 12 PTO days remaining this year. Last used on March 3, 2026 (2 days)."* #### Action 2: Create the PTO request in SAP (API call) > [accordion] submit\_pto\_request > > ```json theme={null} > { > "name": "submit_pto_request", > "condition_prompt": "When the user confirms they want to book, submit, or request specific PTO days. Extract the date the user wants off.", > "action_type": "API_CALL", > "parameters": [ > { > "name": "date", > "type": "string", > "description": "The date the user wants to take off, as YYYY-MM-DD.", > "required": true > } > ], > "config": { > "endpoint": "https://sap.example.com/api/v2/timeoff", > "method": "POST", > "headers": [ > { "key": "Authorization", "value": "Bearer {SAP_API_TOKEN}" }, > { "key": "Content-Type", "value": "application/json" } > ], > "body": { > "employee_email": "{GURUBASE_USER_EMAIL}", > "start_date": "{date}", > "end_date": "{date}", > "type": "PTO" > } > } > } > ``` > > **What it does:** POSTs to SAP's time-off endpoint. The signed-in user's email is pulled from `{GURUBASE_USER_EMAIL}`, the date comes from the extracted `date` parameter, and the SAP token is resolved from the encrypted `SAP_API_TOKEN` secret at execution time. #### Action 3: Notify the manager (API call) > [accordion] notify\_manager > > ```json theme={null} > { > "name": "notify_manager", > "condition_prompt": "When a PTO request has been submitted and the user's manager should be notified.", > "action_type": "API_CALL", > "parameters": [ > { > "name": "date", > "type": "string", > "description": "The date being requested off.", > "required": true > } > ], > "config": { > "endpoint": "https://slack.com/api/chat.postMessage", > "method": "POST", > "headers": [ > { "key": "Authorization", "value": "Bearer {SLACK_BOT_TOKEN}" }, > { "key": "Content-Type", "value": "application/json" } > ], > "body": { > "channel": "#hr-approvals", > "text": "{GURUBASE_USER_NAME} just requested {date} off via HR Guru." > } > } > } > ``` > > **What it does:** Posts a Slack message to the HR approvals channel. The condition prompt is scoped so this fires alongside `submit_pto_request` (in the same turn), not as an independent action the LLM might pick on its own. #### How it plays out **Turn 1 (read)** > **User:** How many PTO days do I have left? > > **Agent:** *(runs `pto_balance_lookup`)* Hi Alex, you have **12 PTO days** remaining this year. Last used on March 3, 2026 (2 days). **Turn 2 (parallel writes)** > **User:** Perfect. Book Friday off then. > > **Agent:** *(runs `submit_pto_request` and `notify_manager` in parallel)* Done. PTO request **#4892** submitted to SAP for **Friday, Apr 17**. The HR approvals channel has been notified on Slack. > [!TIP] > > Condition prompts are the glue. Write them specifically enough that `notify_manager` only fires alongside a real submission, not on every chat about PTO. ### Parallel vs Sequential Matched actions always run **in parallel** within a single turn (up to 3 concurrent). This keeps response time low and is the right default when actions are independent, like SAP + Slack above. If you need **true data dependencies** where the output of action A must feed action B, you have two options: * **Multi-turn**: Let turn 1 finish, then drive turn 2 with the follow-up question. The conversation carries context between turns, which is how the PTO flow above works. * **Agent actions**: Wrap the whole sequence in a single `AGENT`-type action whose internal tool-calling loop runs the steps in order. The agent sees each sub-tool's output before deciding on the next one. > [!NOTE] > > For most workflows, parallel + multi-turn is plenty. Reach for `AGENT` only when one user request truly needs a deterministic multi-step pipeline. ### Testing the Flow Before enabling a multi-action workflow for users: * **Test each action standalone** from the Action Builder with hand-picked parameters. Every action should succeed in isolation. * **Run a full conversation in the Guru preview.** Verify the right combination of actions fires at each turn and that parameters extract correctly from the user's wording. * **Review the audit log.** Every run records inputs, outputs, duration, and the question that triggered it. This is the fastest way to debug extraction failures or parameter mismatches. * **Stress-test condition overlap.** If two actions might fire for the same question, either tighten their condition prompts or accept that both will run (and make sure neither has side effects that break the other). *** ## Next Steps > [card] [Prompting Your Guru](/guides/prompting-your-guru) > > Customize your Guru's responses and behavior > [card] [Data Sources](/guides/data-sources) > > Add and manage knowledge sources > [card] [Analytics](/guides/analytics) > > Monitor action usage and performance > [card] [MCP Client Connections](/guides/mcp-client) > > Connect external MCP tools to your Guru > [card] [API Reference](/api-reference/introduction) > > Build custom integrations # Agents Source: https://docs.gurubase.ai/guides/agents Orchestrate multiple tools and actions with AI agents that can make intelligent decisions ## Overview Agents are AI-powered orchestrators that can intelligently decide which tools and actions to use based on user questions. Unlike actions that execute a single task, agents can chain multiple tool calls together, make decisions, and handle complex workflows autonomously. ![Agents](https://mintcdn.com/gurubase/L45gNxIKTPhmtYGQ/images/guides/agents/list.png?fit=max\&auto=format\&n=L45gNxIKTPhmtYGQ\&q=85\&s=bc976e1ad6b220d0c3332c55dd3e9411) Agents transform your Guru into an intelligent assistant that can: * orchestrate multiple tools and actions * make autonomous decisions about which tools to use * chain tool calls together for complex workflows * handle nested agent calls (agents calling other agents) * process structured or free-form responses Each Guru has a limit on the number of agents (e.g., "9 of 10 agents used"). ## How Agents Work Agents use an intelligent orchestration system: 1. **When to Trigger This Agent**: The Guru checks if the user's question matches your defined conditions 2. **Tool Selection**: The agent selects from its available tools (actions or other agents) based on the task 3. **Execution**: The agent makes autonomous decisions about which tools to call and in what order 4. **Nested Execution**: Agents can call other agents, creating nested execution chains 5. **Response Handling**: The **Usage Instructions** guide the AI on how to interpret and present the agent's response ## Creating an Agent The agent creation process consists of four main steps: 1. Basic Information 2. Tool Selection 3. Agent Configuration 4. Usage Instructions, Scheduling, and Testing ### Basic Information ![Agent Basic Configuration](https://mintcdn.com/gurubase/L45gNxIKTPhmtYGQ/images/guides/agents/basic-info.png?fit=max\&auto=format\&n=L45gNxIKTPhmtYGQ\&q=85\&s=4c84a035f0d59b7da29cf9fa83538104) * **Agent Name**: Provide a descriptive name that appears in your agents list (e.g., "Address manager") * **When to Trigger This Agent**: Be specific about keywords, patterns, or user intents to ensure it only runs when appropriate * Example: "When the user wants to do any operation regarding their address or wants to guess the secret" ### Agent Configuration ![Agent Configuration](https://mintcdn.com/gurubase/L45gNxIKTPhmtYGQ/images/guides/agents/config.png?fit=max\&auto=format\&n=L45gNxIKTPhmtYGQ\&q=85\&s=60cac15b90e1303cc4ccf1ffad795b69) Configure how the agent behaves and processes requests: * **System Prompt**: Required instructions that define the agent's behavior and capabilities * Example: "You are an assistant that manages addresses. You can either get or update addresses. You are also used for guessing the secret" * **Output Schema (Optional)**: JSON schema for structured output. Leave empty for free-form responses * Example: ```json theme={null} { "message": "string", "reasoning": "string" } ``` * **Max Tool Calls**: Maximum number of tool calls per execution (1-100) * Limits how many tools the agent can call in a single execution * Default: 10 * **Max Depth**: Maximum nesting depth for agent calls (1-10) * Controls how deeply agents can call other agents * Default: 5 * Prevents infinite recursion in nested agent scenarios ### Tool Selection ![Selected Tools](https://mintcdn.com/gurubase/L45gNxIKTPhmtYGQ/images/guides/agents/selected-tools.png?fit=max\&auto=format\&n=L45gNxIKTPhmtYGQ\&q=85\&s=d4bbbf295a02d81fe86c3a3eb5cb2fc6) Select which actions and agents this agent can use as tools. Available tools include: * **Actions**: Python Code and API Call actions you've created * **Other Agents**: Other agents in your Guru (enabling nested agent calls) ![Available Tools](https://mintcdn.com/gurubase/L45gNxIKTPhmtYGQ/images/guides/agents/tools-list.png?fit=max\&auto=format\&n=L45gNxIKTPhmtYGQ\&q=85\&s=b090b811c973dc7e941a6485673ccd63) * Use the search bar to filter available tools * Selected tools appear as tags that can be removed individually * Use "Clear all" to deselect all tools * The agent will intelligently choose which tools to use based on the user's question ### Usage Instructions and Testing ![Usage Instructions Configuration](https://mintcdn.com/gurubase/L45gNxIKTPhmtYGQ/images/guides/agents/how-to-use-the-response.png?fit=max\&auto=format\&n=L45gNxIKTPhmtYGQ\&q=85\&s=c47455a3d3bc97d407cefd6813d7e0bc) * **Usage Instructions**: Provide instructions for how the AI should interpret and present the agent's response to users * Example: "Extract the message and reasoning from the JSON response and present them in a clear format" **Testing:** * Use the "Test Agent" button to verify your configuration * Tools will be mocked (not actually executed) during testing * Test results show the agent's decision-making process and tool selection ### Scheduling ![Schedule Configuration](https://mintcdn.com/gurubase/L45gNxIKTPhmtYGQ/images/guides/agents/scheduling.png?fit=max\&auto=format\&n=L45gNxIKTPhmtYGQ\&q=85\&s=1af4f403a307d396fbd5539066f01656) **Scheduling Agents:** * Enable scheduling using the toggle switch * Configure the execution schedule using a cron expression in standard format: `minute hour day month weekday` * Example: `0 9 * * *` runs daily at 9 AM * Example: `*/5 * * * *` runs every 5 minutes * Scheduled agents display their cron expression in the agents list ## Managing Agents * View all configured agents with their name, number of tools, status (Enabled/Disabled), and schedule (cron expression if scheduled) * Click the menu icon (⋮) next to any agent to: * **Edit**: Modify the agent's configuration * **Disable**: Temporarily disable without deleting * **Delete**: Permanently remove the agent * Click "View Code" to see integration code samples for the agent * Enable or disable agents at any time * Disabled agents won't be triggered by user questions * **Note**: If a tool (action or agent) used by an agent is deleted, that agent will be automatically disabled ## Agent History ![Agent History](https://mintcdn.com/gurubase/L45gNxIKTPhmtYGQ/images/guides/agents/exec-list.png?fit=max\&auto=format\&n=L45gNxIKTPhmtYGQ\&q=85\&s=04541484a63f642ca9595d149d93e041) View the execution history for all agents from the Agents page by clicking the "History" button. The history table displays: * **Status**: Execution outcome (Completed or Failed) * **Action Name**: Name of the executed agent * **Type**: Always "Agent" for agent executions * **Source**: How the agent was triggered (Api, Scheduled, Test, etc.) * **Started At**: Date and time when execution began * **Duration**: Execution time in seconds * **Test**: Whether the execution was a test run ![Nested Tool Calls](https://mintcdn.com/gurubase/L45gNxIKTPhmtYGQ/images/guides/agents/nested-display.png?fit=max\&auto=format\&n=L45gNxIKTPhmtYGQ\&q=85\&s=96cef1c150f43a2257d044269723f36e) **Nested Execution View:** The execution details page shows a hierarchical view of nested tool calls: * Top-level agent execution * Indented tool calls showing which tools were called * Further indentation for nested agent calls * Each level shows its own status, duration, and type This table helps you understand the agent's decision-making process, debug failed executions, and optimize tool selection. Click the eye icon on any row to view detailed execution information. ![Agent Execution Details](https://mintcdn.com/gurubase/L45gNxIKTPhmtYGQ/images/guides/agents/exec-details.png?fit=max\&auto=format\&n=L45gNxIKTPhmtYGQ\&q=85\&s=11c4e629f10f2b2fdcb2352207af3a2f) **Execution Details Page:** * **Execution Info**: Unique execution ID, status, depth, agent name, source, and test flag * **Timing**: Start time, duration, and completion time * **Input Data**: Parameters and values used during execution (collapsible) * **Output Data**: Agent's response data (collapsible) * **Tool Calls**: List of all tool calls made during execution (collapsible) * **Nested Executions**: Immediate childrens of the agent (collapsible) ## Integration ![OpenAI SDK Integration](https://mintcdn.com/gurubase/L45gNxIKTPhmtYGQ/images/guides/agents/openai-sdk.png?fit=max\&auto=format\&n=L45gNxIKTPhmtYGQ\&q=85\&s=81ad32781ccd062c8ddc5bdf6c1025f7) Agents can be integrated into your application using the OpenAI SDK. Each agent has a unique model identifier that you can use with any OpenAI-compatible client. **Python Example:** ```python theme={null} from openai import OpenAI client = OpenAI( api_key="", base_url="" ) response = client.chat.completions.create( model="gurubase/dd99f96a-9220-48c9-8abe-941e250dbb30", messages=[ {"role": "user", "content": "Sample usage"} ], user="user_id" # For memory tracking ) ``` Click "View Code" on any agent to see its specific integration code. ## Common Mistakes to Avoid **Vague Trigger Conditions**: ❌ "When asking about data" → ✅ "When the user wants to do any operation regarding their address" **Inadequate System Prompts**: ❌ "You are a helpful assistant" → ✅ "You are an assistant that manages addresses. You can either get or update addresses. You are also used for guessing the secret" **Too Many Tools**: ❌ Selecting 20+ tools for a single agent → ✅ Select only the tools relevant to the agent's specific purpose **Incomplete Usage Instructions**: ❌ "Use the response" → ✅ "Extract the message and reasoning from the JSON response and present them in a clear, formatted summary" **Not Testing Agents**: ❌ Enabling agents without testing them first → ✅ Always test agents with various scenarios before enabling **Excessive Nesting Depth**: ❌ Setting max depth to 10 without considering complexity → ✅ Start with lower depth (3-5) and increase only if needed **Missing Output Schema**: ❌ Not defining output schema when structured data is needed → ✅ Define a clear JSON schema for consistent, parseable responses ## Next Steps > [card] [Actions Guide](/guides/actions) > > Learn how to create actions that agents can use as tools > [card] [API Reference](/api-reference/introduction) > > Explore our API documentation for advanced integrations > [card] [Create Your First Guru](/guides/create-guru) > > Learn how to create and configure your first Guru > [card] [Prompting Your Guru](/guides/prompting-your-guru) > > Learn how to customize your Guru's responses and behavior # Analytics Source: https://docs.gurubase.ai/guides/analytics Learn how to analyze the usage of your Guru. Gurubase provides a comprehensive usage analytics dashboard to help you understand how your Guru is being used. Track what questions are being asked, how your Guru is performing, and gain insights into user behavior and engagement patterns. ## Accessing the Usage Analytics To access the usage analytics, go to the Guru's detail page and click on the "Analytics" tab. ![Usage Analytics](https://mintcdn.com/gurubase/5FHPDe8YHmgZaJEr/images/guides/analytics/analytics-tab.png?fit=max\&auto=format\&n=5FHPDe8YHmgZaJEr\&q=85\&s=b94cf0e77661e1af12da60f30741c990) ## Usage Analytics Dashboard The usage analytics dashboard provides a detailed overview of your Guru's usage with comprehensive metrics and visualizations. All sections are synchronized and respond to the filters and date range you select. ### Date Range and Filters At the top of the dashboard, you can select a date range using predefined options (Today, Yesterday, 7D, 30D, 3M, 6M, 12M) or choose a custom date range. ![Custom Date Selection](https://mintcdn.com/gurubase/5FHPDe8YHmgZaJEr/images/guides/analytics/custom-date.png?fit=max\&auto=format\&n=5FHPDe8YHmgZaJEr\&q=85\&s=886a2a5bb1ba5a73d52a21acad4057e8) The dashboard also includes page-wide filters that apply to all sections: ![Page-wide Filters](https://mintcdn.com/gurubase/5FHPDe8YHmgZaJEr/images/guides/analytics/filters.png?fit=max\&auto=format\&n=5FHPDe8YHmgZaJEr\&q=85\&s=e7fe82dec75af740317d87ff628d02bd) * **User**: Filter by specific users * **Intent**: Filter by user intent. The following intent types are available: * **Short Answer**: User wants a brief, concise answer * **Explanation**: User wants detailed explanation of a concept * **How To**: User wants step-by-step instructions * **Why**: User wants to understand reasons or causes * **Comparison**: User wants to compare different options * **Clarification**: User needs clarification on something unclear * **Greeting**: User is greeting or starting conversation * **Thanks**: User is expressing gratitude * **Troubleshooting**: User is trying to solve a problem * **Information Request**: User wants specific information * **Other**: Any other intent not covered above * **Sentiment**: Filter by sentiment. The following sentiment types are available: * **Positive** * **Neutral** * **Negative** * **Topics**: Filter by topic tags * **Vote**: Filter by vote status (Upvote, Downvote, No Vote) * **Edit Answer**: Filter by edited answers * **Follow-up**: Filter by whether a question is a first question or a follow-up in a conversation * **Auto-Generated**: Filter by whether the question was fired automatically by an integration (Auto-Generated, e.g. the Zendesk app asking the ticket when it is opened) or typed by the user (User-Asked). Use this to separate passive auto-answers from real usage. * **Source**: Filter by source type (Slack, Discord, GitHub, Widget, API, Gurubase UI, Zendesk, etc.) * **Country**: Filter by country All filters work together to provide a comprehensive view of your Guru's performance across different dimensions. ### Key Metrics ![Key Metrics Cards](https://mintcdn.com/gurubase/k7DfTtAb-NYJNG6I/images/guides/analytics/stat-cards.png?fit=max\&auto=format\&n=k7DfTtAb-NYJNG6I\&q=85\&s=546d396fda0ae65003f11564cbf438c2) The dashboard stat cards display six key metrics at a glance: * **Total Questions**: Total number of questions asked * **Out of Context Questions**: Questions that couldn't be answered * **Referenced Data Sources**: Number of unique data sources used * **Average Response Time**: Average time taken to generate answers * **Answer Ratio**: Percentage of questions that received answers * **Average Binge Length**: Average number of questions per user session Each metric shows percentage changes compared to the previous period, helping you track trends over time. ## Dashboard Sections Below are the sections available in the usage analytics dashboard, organized in the order they appear: ### 1. Questions Section ![Questions Section Overview](https://mintcdn.com/gurubase/k7DfTtAb-NYJNG6I/images/guides/analytics/questions-1.png?fit=max\&auto=format\&n=k7DfTtAb-NYJNG6I\&q=85\&s=ebb62e556ca6799a3a2ebf520e003b10) The questions section shows all questions that have been asked to your Guru over time. You can view detailed information including: * Question text with clickable links * Trust score (how closely the sources matched the question) * Vote status (upvote, downvote, or no vote) * User who asked the question * Response time * User intent classification * Sentiment analysis * Topics extracted from the question * Language and country information ![Questions Section Details](https://mintcdn.com/gurubase/k7DfTtAb-NYJNG6I/images/guides/analytics/questions-2.png?fit=max\&auto=format\&n=k7DfTtAb-NYJNG6I\&q=85\&s=8739f647af4a89b8c39b3e552c061572) You can search questions by text, sort by various columns, and filter using the page-wide filters. The section also includes a bar chart showing question frequency over time. ### 2. Unable to Answer Section ![Unable to Answer Section Overview](https://mintcdn.com/gurubase/k7DfTtAb-NYJNG6I/images/guides/analytics/unable-1.png?fit=max\&auto=format\&n=k7DfTtAb-NYJNG6I\&q=85\&s=6d6c8bd5e7088de03c72737b392b9762) The unable to answer section shows questions that your Guru was unable to answer. Each entry includes: * The reason why the question couldn't be answered (e.g., "Not enough context", "Not related") * Source, user, intent, sentiment, topics, language, and country information ![Unable to Answer Section Details](https://mintcdn.com/gurubase/k7DfTtAb-NYJNG6I/images/guides/analytics/unable-2.png?fit=max\&auto=format\&n=k7DfTtAb-NYJNG6I\&q=85\&s=b6b4db06e44a286fd383299a01970afe) This section includes a bar chart showing the frequency of unanswered questions over time and a language distribution chart. This provides valuable insight into whether your data sources are sufficient for your users. You can improve your data sources and reindex them to enable your Guru to answer more questions. Analytics exports (XLSX, CSV, JSON) include a **Follow-up** column for unable-to-answer entries so you can tell first questions apart from follow-ups when analyzing downloads. ### 3. Referenced Data Sources Section ![Referenced Data Sources Section](https://mintcdn.com/gurubase/k7DfTtAb-NYJNG6I/images/guides/analytics/referenced-sources.png?fit=max\&auto=format\&n=k7DfTtAb-NYJNG6I\&q=85\&s=a38daebb99ec4468a2cd796635a07667) The referenced data sources section shows the data sources that your Guru has used to answer questions. The "Referenced" column shows the number of times each data source has been referenced to answer questions. Clicking on a data source opens a modal showing all questions that referenced that source, along with detailed information about each question. ![Referenced Questions Modal](https://mintcdn.com/gurubase/k7DfTtAb-NYJNG6I/images/guides/analytics/referenced-source-questions.png?fit=max\&auto=format\&n=k7DfTtAb-NYJNG6I\&q=85\&s=f2e3954c0dc354b8b7f40aab34b802fb) ### 4. User Distribution ![User Distribution](https://mintcdn.com/gurubase/k7DfTtAb-NYJNG6I/images/guides/analytics/user-dist.png?fit=max\&auto=format\&n=k7DfTtAb-NYJNG6I\&q=85\&s=2ddd018691215819047d294a599180a9) The user distribution section shows how questions are distributed among users. It displays two pie charts: * **Questions**: Distribution of all questions by user * **Unable to Answer**: Distribution of unanswered questions by user This helps you understand which users are most active and identify patterns in question distribution. ### 5. External User Distribution The external user distribution section mirrors User Distribution but buckets questions by `external_user_id` (set when asking via the API or widget with an external user identifier). Questions without an external user id are excluded. It displays two pie charts: * **Questions**: Distribution of all questions by external user * **Unable to Answer**: Distribution of unanswered questions by external user Use this to see which end users of your integrations are driving question volume. ### 6. Source Distribution ![Source Distribution](https://mintcdn.com/gurubase/k7DfTtAb-NYJNG6I/images/guides/analytics/sources-dist.png?fit=max\&auto=format\&n=k7DfTtAb-NYJNG6I\&q=85\&s=f68b61d151a744c58ef0fe679b13defb) The source distribution section shows where questions are coming from. It displays two pie charts: * **Questions**: Distribution of all questions by source (Slack, Discord, GitHub, Widget, API, Gurubase UI, Zendesk, etc.) * **Unable to Answer**: Distribution of unanswered questions by source This helps you understand which channels are most popular and where users are experiencing issues. ### 7. Country Distribution ![Country Distribution](https://mintcdn.com/gurubase/5FHPDe8YHmgZaJEr/images/guides/analytics/country-dist.png?fit=max\&auto=format\&n=5FHPDe8YHmgZaJEr\&q=85\&s=5a28fafdbf583ed0022053c10fac3779) The country distribution section shows the geographic distribution of questions. It displays two horizontal bar charts: * **Questions**: Distribution of all questions by country * **Unable to Answer**: Distribution of unanswered questions by country This helps you understand your global user base and identify regional patterns. ### 8. Topic Distribution ![Topic Distribution](https://mintcdn.com/gurubase/k7DfTtAb-NYJNG6I/images/guides/analytics/topic-dist.png?fit=max\&auto=format\&n=k7DfTtAb-NYJNG6I\&q=85\&s=aa4bd82765f3ee5d6a3cf8b4e0ab9f1c) The topic distribution section shows the most common topics in questions. It displays two pie charts: * **Questions**: Distribution of all questions by topic * **Unable to Answer**: Distribution of unanswered questions by topic This helps you understand what users are most interested in and identify knowledge gaps in your data sources. ### 9. Vote Statistics ![Vote Statistics](https://mintcdn.com/gurubase/k7DfTtAb-NYJNG6I/images/guides/analytics/vote-stats.png?fit=max\&auto=format\&n=k7DfTtAb-NYJNG6I\&q=85\&s=c9e0fec6348a84b8092b02718c5f727c) The vote statistics section shows Guru-level satisfaction through voting data. It displays a pie chart showing: * **Upvotes**: Questions that received positive feedback * **Downvotes**: Questions that received negative feedback * **No Vote**: Questions without user feedback This provides insight into overall user satisfaction with your Guru's answers. ### 10. Average Trust Score Over Time ![Average Trust Score Over Time](https://mintcdn.com/gurubase/5FHPDe8YHmgZaJEr/images/guides/analytics/avg-trust-score-over-time.png?fit=max\&auto=format\&n=5FHPDe8YHmgZaJEr\&q=85\&s=db9f8542c85cd7c5e7f56536e6737e5b) The average trust score over time section shows a line graph tracking how closely the sources matched the questions, on average, over the selected time period. This helps you monitor the quality and reliability of your Guru's responses over time. ### 11. Binge Length Statistics ![Binge Length Statistics](https://mintcdn.com/gurubase/5FHPDe8YHmgZaJEr/images/guides/analytics/binge-len-stats.png?fit=max\&auto=format\&n=5FHPDe8YHmgZaJEr\&q=85\&s=6c2a909406cf7e82470cc68770e950b7) The binge length statistics section shows user engagement patterns. It displays: * **Guru-Level Average**: Overall average number of questions per session * **Per-User Averages**: Individual user statistics showing how many binge sessions each user had and their average questions per session This helps you understand how engaged users are and how many questions they typically ask in a single session. ### 12. User Intent Distribution ![User Intent Distribution](https://mintcdn.com/gurubase/k7DfTtAb-NYJNG6I/images/guides/analytics/intent-dist.png?fit=max\&auto=format\&n=k7DfTtAb-NYJNG6I\&q=85\&s=f24854e8c4059bbda4f8f1baf151751e) The user intent distribution section shows the types of questions users are asking. It displays two pie charts: * **Questions**: Distribution of all questions by intent * **Unable to Answer**: Distribution of unanswered questions by intent The intent types include: * **Short Answer**: User wants a brief, concise answer * **Explanation**: User wants detailed explanation of a concept * **How To**: User wants step-by-step instructions * **Why**: User wants to understand reasons or causes * **Comparison**: User wants to compare different options * **Clarification**: User needs clarification on something unclear * **Greeting**: User is greeting or starting conversation * **Thanks**: User is expressing gratitude * **Troubleshooting**: User is trying to solve a problem * **Information Request**: User wants specific information * **Other**: Any other intent not covered above This helps you understand what users are trying to accomplish and identify areas where your Guru might need improvement. ### 13. Sentiment Analysis ![Sentiment Analysis](https://mintcdn.com/gurubase/k7DfTtAb-NYJNG6I/images/guides/analytics/sentiment-dist.png?fit=max\&auto=format\&n=k7DfTtAb-NYJNG6I\&q=85\&s=009e62376f91df32097ea7722d5fbe48) The sentiment analysis section shows the emotional tone of user questions. It displays two pie charts: * **Questions**: Distribution of all questions by sentiment * **Unable to Answer**: Distribution of unanswered questions by sentiment The sentiment types include: * **Positive** * **Neutral** * **Negative** This helps you understand user satisfaction and identify potential issues that might affect user experience. > [card] [Add Widget to Your Site](/integrations/bots/website-widget) > > Learn how to embed your Guru on your website > [card] [Add GitHub Bot to Your Workspace](/integrations/bots/github) > > Learn how to add a GitHub bot to your repositories > [card] [Add Discord Bot to Your Server](/integrations/bots/discord) > > Learn how to add a Discord bot to your server > [card] [API Integration](/api-reference/introduction) > > Integrate Guru with your applications # Answer Modes: Chat & Agent Source: https://docs.gurubase.ai/guides/answer-modes Choose per question between a fast Chat answer and an autonomous, step-by-step Agent answer ## Introduction On a Guru that has agentic capability enabled, each question can be answered in one of two modes, chosen with the `Chat | Agent` switch above the question box: **Both modes can use your [Actions](/guides/actions) and [MCP tools](/guides/mcp-client): the difference is *how*.** * **Chat** (the default): a single grounded pass. Your Guru retrieves the relevant sources and, if a tool clearly matches the question, runs it once before answering. Fast, predictable, and inexpensive. * **Agent**: an autonomous multi-step loop. The model decides which tools to call, can chain several across rounds, and reasons between them before answering. More capable for multi-step tasks, but slower and more expensive. ## Chat vs Agent | | **Chat** (default) | **Agent** | | - | - | - | | How it answers | One grounded pass | Autonomous multi-step loop | | Tools | Runs a clearly-matching tool **once**, before answering | Model **picks and chains** tools across rounds, reasoning between them | | Speed | Fast | Slower (tools run before the first answer token) | | Cost | Low | Higher (each round re-sends the conversation and the tool schemas) | | Best for | Most questions | Multi-step tasks, live investigation, chaining several tools | ## When to use which * Reach for **Chat** for the large majority of questions: definitions, lookups, "what does the docs say about X", or a single action ("what's the current status of Y"). It is the fast, cheap default and it still uses a directly-relevant tool. * Switch to **Agent** when the question is really a small task: "find the failing simulation, pull its latest run, and summarize the top threats", or anything that needs the Guru to gather data across several tools and reason over the results. Agent mode is a per-question choice. Selecting it applies only to that question (and its follow-ups in the same chat); starting a new chat returns to Chat. ## Availability The `Chat | Agent` switch appears only when a Guru is **agent-capable**: multi-step answering is enabled for the Guru **and** it has at least one usable tool (an enabled Action or a connected MCP server that exposes tools). Gurus without tools, or with multi-step answering off, always answer in Chat and show no switch. Chat is always the default. Even on an agent-capable Guru, ordinary questions stay fast and cheap unless you explicitly pick Agent. ## Self-hosted: Agent Mode and Agentic Retrieval toggles On self-hosted, operators configure Agent Mode from the Guru settings page with two independent toggles: * **Agent Mode (Tools)**: lets the Guru call [Actions](/guides/actions) and [MCP tools](/guides/mcp-client) while answering. This is what the Chat/Agent switch above uses. * **Agentic Retrieval**: turns on a search loop where the Guru reformulates its own queries across several rounds and gathers evidence into one candidate pool. Everything found is reranked and passed through the normal context relevance and trust score path exactly once at the end, so answers stay grounded and still refuse below threshold. The loop is bounded by a round cap and a wall-clock budget, so a slow search degrades into a smaller pool rather than a failed answer. Each toggle is on or off and is captured in [Version History](/guides/create-guru). > [!NOTE] > > When both toggles are on, Agentic Retrieval takes precedence and Actions/MCP tools are not offered in that answer. Agentic Retrieval can use its own model, separate from and typically cheaper than the answer model, optionally routed through an external OpenAI-compatible provider. These knobs are only exposed on self-hosted. ## Using it from the API The `api/v1` answer endpoint accepts an optional `mode` field: * `"chat"` (default): single-pass answer. * `"agent"`: the autonomous multi-step loop. `agent` takes effect only on an agent-capable Guru (multi-step enabled + at least one tool); on any other Guru the request falls back to Chat. ```bash theme={null} curl -X POST https://api.gurubase.io/api/v1//answer/ \ -H "x-api-key: " \ -H "Content-Type: application/json" \ -d '{"question": "Find the failing simulation and summarize its latest run.", "mode": "agent"}' ``` Omit `mode` (or send `"chat"`) for a normal fast answer. > [!NOTE] > > Agent answers are slower and cost more than Chat answers, because the tool > loop runs before the first answer token and each round re-sends the > conversation plus the tool schemas. Use Agent when the task needs it; leave > ordinary questions in Chat. # Audit Logs Source: https://docs.gurubase.ai/guides/audit-logs Track and monitor all actions performed on Gurubase with detailed audit logging ## Overview Gurubase provides comprehensive audit logging to track all actions performed within the platform. This feature helps you monitor user activities, troubleshoot issues, and maintain security compliance by recording detailed information about every operation. ## What Audit Logs Store Audit logs capture user-attributable activity on the platform, including: * **User Actions**: All actions performed by users (identified by email) * **Timestamps**: Exact date and time of each action * **IP Addresses**: Source location of actions * **Action Types**: The specific operation performed * **Objects Affected**: What resources were modified * **Field Changes**: Before and after values for updates > [!NOTE] > > Only actions attributable to an authenticated user are logged. Background and system-initiated operations (scheduled syncs, automated reindexing, background state transitions) are excluded; they are tracked in the system's own job records. The only exceptions are authentication events that have no actor by definition: `LOGIN_FAILED` and `REGISTER`. ## Accessing Audit Logs Audit logs can be accessed in two ways: ### Per-Guru Audit Logs All maintainers can view audit logs for a specific guru: 1. Navigate to the **Audit Logs** section in the guru sidebar 2. View the activity log table scoped to that guru 3. Use filtering options to narrow down results 4. Click on "Details" for individual entries to view detailed information ![Audit Logs Interface](https://mintcdn.com/gurubase/PMnPe4PheUTq6epp/images/guides/audit-logs/audit-logs.png?fit=max\&auto=format\&n=PMnPe4PheUTq6epp\&q=85\&s=3adac4bcdf2c45a6b5e8ff0106345a03) ### Global Audit Logs (Self-hosted) Super admins in self-hosted deployments can access a global audit log view from the **Settings** page. This view shows logs across all gurus, including actions that are not tied to any specific guru (such as login events and user management). ## Filtering Options Filters are selected from dropdown menus and require clicking the **Apply** button to take effect. Use the **Reset** button to clear all active filters. ### Filter by Guru (Global View Only) * Filter logs by one or more specific gurus * Select **No guru** to see actions not associated with any guru (e.g., login events, user management) ### Filter by Model * Filter by the entity type that was affected (e.g., DataSource, APIKey, GuruType, Integration) * Useful for focusing on changes to a specific type of resource ### Filter by User * Filter logs by specific users using their email addresses * View actions performed by individual team members * Track user-specific activity patterns ### Filter by Action Type * Filter by the four main action types: * **Access** - Viewing or accessing resources * **Created** - Creating new resources * **Deleted** - Removing resources * **Updated** - Modifying existing resources ## Export Audit logs can be exported in three formats: **CSV**, **Excel (XLSX)**, and **JSON**. * The exported file includes all columns visible in the table plus the detailed changes data (the same information shown when clicking the "Details" eye icon) * The filename reflects the currently applied filters (e.g., `audit_logs_users-2_actions-1_1711792800.xlsx`) * Export is available in both the per-guru and global audit log views * Active filters are applied to the export, so only the filtered data is included ## Guru-Independent Actions (Self-hosted) Some actions are not tied to any specific guru. These are all self-hosted-only features and only appear in the **global audit log** on the Settings page, or when selecting the **No guru** option in the guru filter: * **LOGIN\_SUCCESS** - Successful user login * **LOGIN\_FAILED** - Failed login attempt (retained even without an actor, for brute-force detection) * **REGISTER** - New user registration (retained even without an actor, for account provisioning trails) * **PASSWORD\_CHANGED** - User password change * **USER\_CREATED** - New user account created by admin * **USER\_DELETED** - User account deleted by admin * **EXPORT\_AUDIT\_LOGS** - Audit log export from the global view (when no guru context) These actions will never appear in the per-guru audit log page since they have no guru association. ## Recorded Operation Types Gurubase tracks a comprehensive range of operations across the platform: ### Guru Management * **UPDATE\_GURU** - Modifications to Guru settings and configuration ### Analytics and Reporting * **EXPORT\_ANALYTICS** - Exporting analytics data and reports * **EXPORT\_AUDIT\_LOGS** - Exporting audit log data ### Data Source Operations * **ADD\_DATASOURCE** - Adding new data sources to Gurus * **DELETE\_DATASOURCE** - Removing data sources * **REINDEX\_DATASOURCE** - Reindexing existing data sources ### Integration Management * **CREATE\_INTEGRATION** - Setting up new platform integrations * **DELETE\_INTEGRATION** - Removing integrations * **EDIT\_INTEGRATION** - Modifying integration settings (channels, etc.) ### Backfill Job Operations * **CREATE\_BACKFILL\_JOB** - Creating automated data sync jobs * **DELETE\_BACKFILL\_JOB** - Removing backfill jobs * **UPDATE\_BACKFILL\_JOB** - Modifying backfill job settings (user-initiated only) * **REINDEX\_BACKFILL\_JOB** - Triggering backfill job reindexing (user-initiated only) > [!NOTE] > > Automatic backfill job state changes (status transitions during scheduled syncs) are not logged. Only user-initiated job operations appear in the audit log. ### Widget Management * **CREATE\_WIDGET\_ID** - Creating website widgets * **DELETE\_WIDGET\_ID** - Removing widgets ### Team Management * **ADD\_MAINTAINER** - Adding new maintainers to the account * **REMOVE\_MAINTAINER** - Removing maintainer access ### User Management (Self-hosted) * **USER\_CREATED** - Creating a new user account * **USER\_DELETED** - Deleting a user account * **ROLE\_ASSIGNED** / **ROLE\_REVOKED** - Assigning or revoking guru-level roles * **PASSWORD\_CHANGED** - Changing a user's password ### Authentication (Self-hosted) * **LOGIN\_SUCCESS** - Successful login * **LOGIN\_FAILED** - Failed login attempt * **REGISTER** - New user registration ### Secret Management * **SECRET\_READ** - Reading a secret value * **SECRET\_WRITE** - Creating or updating a secret * **SECRET\_DELETE** - Deleting a secret ### Excel Jobs * **DOWNLOAD\_EXCEL\_OUTPUT** - Downloading an Excel job output file ## Action Types All operations are categorized into four main action types, each with distinct visual indicators: ### Access (Grey Badge) * Viewing resources or data * Exporting analytics or audit logs * Login and authentication events * Reindexing data sources * Reading secrets * Downloading Excel outputs ### Created (Green Badge) * Creating new resources (data sources, integrations, widgets) * User registration * Admin creating new user accounts ### Updated (Blue Badge) * Modifying existing settings and configurations * Assigning or revoking roles * Changing passwords * Updating secrets ### Deleted (Red Badge) * Removing resources (data sources, integrations, widgets) * Deleting user accounts * Deleting secrets ## Detailed Log Information ### Basic Information Each audit log entry includes: * **Timestamp**: Exact date and time of the action * **User**: Email address of the user who performed the action * **IP Address**: Source IP address for the operation * **Action**: The type of operation performed * **Object**: The specific resource that was affected ### Field Change Tracking For update operations, audit logs show detailed before/after comparisons: ![Before/After Field Comparison](https://mintcdn.com/gurubase/PMnPe4PheUTq6epp/images/guides/audit-logs/before-after.png?fit=max\&auto=format\&n=PMnPe4PheUTq6epp\&q=85\&s=a916bf5b1603dbc23168c4fc490e3c13) This includes: * **Previous Value**: The state before the change * **New Value**: The state after the change * **Field Names**: Specific fields that were modified ### Operation Details Additional context is provided for complex operations: ![Operation Details](https://mintcdn.com/gurubase/PMnPe4PheUTq6epp/images/guides/audit-logs/info.png?fit=max\&auto=format\&n=PMnPe4PheUTq6epp\&q=85\&s=e503244c79866faf7f8edbe6fbc4de5a) This includes: * **Filters Applied**: Parameters used in operations * **Success Status**: Whether the operation completed successfully * **Additional Context**: Extra information relevant to the operation ## User-Attributable Logging Audit logs only record actions that can be tied to an authenticated user. Each entry includes the user's email and source IP address. Background and system-initiated operations (scheduled syncs, automated reindexing, background backfill jobs) are **not** logged. These operations are tracked in the system's own job records rather than the audit log, which keeps the log focused on activity an operator or auditor can meaningfully review. The only entries retained without an actor are `LOGIN_FAILED` and `REGISTER`, which by definition have no authenticated user but are critical for security review (brute-force detection and account provisioning trails respectively). ## Retention and Auto-Cleanup A daily cleanup job removes audit log entries once they pass their retention period. The period is configurable, with a platform default of **90 days**. ### How the period is chosen * **Per guru override**: A guru can set its own retention period. Entries attributed to that guru follow this period, so a customer with a longer obligation keeps their trail even when the default is shorter. * **Platform default (90 days)**: Applied to every guru that has not set an override, and to entries with no guru attribution (login events, user management, and other guru-independent actions). * **Keep forever**: Leaving the platform default empty keeps every entry that inherits it indefinitely. Leaving a guru's override empty does not keep its entries forever; it falls back to the platform default. The minimum accepted value is 1 day. On self-hosted deployments both values are set in Django admin (the Settings record, and the guru's own record). On Gurubase Cloud, contact support to set a per-guru period. ## Best Practices ### Regular Monitoring * Review audit logs regularly to identify patterns * Monitor for unusual activity or unauthorized access * Track integration health and sync status ### Filtering and Search * Use the guru filter (global view) to focus on a specific guru or guru-independent actions * Use model and action type filters to narrow down results * Use user filters to focus on specific team members * Remember to click **Apply** after selecting filters ### Exporting for Compliance * Export audit logs regularly for compliance records * Use filters before exporting to get targeted reports * JSON format preserves the full structure of change details ### Security Compliance * Audit logs help meet compliance requirements * Track data access and modifications * Monitor maintainer access changes ## Next Steps > [card] [Analytics Guide](/guides/analytics) > > Learn how to analyze your Guru's usage patterns > [card] [Create Your First Guru](/guides/create-guru) > > Understand how to manage maintainers and permissions # Create Your First Guru Source: https://docs.gurubase.ai/guides/create-guru Step-by-step guide to creating and configuring your AI agent. A Guru is a hallucination-resistant AI agent that grounds every answer in the knowledge sources you provide, cites those sources, scores its own confidence, and refuses when context is too weak. With [Actions](/guides/actions) and [MCP](/guides/mcp-client) wired up, your Guru can also pull live data and take real action across your tools, not just answer questions. ## Quick Start **1. Sign Up** Go to [app.gurubase.io](https://app.gurubase.io) and create an account with Google or GitHub. **2. Create a Guru** Click **Create Guru** and configure: - **Name**: A descriptive name for your AI agent - **Logo**: Upload an image (PNG/JPEG, max 1MB) - **Topics**: Keywords that define your Guru's expertise (e.g., "kubernetes, devops, cloud") **3. Add Data Sources** Build your knowledge base by adding content. See [Supported Data Sources](#supported-data-sources) below. **4. Publish** Click **Publish Guru** to start indexing. Once complete, your Guru is ready to answer questions. ## Supported Data Sources > [card] [Website](/guides/data-sources#website-indexing) > > Crawl sites or import via sitemap > [card] [PDF / Docx / Excel](/guides/data-sources#pdf-documents) > > Upload documents and spreadsheets > [card] [GitHub](/guides/data-sources#github) > > Index repositories and code > [card] [Zendesk](/integrations/ingestion/zendesk) > > Import tickets and KB articles > [card] [Confluence](/integrations/ingestion/confluence) > > Sync spaces and pages > [card] [Jira](/integrations/ingestion/jira) > > Index issues and projects > [card] [Salesforce](/integrations/ingestion/salesforce) > > Sync knowledge articles and CRM content > [card] [Google Drive](/integrations/ingestion/google_drive) > > Connect docs and files > [card] [Slack](/integrations/ingestion/slack) > > Import conversations > [card] [YouTube](/guides/data-sources#youtube-videos) > > Transcribe video content You can also add **custom text snippets** directly for FAQs, playbooks, or any custom content. ## Deploy Your Guru Once created, deploy your Guru across multiple channels: > [card] [Website Widget](/integrations/bots/website-widget) > > Embed on your website > [card] [Zendesk](/integrations/bots/zendesk) > > AI copilot for support > [card] [Slack](/integrations/bots/slack) > > Answer in Slack channels > [card] [Discord](/integrations/bots/discord) > > Community support bot > [card] [GitHub](/integrations/bots/github) > > AI on GitHub issues > [card] [Jira](/integrations/bots/jira) > > AI on Jira issues > [card] [MCP](/guides/mcp-server) > > Expose your Guru to Claude Desktop, Cursor, and MCP clients > [card] [API](/api-reference/introduction) > > Build custom integrations ## Self-Hosted (Enterprise) > [!NOTE] > > Self-hosted deployments are available under the Enterprise plan. [Contact > us](https://gurubase.io/contact/) to get started. For self-hosted deployments, access your dashboard at your deployment's URL and follow the same creation steps. All features work identically to the cloud version. ## Managing Your Guru Once deployed, use these tools to maintain and optimize your Guru. ### Source Management Click the menu icon (⋮) next to any source to access management options: | Action | Description | | - | - | | **Edit** | Search, add, or remove specific URLs from website sources | | **Reindex** | Fetch the latest content and refresh your knowledge base | | **Delete** | Remove sources that are no longer needed | | **Privacy** | Toggle documents (PDF, Docx, Excel) between Public (visible in citations) and Private | ![Edit Website Links Interface](https://mintcdn.com/gurubase/1KgbSST6n33uTAt6/images/gurubase-edit-website-links.jpg?fit=max\&auto=format\&n=1KgbSST6n33uTAt6\&q=85\&s=22ace705880948b098dbf9d9820daa25) ### Keeping Content Fresh > [!NOTE] > > **Best Practice**: Reindex sources regularly, especially for frequently > updated websites and documentation. This ensures your Guru provides current, > accurate information. For automated syncing, set up **backfill jobs** on integrations like [Zendesk](/integrations/ingestion/zendesk), [Confluence](/integrations/ingestion/confluence), and [Jira](/integrations/ingestion/jira) to periodically sync new content. For websites, use **[Sitemap Sync Jobs](/guides/data-sources#sitemap-sync-job)** to automatically keep your knowledge base in sync with your sitemap. ### Work in Progress Turn on **Work in Progress** while you are still adding sources, so nobody gets a half-ready answer and decides the Guru does not work. It is the first item under **Settings → Advanced Settings**. While it is on: * The web widget still opens, but its question box is locked and it shows a short message instead of the welcome text. On SharePoint this view needs package 1.7.1 or later; older packages show the message as an error line. * Slack, Discord, Microsoft Teams and the other bots, the API and MCP reply with the same message. The API answers `400` with `"code": "questions_closed"`. * The Guru's admins can still ask, from Gurubase and from the widget preview in **Integrations → Web Widget**, to test it before opening it to everyone. Leave the message blank to use the default (*" is being prepared. I will be able to answer your questions very soon."*, in the Guru's language), or write your own, for example with an opening date. Turn the switch off when the Guru is ready. ### Additional Settings * **Profile Updates** - Modify name, logo, and topics * **Advanced Settings** - Configure Work in Progress, example questions, KB editor presets, and more * **Team Management** - Add team members and manage access * **Trust Score Threshold** - Adjust how closely sources must match before the Guru answers ([contact us](https://gurubase.io/contact/) to configure) ## Next Steps > [card] [Analytics](/guides/analytics) > > Monitor how users interact with your Guru > [card] [Data Sources](/guides/data-sources) > > Learn about all supported data sources > [card] [Example Questions](/guides/example-questions) > > Configure suggested questions for your widget > [card] [API Reference](/api-reference/introduction) > > Build custom integrations # Data Sources Source: https://docs.gurubase.ai/guides/data-sources Learn about all the different types of data sources you can use with Gurubase Build comprehensive knowledge bases by combining content from websites, documents, code repositories, and enterprise platforms. Gurubase indexes your content to create AI assistants that understand your specific domain. ## At a Glance > [card] [Website](#website-indexing) > > Crawl, sitemap import, or sync job > [card] [PDF](#pdf-documents) > > Documents & manuals > [card] [Word](#word-documents) > > Policies & reports > [card] [UDF](#udf-documents) > > UYAP legal documents > [card] [Excel](#excel-files) > > Spreadsheets & data > [card] [GitHub](#github) > > Repositories & code > [card] [YouTube](#youtube-videos) > > Video transcripts > [card] [Text](#custom-text) > > Custom snippets > [card] [Zendesk](#zendesk) > > Tickets & articles > [card] [Confluence](#confluence) > > Wiki & docs > [card] [Jira](#jira) > > Issues & projects > [card] [Slack](#slack) > > Conversations > [card] [Google Drive](#google-drive) > > Docs & files > [card] [Salesforce](#salesforce) > > Knowledge base *** ## Reserved Labels Some labels have special behavior in Gurubase. **Manual** labels can be added by you to any applicable data source. **Auto** labels are assigned automatically by the platform and cannot be set manually. | Label | Assignment | Applies To | Behavior | | - | - | - | - | | `mandatory` | Manual | Any data source | The source is **always included** in every answer's context, regardless of search relevance. Mandatory sources get independent retrieval and reranking, and bypass trust score filtering entirely. They also don't affect the [trust score](/guides/preventing-hallucinations#layer-3-trust-score---overall-answer-quality) calculation. Use this for compliance documents, core policies, or critical FAQs that must always be referenced in answers. A mandatory source restricted to [groups](/guides/groups) reaches only the members of those groups. | | `playbooks` | Manual | Mermaid-type text sources | Makes the source appear in the **Playbooks tab** of the [Zendesk app](/integrations/bots/zendesk) with interactive flowcharts. Select "Mermaid" as the subtype when creating the text source. | | `google_drive` | Auto | Google Drive sources | Automatically applied to all data sources imported via the [Google Drive integration](/integrations/ingestion/google_drive). Used internally to track and sync Google Drive content. | > [!NOTE] > > Custom labels (e.g., `faq`, `onboarding`) can be added freely alongside reserved labels for your own organization and filtering needs. ## Access Control Every data source has a **Visible to** field that controls which users can see its content when they ask a question. When Visible to is empty, the source is marked **Everyone** and every authenticated user of the guru can retrieve context from it. When Visible to lists one or more groups, only users with membership in at least one of those groups can see the source. Everyone and specific groups are mutually exclusive. Selecting any group automatically clears Everyone, and selecting Everyone clears any previously selected groups. This prevents accidental exposure when switching between the two modes. > [!WARNING] > > The **Visible to** field appears in the source edit dialog, and in the **Add Text Source**, > **Add Edited Answer** and **Add GitHub Repository** dialogs, only after you have > created at least one content group for the guru and are signed in as a guru > maintainer. If you do not see the field, open **Team → Groups** and create a > group first, then reload the sources page. See > [Groups & Content Access Control](/guides/groups#setup) for the full setup walkthrough. > [!NOTE] > > Access control applies only to authenticated users on the Gurubase Next.js UI. The > widget embed, public `/api/v1/answer/` endpoint, Slack, Discord, GitHub, Jira, > Zendesk, MCP server, and chat-completions endpoints currently return Everyone-only > results. Group-based access control for these surfaces is scheduled for v5.1+. ## For setup instructions and a worked example, see [Groups & Content Access Control](/guides/groups). ## File-Based Sources ### PDF Documents Upload PDF files to index text and images. Perfect for documentation, research papers, and manuals. | Feature | Description | | - | - | | Text extraction | Full text content from all pages | | Image indexing | Images within PDFs are described and stored, and are shown inline in answers when the question is about that image (diagram, screenshot, chart, etc.) | | Batch upload | Upload multiple PDFs at once | ### Word Documents Upload Word documents (.docx) to index text and image content. Ideal for policies, reports, and formatted documents. | Feature | Description | | - | - | | Text extraction | Full text content from all pages | | Image indexing | Images within docs are described and stored, and are shown inline in answers when the user asks about them | | Batch upload | Upload multiple files at once | ### UDF Documents Upload UYAP documents (`.udf`), the official document format of the Turkish judiciary (Ulusal Yargı Ağı Projesi). Ideal for petitions, court decisions, expert reports, and other legal filings produced by UYAP Doküman Editörü. | Feature | Description | | - | - | | Text extraction | Full text including template field values; tables (case number, parties) are reconstructed row by row | | Image indexing | Inline images are described and stored, and are shown inline in answers when the user asks about them | | E-signature info | When the file carries a `sign.sgn` e-signature, the signer's name and signing date are indexed (informational only; no validity claim is made) | | Format tolerance | Both format 1.7 and 1.8, `.usf` templates, and bare `content.xml` files are accepted | | Batch upload | Upload multiple files at once | ### Excel Files Upload spreadsheets (.xls, .xlsx) to index tabular data with header relationships. | Feature | Description | | - | - | | Cell extraction | Text content from all cells | | Structure preservation | Maintains table relationships | | Batch upload | Upload multiple files at once | > [card] [Excel Extraction Best Practices](/guides/excel-extraction) > > Learn how to prepare Excel files for optimal extraction ### Custom Text Add custom text directly for FAQs, instructions, or any content that doesn't fit other categories. | Option | Description | | - | - | | **Subtype** | Choose "Text" for plain content or "Mermaid" for flowcharts/diagrams | | **Labels** | Add labels to organize and filter text sources (see [Reserved Labels](#reserved-labels) for special labels) | *** ## Web Sources ### Website Indexing Index entire websites or specific pages. Gurubase extracts text, headings, and structured content. | Method | Description | | - | - | | **Sitemap Import** | Import all URLs from a sitemap (one-time) | | **Sitemap Sync Job** | Scheduled job that periodically syncs content from a sitemap | | **Crawl Website** | Automatically discover and crawl all internal pages | | **Manual URLs** | Add specific page URLs | Images from websites are also indexed (plan feature). #### Sitemap Sync Job A Sitemap Sync Job automatically keeps your knowledge base in sync with your website. On each run it: * **Adds** new URLs found in the sitemap * **Updates** pages whose content has changed (by comparing fresh content against stored content) * **Removes** pages that are no longer in the sitemap * **Retries** URLs that failed on the previous run To create a sync job: 1. Navigate to your Guru's settings page 2. Click **Add Websites** and select **Create Sitemap Job** 3. Provide a **sitemap URL** (e.g., `https://example.com/sitemap.xml`) 4. Set a **sync interval** between 6 hours and 1 week (6 to 168 hours, default: 12 hours) 5. Optionally configure URL filtering with include/exclude patterns > [!NOTE] > > The sitemap is the **source of truth**. URLs not present in the sitemap will be removed from your knowledge base. If the sitemap is unreachable, no changes are made and all existing data is preserved. #### URL Filtering (fnmatch Patterns) Sitemap Sync Jobs support **include** and **exclude** pattern lists to control which URLs are indexed. Patterns use Python's `fnmatch` syntax where `*` matches everything (including `/`), `?` matches a single character, and `[seq]` matches any character in the sequence. * **Include patterns**: Only URLs matching at least one pattern are indexed. Leave empty to include all URLs. * **Exclude patterns**: URLs matching any pattern are skipped, regardless of include patterns. Excludes are evaluated first. | Pattern | Type | Effect | | - | - | - | | `*/docs/*` | Include | Only index pages under `/docs/` | | `*/blog/*` | Exclude | Skip all blog pages | | `*?utm_*` | Exclude | Skip URLs with UTM tracking parameters | | `https://example.com/api/*` | Exclude | Skip the API reference section | | `*.html` | Include | Only index `.html` pages | | `*/v2/*` | Include | Only index v2 documentation | You can combine multiple include and exclude patterns for precise control. #### Crawl Options | Option | Description | | - | - | | **URL Scope** | The crawler only discovers URLs that start with the provided path. Use `https://example.com/` for the entire site, or `https://example.com/docs/` to crawl only the `/docs/` section. | | **Skip Query Params** | Enabled by default. Strips query parameters from URLs (e.g., `?utm_source=...`). Disable for paginated content like `?page=1`, `?page=2`. | | **Sort URLs** | Click the sort button (A-Z icon) to alphabetically sort discovered URLs. | > [!NOTE] > > **Skipped Paths**: The crawler automatically skips non-content paths like `/feed/`, `/rss/`, `/static/`, `/assets/`, `/media/`, `/wp-admin/`, `/wp-json/`, `/_static/`, `/_sources/`, and common file extensions (images, PDFs, CSS, JS, etc.). ### YouTube Videos Import video transcripts and metadata from YouTube channels, playlists, or individual videos. | Method | Description | | - | - | | **Channel Import** | All videos from a YouTube channel | | **Playlist Import** | All videos from a specific playlist | | **Manual URLs** | Specific video URLs | *** ## Code Repositories ### GitHub Index repositories to make code, documentation, and README files searchable. Supports public and private repositories. | Feature | Description | | - | - | | Glob patterns | Control which files are indexed | | Private repos | Use GitHub tokens for access | | Code + docs | Index code files and documentation | **Token Requirements:** | Token Type | Permissions Required | | - | - | | Classic | `repo` scope | | Fine-grained | "Contents" (read) + "Metadata" (read) | | Public repos | No token needed | > [accordion] Classic Token Setup > > 1. Go to [GitHub Tokens (classic)](https://github.com/settings/tokens) (GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)) > 2. Click **Generate new token (classic)** > 3. Under **Select scopes**, check the **repo** checkbox (this grants full control of private repositories) > > ![GitHub classic token scopes configuration](https://mintcdn.com/gurubase/2D9PXu9jAzuIb0tN/images/guides/data-sources/classic.png?fit=max\&auto=format\&n=2D9PXu9jAzuIb0tN\&q=85\&s=2d906a729b05f5c27427213acddb0a10) > [accordion] Fine-grained Token Setup > > 1. Go to [GitHub Fine-grained tokens](https://github.com/settings/personal-access-tokens) (GitHub Settings → Developer settings → Personal access tokens → Fine-grained tokens) > 2. Click **Generate new token** > 3. Enter a **Token name** (e.g., "Gurubase Token") > 4. Set **Expiration** as needed > 5. Under **Repository access**, select one of: > * **All repositories** - Access all current and future repositories > * **Only select repositories** - Choose specific repositories (max 50) > 6. Under **Permissions** → **Repository permissions**, add: > * **Contents**: Read-only > * **Metadata**: Read-only (required) > > ![GitHub fine-grained token permissions configuration](https://mintcdn.com/gurubase/2D9PXu9jAzuIb0tN/images/guides/data-sources/fine-grained.png?fit=max\&auto=format\&n=2D9PXu9jAzuIb0tN\&q=85\&s=ef18026a41c78c9d19befe3bc8294c9d) **Glob Patterns:** The Glob Pattern field is a multi-line input. **Each line is one pattern.** Lines starting with `!` exclude. Blank lines and lines starting with `#` are ignored. | Pattern | Matches | | - | - | | `**/*.py` | All Python files (recursive) | | `**/*.{js,ts}` | All JavaScript and TypeScript files (brace expansion) | | `packages/**` | Everything inside packages folder | | `!**/test_*.py` | Exclude Python test files | | `!(CHANGELOG_LEGACY).md` | Exclude `CHANGELOG_LEGACY.md` (extglob) | **Mixing includes and excludes** — combine them by writing one per line: ``` docs/**/*.md !docs/CHANGELOG_LEGACY.md ``` This indexes every Markdown file under `docs/` except `CHANGELOG_LEGACY.md`. Patterns support recursive globstar (`**`), brace expansion (`{a,b}`), extglob (`!(...)`, `@(...)`, `+(...)`, `*(...)`, `?(...)`), and gitignore-style negation via leading `!` on its own line. > [!NOTE] > > Test your patterns with [globster.xyz](https://globster.xyz/) before adding. *** ## Platform Integrations Platform integrations provide automated syncing and deeper integration with enterprise tools. ### Zendesk Index support tickets and help center articles. Set up backfill jobs for automated syncing. > [card] [Zendesk Integration](/integrations/ingestion/zendesk) > > Import tickets, articles, comments, and attachments ### Confluence Index Atlassian Confluence spaces and pages. Supports CQL queries for advanced filtering. > [card] [Confluence Integration](/integrations/ingestion/confluence) > > Sync team documentation and wiki pages ### Jira Index project issues, tickets, and related documentation. > [card] [Jira Integration](/integrations/ingestion/jira) > > Import issues and project data ### Slack Index Slack conversations and threads. Configure trusted users for targeted content. > [card] [Slack Integration](/integrations/ingestion/slack) > > Capture team knowledge from conversations ### Google Drive Connect Google Drive to index documents, spreadsheets, and files. > [card] [Google Drive Integration](/integrations/ingestion/google_drive) > > Sync Google Docs, Sheets, and files ### Salesforce Index Salesforce Knowledge Base articles. Supports SOQL queries for filtering. > [card] [Salesforce Integration](/integrations/ingestion/salesforce) > > Import knowledge base articles *** ## Sources Table The Sources table is server-paginated so it stays fast on gurus with thousands of sources. ### Pagination, Search, and Filters * **Server-side pagination** with a page picker. Only one page is loaded at a time. * **Search** across the whole set from the top of the table; press Enter to run. * **Source type filter** to narrow the list to a single ingestion type. * **Filter by visibility** (All / Everyone / a specific content group) filters on the backend across the whole paginated and grouped set, not just the rows currently on screen, so the results and counts are correct on every page. * A **Columns** menu, shown when the guru indexes metadata fields, lets you add those fields as extra columns. * The active page, search, type filter, visibility filter, and chosen columns are kept in the URL, so a refresh or shared link restores the same view. ### Domain Grouping Sources that live under the same domain (Website, YouTube, Jira, Zendesk, Confluence, Salesforce) fold into one row per domain, counted as a single row, so a domain with thousands of URLs no longer floods the page. * Each domain row shows **success**, **pending** and **failed** count badges (a badge is hidden when its count is 0). Clicking a status badge opens the side panel already filtered to that status. * Clicking the domain row opens a **side panel** with its own pagination, search, and Success / Pending / Failed status tabs. The panel keeps the full per-URL feature set: bulk select, label assign, delete, and visibility edits. * A domain row shows the union of all labels across that domain's sources. * Newly added URLs fold into their domain row with an in-progress badge showing how many are new; clicking that badge opens the side panel in a local view listing the still-unsaved URLs. ### Managing Sources in Bulk The Sources table supports multi-select checkboxes so you can act on many sources at once instead of row by row. Tick the sources you want, then use the bulk action bar to: * **Reindex** every selected source in one step. * **Delete** every selected source. * **Assign labels** to the selection. The entered labels replace each source's current labels; protected labels such as `google_drive` are preserved automatically. Bulk actions are queued alongside your other pending edits and applied together when you click **Update Guru**. Rows that are currently processing or being deleted are excluded from selection. ### Domain-Level Actions Delete or reindex a whole domain in one step from the domain row. Domain-level delete and reindex are **staged**: the change is queued and applied on **Update Guru**, resolved on the backend so the browser never handles thousands of ids. Staged domain actions and sync-job changes appear in their own sections of the pending-changes panel. ## Reindexing Sources Reindexing refreshes what your Guru has stored for a source. Behavior depends on the source type: | Source type | What reindex does | | - | - | | **Website, Sitemap Job** | Re-fetches the URL and re-embeds the fresh content. | | **YouTube** | Re-fetches the transcript and re-embeds it. | | **GitHub** | Re-clones the repo and re-embeds the matching files. | | **PDF, Word, Excel, Text** | Re-embeds the content Gurubase already extracted. The file is **not** re-fetched, so uploaded documents and Google Drive-synced documents behave the same way and no live source connection is required. To ingest a newer version of an uploaded file, upload the new version instead. For a Google Drive-synced file, pick up the latest version from Drive using **Sync Now** on the [Google Drive integration](/integrations/ingestion/google_drive) rather than per-file reindex. | | **Zendesk, Confluence, Jira, Slack, Salesforce** | Handled by their backfill jobs. Use the integration's sync controls rather than per-source reindex. | | **Google Drive** | Per-file reindex re-embeds the already-extracted content (same as the file row above). To pull the latest version of files from Drive, use **Sync Now** on the [Google Drive integration](/integrations/ingestion/google_drive); the two actions are not interchangeable. | Reindex is available from each row's action menu and from the bulk action bar. ## Best Practices > [accordion] Content Organization > > * **Mix source types** - Combine documents, websites, and integrations for comprehensive coverage > * **Use labels** - Organize text sources with labels (e.g., `playbooks`, `faq`) > * **Platform integrations** - Use for content that changes frequently > [accordion] Data Quality > > * **Review indexed content** - Check what's actually indexed in your Guru's sources > * **Use filtering** - Glob patterns for GitHub, CQL for Confluence, SOQL for Salesforce > * **Test your Guru** - Ask sample questions to verify content quality > [accordion] Keeping Content Fresh > > * **Backfill jobs** - Set up automated syncing for Zendesk, Confluence, Jira, Slack > * **Sitemap Sync Jobs** - Automatically keep website content in sync with your sitemap > * **Reindex regularly** - Reindex file, text, website, YouTube, and GitHub sources from the Sources table; use bulk selection to reindex many at once > * **Monitor status** - Check integration status in your Guru's settings *** ## Next Steps > [card] [Create Your First Guru](/guides/create-guru) > > Step-by-step guide to building your AI assistant > [card] [Deploy a Widget](/integrations/bots/website-widget) > > Embed your Guru on your website # Edit Answer Source: https://docs.gurubase.ai/guides/edit-answer Learn how to manually edit and improve AI-generated answers for higher accuracy. The Edit Answer feature allows you to manually correct and improve AI-generated answers. Edited answers are stored as a special data source type and are given the highest priority when generating responses, ensuring that future questions receive accurate, human-verified answers. ## Why Edit Answers? While Gurubase's seven layers of hallucination protection significantly reduce errors, there are situations where manual intervention provides the best results: * **Correcting nuanced errors**: AI may miss domain-specific subtleties * **Adding recent updates**: Policy changes or new information not yet in documentation * **Clarifying edge cases**: Exceptions or special circumstances that need explicit handling * **Improving answer quality**: Making responses clearer, more complete, or better formatted > [!NOTE] > > Edited answers have the **highest priority** when generating responses. The AI > treats edited answers as the authoritative source, and any conflicting > information from other sources is deprioritized. ## How It Works ### 1. Access the Edit Answer Feature Navigate to your Guru's **Analytics** tab and locate the question you want to edit in the Questions section. Click the **Edit Answer** button (pencil icon) in the Edit Answer column. If an edited answer already exists for that question, the button will display a checkmark icon instead. ### 2. Review and Edit The Edit Answer modal displays a split-panel view: * **Left Panel**: The original AI-generated answer (read-only) with a copy button for reference * **Right Panel**: A text area where you can write or modify the edited answer If an edited answer already exists, the right panel will show: * The current edited content * Who created or last updated it * When it was created or last updated ### 3. Save Your Changes Click **Save** to store your edited answer. The system will: 1. Create a new data source from your edited content 2. Link it to the original question 3. Make it available for answering similar future questions 4. Record who made the edit and when > [!NOTE] > > The Save button is disabled if the content is empty or unchanged from the > existing edited answer. ### 4. Delete an Edited Answer If you need to remove an edited answer and revert to AI-generated responses: 1. Open the Edit Answer modal for the question 2. Click the **Delete** button 3. Confirm the deletion in the dialog The original question will now receive AI-generated answers without the edited override. ## Impact on Future Answers Once you save an edited answer, it immediately affects how your Guru responds to similar questions: ### How Priority Works When your Guru generates an answer, it considers information from multiple sources. Edited answers always take precedence: | Priority | Source Type | Description | | - | - | - | | 1 (Highest) | Edited Answers | Your manually corrected content | | 2 | Other Sources | Documentation, PDFs, websites, etc. | Gurubase automatically: * Treats edited answers as the authoritative source * Deprioritizes any conflicting information from other sources * References up to 5 relevant edited answers per question (configurable per Guru) ### Example Scenario ``` Original Question: "What's the prior authorization process for MRI scans?" Original AI Answer: "MRI scans require prior authorization submitted 5 business days in advance..." Your Edited Answer: "MRI scans require prior authorization submitted 5 business days in advance. Exception: Emergency MRI scans can be authorized retroactively within 72 hours by calling the urgent care line." Future Similar Questions: - "Do I need prior auth for emergency MRI?" - "How do I get retroactive authorization for imaging?" - "What's the exception process for urgent MRI?" All will reference your edited answer as the primary source. ``` ## Filtering by Edited Answers You can filter the Questions section to find questions with or without edited answers. Use the **Edit Answer** filter with these options: * **Has Edited Answer**: Show only questions with manual edits * **Has No Edited Answer**: Show only questions without manual edits This helps you: * Review all your edited content in one place * Find questions that might benefit from manual editing * Track your editing progress over time ## Plan Limits The Edit Answer feature has different limits based on your subscription plan: | Plan | Feature Status | Limit | | - | - | - | | Essential | Disabled | 0 | | Growth | Enabled | 5 | | Self-hosted | Enabled | Unlimited | > [!WARNING] > > When you reach your plan's edit limit, attempting to create new edited answers > will prompt you to upgrade your plan. ## Best Practices ### When to Edit > [accordion] Correct factual errors > > If the AI provided incorrect information that could mislead users, edit the > answer with the accurate facts. > [accordion] Add missing exceptions > > When there are edge cases or exceptions not captured in your documentation, > add them to the edited answer. > [accordion] Include recent updates > > For policy changes or new information that hasn't been indexed yet, use edited > answers as a quick solution. > [accordion] Improve clarity > > If the AI's answer is technically correct but confusing, rewrite it for > better clarity. ### When NOT to Edit > [accordion] Temporary fixes > > If the underlying documentation needs updating, update the source > documentation instead of relying on edited answers. > [accordion] Highly variable answers > > For questions where answers change frequently or depend on many variables, > improve your data sources instead. > [accordion] General formatting preferences > > Use the [Custom Prompt](/guides/prompting-your-guru) feature to adjust > overall answer formatting rather than editing individual answers. ### Quality Guidelines 1. **Be comprehensive**: Include all relevant information in the edited answer 2. **Stay accurate**: Double-check facts before saving 3. **Keep it current**: Review and update edited answers when policies change 4. **Use clear language**: Write in the same tone as your Guru's other responses 5. **Document changes**: Use the audit trail to track who edited what and when ## Viewing Edited Answers in Data Sources Edited answers appear as a special type in your Data Sources list: * Type: Edited Answer * Source: Linked to the original question * Can be managed like other data sources * Included in source distribution analytics ## Integration with Hallucination Prevention The Edit Answer feature is **Layer 6: Manual Override** in Gurubase's [seven layers of hallucination protection](/guides/preventing-hallucinations#layer-6-manual-override---human-expertise-wins). When generating answers, the AI follows these rules for edited content: * Edited answers are treated as the definitive source of truth * Contradicting information from other sources is ignored * The AI will cite the edited answer as its primary source * Other sources can supplement but never override edited content This ensures that your manual corrections are always respected and accurately reflected in future responses. > [card] [Analytics Dashboard](/guides/analytics) > > Track questions and manage edited answers > [card] [Preventing Hallucinations](/guides/preventing-hallucinations) > > Learn about all seven layers of protection > [card] [Prompting Your Guru](/guides/prompting-your-guru) > > Customize how your Guru responds > [card] [Data Sources](/guides/data-sources) > > Manage your Guru's knowledge base # Email Reports Source: https://docs.gurubase.ai/guides/email-reports Schedule weekly and monthly analytics emails to your team. Email Reports send each Guru's analytics digest straight to your team's inbox, so maintainers stay in the loop without opening the dashboard. > [!NOTE] > > Email Reports are available on **Gurubase Cloud**. Self-hosted deployments do not expose this page. ## What You Get | Cadence | Sent | Covers | | - | - | - | | **Weekly** | Every Monday | The previous Monday to Sunday | | **Monthly** | The 1st of each month | The previous calendar month | Each digest reuses the figures shown on the [Analytics](/guides/analytics) dashboard: * Headline counts for total questions, out-of-context questions, referenced sources, average response time, answer ratio, and binge length. * Period-over-period changes against the prior week or month. * Top distributions for sources, topics, sentiment, vote outcomes, and intent. * The monthly digest adds language, country, and trust-score breakdowns. ## Accessing Email Reports Open your Guru and click **Email Reports** in the left sidebar. The page shows two cards, one per cadence, each with its enable toggle and the list of recipients. ## Enabling a Report Flip the switch in the top-right of the **Weekly email reports** or **Monthly email reports** card to enable or disable that cadence. Changes save immediately. When a cadence is on, the digest is sent automatically on its schedule. When it is off, no digest is generated. ## Recipients Each card lists every recipient for that cadence: * **Maintainers** are automatically included. The Owner and any Members of the Guru appear here with a badge. * **Extra recipients** are addresses you add manually for that cadence. They do not need a Gurubase account. ### Add an Extra Recipient Type an email address into the **Add recipient** field at the bottom of a card and click **Add recipient**. The address must be a valid email format. Adding a recipient to **Weekly** does not subscribe them to **Monthly**; manage each cadence independently. ### Remove an Extra Recipient Click the trash icon next to an extra recipient to remove them from that cadence. Maintainers cannot be removed from this page; manage them from the [Team](/guides/team) page. ## Managing Subscriptions Every recipient has a **Subscribed / Unsubscribed** switch. Unsubscribing pauses the digest for that address while keeping them in the recipient list. * A maintainer can always toggle their own subscription. * Owners can toggle subscriptions for anyone on the list. * Extra recipients can manage their own subscription either from this page (if they are signed in) or from the one-click unsubscribe link in any digest they receive. ## One-Click Unsubscribe Every analytics email includes an unsubscribe link in the footer plus a `List-Unsubscribe` header that mail clients use for the native unsubscribe button. The link opens a public preferences page where the recipient can unsubscribe or re-subscribe without signing in. Transactional emails (welcome, plan-limit warnings) are not affected by the unsubscribe state. ## Next Steps > [card] [Analytics](/guides/analytics) > > Explore the dashboard the digests are built from > [card] [Team Management](/guides/team) > > Control who appears as a maintainer recipient # Example Questions Source: https://docs.gurubase.ai/guides/example-questions Guide users with custom example questions on your Guru page ## Example Questions Example questions are pre-configured prompts that appear on your Guru's main page and widget interface. They help guide users on what they can ask your Guru, improving user onboarding and engagement. ### Why Use Example Questions? * **Improve user onboarding**: Help first-time users understand what your Guru can do * **Highlight key capabilities**: Showcase the types of questions your Guru can answer * **Reduce friction**: Users can click directly on an example to start a conversation * **Demonstrate use cases**: Show common scenarios where your Guru provides value ## Configuration ### Where to Configure Navigate to your Guru's settings page and scroll down to the **Advanced Settings** section. You'll find the **Example Questions** section alongside other settings like PII Masking Rules and Source Ordering. ![Example Questions Configuration](https://mintcdn.com/gurubase/LWHwgK41sH47pPBU/images/example-questions-settings.jpg?fit=max\&auto=format\&n=LWHwgK41sH47pPBU\&q=85\&s=8d267aa785b4c61c11ff1c0042613465) ### How to Add Example Questions 1. Navigate to your Guru's settings page (e.g., `https://app.gurubase.io/guru/[guru-slug]`) 2. Scroll down to the **Advanced Settings** section 3. Find the **Example Questions** section 4. Click **Add Example Question** to add a new question 5. Type your example question in the text field 6. Repeat for additional questions (pool of up to 20) 7. Click **Update Guru** to save your changes ### Managing Example Questions * **Edit**: Simply modify the text in any question field * **Remove**: Click the **X** button next to any question to delete it * **Character limit**: Each question can be up to 150 characters (a counter under each field shows characters used out of 150) ### Pinning and Rotation You can keep a pool of up to 20 example questions and control how many a visitor sees at a time. Pinned questions are shown first; if you pin more than the per-visit count, only that many are shown. The remaining slots are filled at random from the unpinned questions in the pool. * **Pin a question**: Click the pin icon next to any question to keep it visible on every visit. Click it again to unpin. * **Questions shown per visit**: Use the selector at the top of the section to choose how many questions each visitor sees (1 to 10, default 5). Pinned questions count toward this total and are always shown first. * **Rotation**: When the pool has more unpinned questions than the remaining slots, the extras are picked at random on each request so visitors see different suggestions over time. * **Stale pins**: If you remove a question that was pinned, its pin is dropped automatically on save. > [!NOTE] > > On the public Guru page, the picked list refreshes at most once an hour due to page caching. The website widget refreshes on every load. ## Where Example Questions Appear ### Guru Main Page Example questions are displayed below the search input on your Guru's public page (e.g., `https://app.gurubase.io/g/[guru-slug]`). ![Example Questions on Guruubase UI](https://mintcdn.com/gurubase/LWHwgK41sH47pPBU/images/example-questions-gurubase-ui.jpg?fit=max\&auto=format\&n=LWHwgK41sH47pPBU\&q=85\&s=06b175d1d4db12ec0e15112b57ce9b2c) ### Website Widget Example questions are included in the widget endpoint response and displayed to users interacting with your embedded widget. You can create a widget (Ask AI button) to your website using the [Website Widget](/integrations/bots/website-widget) integration. ![Example Questions on Guruubase Widget](https://mintcdn.com/gurubase/LWHwgK41sH47pPBU/images/example-questions-gurubase-widget.jpg?fit=max\&auto=format\&n=LWHwgK41sH47pPBU\&q=85\&s=94a369c8e95ede85ae8e10390cfbc983) ## Best Practices ### Writing Effective Example Questions > [!TIP] > > Write questions that represent common use cases and demonstrate your Guru's expertise. **Good examples:** * "How do I integrate the widget into my website?" * "What are the pricing plans available?" * "How do I reset my password?" **Keep in mind:** * Use clear, natural language * Focus on frequently asked questions * Cover different aspects of your Guru's knowledge * Keep questions concise (up to 150 characters) * Pin the one or two questions every visitor should see, and let the rest rotate ### Strategic Use Cases 1. **Product documentation**: "How do I get started with \[product]?" 2. **Technical support**: "How do I troubleshoot \[common issue]?" 3. **Sales enablement**: "What features are included in the Pro plan?" 4. **Onboarding**: "What can this Guru help me with?" ## Important Notes > [!WARNING] > > Example questions are text-only suggestions. They are not linked to existing answered questions in the database, they serve purely as prompts to guide users. * Example questions help set user expectations about your Guru's capabilities * Consider updating them periodically based on analytics and user feedback * Use the [Analytics](/guides/analytics) feature to identify popular topics and optimize your example questions # Excel Extraction Best Practices Source: https://docs.gurubase.ai/guides/excel-extraction Learn how to prepare Excel files for optimal extraction and analysis Gurubase can interpret various Excel structures, but proper formatting significantly improves extraction quality. Follow these guidelines for optimal results. ## Quick Reference > [card] Complete Headers > > Include all column headers > [card] Clear Structure > > Avoid complex nesting > [card] No Empty Rows > > Remove blank rows/columns > [card] Smaller Sheets > > Split large datasets > [card] Table Layout > > Use tables, not forms > [card] Optimize Size > > Keep files small *** ## Structure Guidelines ### 1. Complete Headers and Columns Always include complete headers and columns for all data sections. ✅ **Good Example** ![](https://mintcdn.com/gurubase/PMnPe4PheUTq6epp/images/guides/excel-extraction/1-good.png?fit=max\&auto=format\&n=PMnPe4PheUTq6epp\&q=85\&s=b655f23ccbd30fb161abe9817b84c29d) ❌ **Bad Example** ![](https://mintcdn.com/gurubase/PMnPe4PheUTq6epp/images/guides/excel-extraction/1-bad.png?fit=max\&auto=format\&n=PMnPe4PheUTq6epp\&q=85\&s=3b43900aee628a2ceebfe345c05d9511) *Missing Price and Stock columns* ### 2. Use Clear Structures Avoid complex nested structures and multi-tables when possible. ✅ **Good Example** ![](https://mintcdn.com/gurubase/PMnPe4PheUTq6epp/images/guides/excel-extraction/2-good.png?fit=max\&auto=format\&n=PMnPe4PheUTq6epp\&q=85\&s=18821b3e0d9472e5819a1eb98a04e5bc) ❌ **Bad Example** ![](https://mintcdn.com/gurubase/PMnPe4PheUTq6epp/images/guides/excel-extraction/2-bad.png?fit=max\&auto=format\&n=PMnPe4PheUTq6epp\&q=85\&s=fb03a1f6d0878eec8566dfd601bd583c) **For Sub-tables**: When you have sub-tables or multiple data sections, repeat headers and columns for each section: ![](https://mintcdn.com/gurubase/jrPn0pcDQp1Ed5oM/images/guides/excel-extraction/2-sub-table.png?fit=max\&auto=format\&n=jrPn0pcDQp1Ed5oM\&q=85\&s=e24a0bc6c0f1a06cc001892b47989f99) ### 3. Clean Empty Rows and Columns Remove all empty rows and columns to keep files as small as possible. **Before Cleaning:** ![](https://mintcdn.com/gurubase/jrPn0pcDQp1Ed5oM/images/guides/excel-extraction/3-bad.png?fit=max\&auto=format\&n=jrPn0pcDQp1Ed5oM\&q=85\&s=ee0c841d1ae95ae2b332b85242bc04c0) **After Cleaning:** ![](https://mintcdn.com/gurubase/jrPn0pcDQp1Ed5oM/images/guides/excel-extraction/3-good.png?fit=max\&auto=format\&n=jrPn0pcDQp1Ed5oM\&q=85\&s=6e37166e0c09fb7976808a0313009c3f) ### 4. Split into Smaller Sheets Divide large datasets into multiple smaller, focused sheets. | Sheet | Content | | - | - | | Sheet 1 | Customer Information | | Sheet 2 | Product Catalog | | Sheet 3 | Sales Transactions | | Sheet 4 | Inventory Levels | This improves processing speed, organization, and reduces file size. ### 5. Use Table Structure Over Form Structure Prefer tabular data layout instead of form-based layouts. ✅ **Good Example (Table Structure)** ![](https://mintcdn.com/gurubase/jrPn0pcDQp1Ed5oM/images/guides/excel-extraction/5-good.png?fit=max\&auto=format\&n=jrPn0pcDQp1Ed5oM\&q=85\&s=3a50f4b190db8a19834f3b0055482fbc) ❌ **Bad Example (Form Structure)** ![](https://mintcdn.com/gurubase/jrPn0pcDQp1Ed5oM/images/guides/excel-extraction/5-bad.png?fit=max\&auto=format\&n=jrPn0pcDQp1Ed5oM\&q=85\&s=e6c112758941b8928d37da97cdaa29a7) *** ## Advanced Formatting ### 6. Proper Nested Structure When nesting is necessary, ensure flows completely encompass each other and merge headers around grouped content. ✅ **Good Example (Proper Nested Structure)** ![](https://mintcdn.com/gurubase/jrPn0pcDQp1Ed5oM/images/guides/excel-extraction/6-good.png?fit=max\&auto=format\&n=jrPn0pcDQp1Ed5oM\&q=85\&s=8f2ab4602c3513694c9336f76b90cb29) ✅ **Good Example (Proper Nested Structure)** ![](https://mintcdn.com/gurubase/jrPn0pcDQp1Ed5oM/images/guides/excel-extraction/6-good-more-complex.png?fit=max\&auto=format\&n=jrPn0pcDQp1Ed5oM\&q=85\&s=7f8dd6fac40c06b24239fb70ff63e07b) ❌ **Bad Example** ![](https://mintcdn.com/gurubase/jrPn0pcDQp1Ed5oM/images/guides/excel-extraction/6-bad.png?fit=max\&auto=format\&n=jrPn0pcDQp1Ed5oM\&q=85\&s=3662e62b3ad4505f28a8e13f47b3b3fb) Here is its fixed version: ![](https://mintcdn.com/gurubase/jrPn0pcDQp1Ed5oM/images/guides/excel-extraction/6-bad-fixed.png?fit=max\&auto=format\&n=jrPn0pcDQp1Ed5oM\&q=85\&s=022696e5509621a80847b566f922340c) **Key Principles for Nested Structures** 1. **Complete Coverage**: Each nested level should fully encompass the data below it 2. **Merged Headers**: Use merged cells to group related columns under main categories 3. **Consistent Structure**: Maintain the same pattern throughout the sheet 4. **Clear Hierarchy**: Make the relationship between levels obvious ### 7. Column Oriented Tables Gurubase can also handle column-oriented Excel files. Just make sure you include proper headers above the data cells: ✅ **Good Example (Proper Nested Structure)** ![](https://mintcdn.com/gurubase/jrPn0pcDQp1Ed5oM/images/guides/excel-extraction/7-good.png?fit=max\&auto=format\&n=jrPn0pcDQp1Ed5oM\&q=85\&s=fc4588a6a3a0d12dcba180139a17ba2c) *** ## Optimization ### 8. File Size Optimization Keep files as small as possible for better performance: | Action | Benefit | | - | - | | Remove unused worksheets | Reduces file size | | Delete empty rows/columns | Faster processing | | Use appropriate data types | Better accuracy | | Compress images | Smaller uploads | | Remove unnecessary formatting | Cleaner extraction | ### 9. Common Mistakes to Avoid > [accordion] Structure Issues > > * **Missing headers** - Always include column headers > * **Unclear header hierarchy** - Make nested header relationships obvious > * **Inconsistent header spanning** - Use merged cells consistently for grouped columns > * **Excessive nesting** - Prefer flat structures when possible > [accordion] Data Issues > > * **Mixed data types** - Keep consistent formats within columns > * **Hidden data** - Ensure all relevant data is visible > * **Ambiguous header names** - Use descriptive, specific header labels > [accordion] File Issues > > * **Large single sheets** - Split into multiple focused sheets > * **Unnecessary formatting** - Remove complex styling > * **Inconsistent naming** - Use clear, consistent naming conventions *** ## Next Steps > [card] [Data Sources](/guides/data-sources) > > Learn about all supported data sources > [card] [Create Your First Guru](/guides/create-guru) > > Build your AI assistant # Groups & Content Access Control Source: https://docs.gurubase.ai/guides/groups Partition data sources by user groups so the same guru returns role-appropriate answers ## Overview Groups let you partition your data sources by user groups so that the same guru returns role-appropriate answers. The same question asked by a sales team member and a support engineer can return different context, drawn only from the sources each user is allowed to see. Groups are distinct from Gurubase RBAC roles. Roles control who can manage a guru; Groups control what content each user can see when they ask a question. There is one special built-in group: **End Users**. Members of this group can only ask questions and cannot access the admin panel. See [Team Management - End Users Group](/guides/team#end-users-group) for details. The End Users group can also be used as a regular content group for data source visibility (e.g., assign certain sources as visible only to End Users). > [!WARNING] > > Group-based access control applies to authenticated users on the Gurubase web UI, and to > the widget when it can prove who is asking with a verified identity token (see > [SharePoint (Entra ID)](/integrations/identity/sharepoint)). The public > `/api/v1//answer/` endpoint, Slack, Discord, GitHub, Jira, Zendesk, MCP server, and > chat-completions endpoints remain Everyone-only for now. See > [Where It Applies](#where-it-applies) for the full list. ## Concepts ### ContentGroup A ContentGroup is a named collection of users scoped to a single guru. Group names are unique per guru (two different gurus can both have an "Engineering" group without conflict), and a user can belong to multiple groups inside the same guru. ### Membership A Membership links one user to one ContentGroup inside one guru. Memberships are assigned manually by a guru admin from the Team page. ### Visible To Every data source has a "Visible to" field. When Visible to is empty, the source is marked "Everyone" and every authenticated user of the guru sees it in their answers. When Visible to lists one or more groups, only users with membership in at least one of those groups can see the source. Everyone and specific groups are mutually exclusive: selecting a group clears Everyone, and selecting Everyone clears any selected groups. A source with the `mandatory` label follows the same rule: it is added to every answer for the users who can see it, and to no one else. ## Setup **1. Open the Team page** Go to your guru's **Team** page and switch to the **Groups** tab. You must be a guru admin (or a super admin on self-hosted) to see this tab. **2. Create a group** Click **Create Group** and enter a name (for example, `Engineering`). The name is unique per guru; you cannot create two groups with the same name inside one guru. **3. Assign members** From the **Members** tab, use the Groups column multi-select to assign each team member to one or more groups. Users without any group assignment are marked as Everyone-only and can only see Everyone sources. **4. Set Visible to on a data source** Open a data source's edit modal (or select multiple sources and use the bulk **Set Visible to** action). Pick **Everyone** or one or more specific groups. Text sources, edited answers and GitHub repositories can also be restricted when you add them, from the same field in their add dialog. Selecting a group clears Everyone; selecting Everyone clears any previously selected groups. **5. Verify by asking a question** Sign in as a user who is a member of the group you assigned to the source and ask a question that only the restricted source can answer. The answer should include content from that source. Then sign in as a user who is NOT in the group and ask the same question; the answer must not reference any restricted content. ## Worked Example A company uses a single Gurubase guru to answer questions across its Engineering, Sales, and Support teams. The team admin creates three ContentGroups and assigns each data source to the appropriate group. ### Groups and Memberships | User | Memberships | | - | - | | Alice | Engineering | | Bob | Sales | | Carol | Support | | Dave | Engineering, Sales | ### Data Sources | Source | Visible To | | - | - | | Company Handbook | Everyone | | Public FAQ | Everyone | | Product Overview | Everyone | | Internal API Reference | Engineering | | Architecture Decisions | Engineering | | Sales Playbooks | Sales | | Pricing Sheets | Sales | | Customer Runbooks | Support | | Internal Troubleshooting Guide | Support | ### Shared Question All four users ask the same question: > What do we tell a customer asking about enterprise pricing? ### Observed Answers | User | Sources Used | Answer Character | | - | - | - | | Alice | Company Handbook, Public FAQ, Product Overview | Generic public answer from the Product Overview. No pricing details. | | Bob | Company Handbook, Public FAQ, Product Overview, Sales Playbooks, Pricing Sheets | Specific pricing tier breakdown drawn from the sales-restricted sources. | | Carol | Company Handbook, Public FAQ, Product Overview, Customer Runbooks, Internal Troubleshooting Guide | Escalation script from the Customer Runbooks pointing the customer to the sales team. | | Dave | All Everyone sources, Sales Playbooks, Pricing Sheets, Internal API Reference, Architecture Decisions | Union of the Engineering and Sales sources: full pricing detail plus any relevant API context. | The same question produces four different answers because the backend resolves each user's ContentGroup membership server-side and filters the retrieved chunks before the LLM assembles the answer. ## Preview Answers as a Group Guru admins can check what a group's members would see without joining the group. On the guru's chat page, open **Ask as** in the question box and pick one or more groups, or **No group (Everyone only)** to see what a user without any group gets. The control appears only for guru admins and only when at least one source is restricted to a group. * The answer is retrieved exactly as for a member of the chosen groups: Everyone sources plus the sources visible to those groups. Your own memberships are not added. * The choice is fixed for the conversation. Follow-up questions keep the same groups, and the question box shows them as **Asked as**. Start a new chat to change them. * Preview questions are recorded with the groups they were asked as. In Analytics they are listed under the **Gurubase UI (asked as group)** source, so filtering on **Gurubase UI** shows end-user traffic only. * A preview answer is visible to guru admins only, never to end users who open its link. ## Where It Applies Group access depends on whether the surface can prove who is asking. The table below shows every user-facing answer surface and its current status. | Surface | Status | Notes | | - | - | - | | Gurubase web UI (authenticated user) | Groups-enabled | Per-request ContentGroup resolution | | Widget embed, verified identity | Groups-enabled | Groups come from a signed Entra ID token, see [SharePoint (Entra ID)](/integrations/identity/sharepoint) | | Widget embed, no verified identity | Everyone-only | Group fields sent by the page are ignored | | Public POST `/api/v1//answer/` | Everyone-only | `groups` body field silently ignored | | Slack bot | Everyone-only | No per-bot group config yet | | Discord bot | Everyone-only | No per-bot group config yet | | GitHub bot | Everyone-only | No per-bot group config yet | | Jira bot | Everyone-only | No per-bot group config yet | | Zendesk integration | Everyone-only | No per-integration group config yet | | MCP server | Everyone-only | No groups surface yet | | Chat-completions (OpenAI-SDK compatible) | Everyone-only | No groups parameter yet | *** ## Refusal messages per group When a Guru cannot answer, it shows a refusal: one message when the sources hold no reliable answer, another when the question is outside the Guru's topic. A group can replace either one for its members, so the same Guru can send field staff to their team lead and office staff to HR. Set them under **Team → Groups**, edit a group, **Refusal messages**. Leave a field empty to keep the Guru's message. A user in several groups sees a group's message only when every group of theirs that sets one sets the same text. When their groups disagree, or none sets one, they see the Guru's message. The groups are the ones resolved for the request, as listed in [Where It Applies](#where-it-applies), so a surface that is Everyone-only always shows the Guru's message. The group's "no reliable answer" message also guides answers that are only partly covered by the sources: the Guru says what the sources do not cover and points the user to the contact that message names, unless a source names a more specific contact for that case. *** ## Note for the assistant The Guru does not otherwise know who is asking, so when an answer says whom to contact, it guesses from the question. A group's **Note for the assistant** tells it: who the group's members are and whom they turn to. For example, a store crew group can say "Store employee. Takes HR questions to their store manager first.", and a head office group "Head office employee. HR questions go to their HR Business Partner." Set it under **Team → Groups**, edit a group, **Note for the assistant** (up to 500 characters). * Only the asker's own groups are used, and only those with a note. A user in a store group and a store managers group gets both notes; a head office user never sees the store notes. * The note shapes whom the answer points to and how it addresses the person. It does not change which sources they can see, and the answer still comes only from those sources. * Notes are never shown to users. A Guru whose groups have no notes answers exactly as before. * In [Ask as](#preview-answers-as-a-group), the chosen groups' notes are used, not your own. * The groups are the ones resolved for the request, as listed in [Where It Applies](#where-it-applies), so an Everyone-only surface uses no note. *** ## Changing who can see a source Restricting a source that was previously visible to everyone takes effect immediately for retrieval, but an answer that already quoted it is stored text, not a live lookup. So a change to any source's visibility also retires the answers that were built before it: the next person to ask gets a fresh answer, drawn only from what they may now see. Editing a group's note for the assistant, or renaming a group that has one, retires stored answers the same way, since those answers were written with the old note. What you will notice is that the first person to ask a previously answered question after such a change waits for a new answer instead of getting the stored one. A guru that has never restricted a source is unaffected. # MCP Client Source: https://docs.gurubase.ai/guides/mcp-client Connect external MCP servers (tools) to your Guru to enhance answers ## Introduction MCP Client Connections let you connect external [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) servers to your Guru. When a user asks a question, your Guru can call tools from these connected servers to fetch real-time data, perform lookups, or execute actions as part of generating its answer. For example, you could connect: * A database MCP server so your Guru can query live data * An internal API server so your Guru can fetch user-specific information * A monitoring MCP server so your Guru can check system status > [!NOTE] > > This is different from the [MCP Server](/guides/mcp-server) feature, which > exposes your Guru **as** an MCP server. MCP Client Connections let your Guru > **consume** external MCP servers. > [!NOTE] > > Connected MCP tools work in both **Chat** and **Agent** answer modes — the > difference is how they are called. See [Answer Modes](/guides/answer-modes). ## Prerequisites * A Guru on [Gurubase Cloud](https://app.gurubase.io) or a self-hosted instance * An external MCP server you want to connect (remote HTTP endpoint, or a local command for self-hosted only) * API enabled on your Guru (Settings > Integrations > API) ## Adding a Connection 1. Navigate to your Guru's settings 2. Click **MCP** in the sidebar 3. Select the **MCP Clients** tab 4. Click **Add Connection** 5. Fill in the connection details: * **Name**: A descriptive name for the connection * **Server Config (JSON)**: The MCP server configuration (see [Configuration Format](#configuration-format) below) * **Tool Cache TTL**: How long discovered tools are cached (default: 600 seconds) * **Tool Timeout**: Max time for tool discovery and execution (default: 10 seconds) 6. Click **Test Connection** to verify it works 7. Click **Create** to save ## Configuration Format The server config is a JSON object. The format depends on whether your MCP server is a local command (stdio) or a remote HTTP endpoint. ### Local Server (stdio) > [!NOTE] > > Local (stdio) connections are only available in **self-hosted** deployments. > On Gurubase Cloud, use a [Remote Server (Streamable HTTP)](#remote-server-streamable-http) instead. Use this when the MCP server runs as a subprocess on the backend. The config must contain a `command` field. ```json theme={null} { "command": "npx", "args": ["-y", "your-mcp-server"], "env": { "API_KEY": "your-api-key" } } ``` | Field | Type | Required | Description | | - | - | - | - | | `command` | string | Yes | The command to run | | `args` | array | No | Command arguments | | `env` | object | No | Environment variables for the subprocess | ### Remote Server (Streamable HTTP) Use this when the MCP server is accessible over HTTP. The config must contain a `url` field. ```json theme={null} { "url": "https://your-mcp-server.com/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } ``` | Field | Type | Required | Description | | - | - | - | - | | `url` | string | Yes | The MCP server URL | | `headers` | object | No | HTTP headers (e.g., for authentication) | > [!NOTE] > > The config must contain either `command` (for stdio, self-hosted only) or `url` (for HTTP). > If neither is present, the connection will be invalid. ## Testing Connections Before saving, use the **Test Connection** button to verify your configuration: * **Success**: Shows the number of tools discovered from the server (e.g., "Connection successful: 3 tools found") * **Failure**: Shows an error message indicating what went wrong (e.g., timeout, invalid URL, authentication error) Testing uses the **Tool Timeout** value you configured. If the server takes longer than the timeout to respond, the test will fail. ## Managing Connections ### Enable / Disable Toggle a connection on or off from the actions menu (three-dot icon) on each row. Disabled connections are skipped during question answering. ### Edit Click **Edit** in the actions menu to modify the connection name, config, cache TTL, or timeout. ### Delete Click **Delete** in the actions menu. A confirmation dialog will appear before the connection is removed. ### View Discovered Tools Click **View Tools** in the actions menu to see all tools discovered from the MCP server. For each tool you can see: * A checkbox to enable or disable the tool for your Guru * Tool name and description * Parameters (name, type, required, description) * A **Test** button to execute the tool with custom arguments and see the result Uncheck a tool to hide it from the model while keeping it discoverable. Discovery stays fully dynamic: newly added tools appear automatically, and only the tools you explicitly disable are filtered out. Click **Save** to apply your changes. The header on the **MCP Clients** tab shows how many tools are currently enabled against the per-guru cap and how many are disabled across enabled connections. ## How It Works When a user asks a question to your Guru: 1. **Tool Discovery**: Gurubase discovers available tools from each enabled MCP connection (results are cached based on the Tool Cache TTL) 2. **Tool Selection**: During answer generation, the AI evaluates which MCP tools (if any) are relevant to the question 3. **Tool Execution**: If a tool is selected, Gurubase calls it on the external MCP server with the appropriate arguments 4. **Answer Generation**: The tool's response is incorporated into the Guru's answer as additional context Tools from MCP connections appear alongside any [custom actions](/guides/actions) you've configured. The per-guru tool limit applies to the combined total of MCP tools across all connections. ## Next Steps > [card] [MCP Server](/guides/mcp-server) > > Expose your Guru as an MCP server > [card] [Actions](/guides/actions) > > Create custom API call actions for your Guru # MCP Server Source: https://docs.gurubase.ai/guides/mcp-server Connect your Guru to Claude Desktop, Claude Code, and other MCP clients ## Introduction Connect AI assistants to your Guru's knowledge base using the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/). Use your Guru directly within Claude Desktop, Claude Code, Cursor, and other MCP-compatible clients. With the MCP integration, you can: * Ask questions and get AI-generated answers from your knowledge base * Search for relevant documentation without generating an answer * Access your Guru's knowledge directly in your development workflow ## Prerequisites Before setting up the MCP integration, ensure you have: * A Guru on Gurubase (either on [Gurubase Cloud](https://app.gurubase.io) or self-hosted with Enterprise plan) * An API key from [API Keys](https://app.gurubase.io/api-keys) * An MCP-compatible client (Claude Desktop, Claude Code, Cursor, etc.) ## Getting Your API Key 1. Go to [API Keys](https://app.gurubase.io/api-keys) 2. Click **"New API Key"** to generate a new key 3. Copy the API key (it starts with `gb-`) > [!NOTE] > > Store your API key securely. It provides access to your Guru and should not be > shared publicly. ## MCP Server URL Your Guru's MCP server is available at: ``` https://api.gurubase.io/mcp/{guru_slug}/ ``` Replace `{guru_slug}` with your Guru's slug. You can find the slug in your Guru's URL. For example, if your Guru is at `https://app.gurubase.io/g/kubernetes`, the slug is `kubernetes`. > [!NOTE] > > For self-hosted Gurubase (Enterprise plan), use your instance URL: > `http://localhost:8029/mcp/{guru_slug}/` ## Authentication Send your API key in **either** of these headers: * `Authorization: Bearer YOUR_API_KEY` (works with most MCP clients) * `X-API-KEY: YOUR_API_KEY` (recommended for **VS Code Copilot** and any client that intercepts the `Authorization` header) > [!NOTE] > > **VS Code Copilot users:** use `X-API-KEY`. Copilot's MCP client manages the `Authorization` header internally and does not always forward user-supplied values to the server, which can cause `Authorization: Bearer` to fail. `X-API-KEY` is a non-standard header name, so Copilot passes it through unchanged. The same workaround applies to other MCP clients that layer their own auth on top of MCP. ## Client Setup > [!NOTE] > > Replace `{guru_slug}` with your Guru's slug and `YOUR_API_KEY` with your > actual API key in the examples below. > [accordion] Cursor > > In Cursor, go to **Settings** > **MCP Servers** and add one of the following configurations: > > **Remote Server Connection** > > ```json theme={null} > { > "mcpServers": { > "gurubase-{guru_slug}": { > "url": "https://api.gurubase.io/mcp/{guru_slug}/", > "headers": { > "Authorization": "Bearer YOUR_API_KEY" > } > } > } > } > ``` > > **Local Server Connection** > > ```json theme={null} > { > "mcpServers": { > "gurubase-{guru_slug}": { > "command": "npx", > "args": [ > "-y", > "mcp-remote", > "https://api.gurubase.io/mcp/{guru_slug}/", > "--header", > "Authorization: Bearer YOUR_API_KEY" > ] > } > } > } > ``` > [accordion] Claude Code > > **Remote Server Connection** > > ```bash theme={null} > claude mcp add --transport http \ > gurubase-{guru_slug} https://api.gurubase.io/mcp/{guru_slug}/ \ > --header "Authorization: Bearer YOUR_API_KEY" > ``` > > **Local Server Connection** > > ```bash theme={null} > claude mcp add gurubase-{guru_slug} -s user -- \ > npx -y mcp-remote "https://api.gurubase.io/mcp/{guru_slug}/" \ > --header "Authorization: Bearer YOUR_API_KEY" > ``` > [accordion] Claude Desktop > > Edit your Claude Desktop configuration file: > > * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` > * **Windows**: `%APPDATA%\Claude\claude_desktop_config.json` > > **Remote Server Connection** > > ```json theme={null} > { > "mcpServers": { > "gurubase-{guru_slug}": { > "url": "https://api.gurubase.io/mcp/{guru_slug}/", > "headers": { > "Authorization": "Bearer YOUR_API_KEY" > } > } > } > } > ``` > > **Local Server Connection** > > ```json theme={null} > { > "mcpServers": { > "gurubase-{guru_slug}": { > "command": "npx", > "args": [ > "-y", > "mcp-remote", > "https://api.gurubase.io/mcp/{guru_slug}/", > "--header", > "Authorization: Bearer YOUR_API_KEY" > ] > } > } > } > ``` > > > [!NOTE] > > > > **macOS users:** If Claude Desktop can't find `npx`, run `which npx` in your terminal and add an `env` section with that directory in the PATH. For example, if `npx` is at `/opt/homebrew/opt/node@20/bin/npx`, add: > > > > ```json theme={null} > > "env": { > > "PATH": "/opt/homebrew/opt/node@20/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin" > > } > > ``` > [accordion] Windsurf > > Add to your Windsurf MCP config file (`~/.codeium/windsurf/mcp_config.json`): > > **Remote Server Connection** > > ```json theme={null} > { > "mcpServers": { > "gurubase-{guru_slug}": { > "url": "https://api.gurubase.io/mcp/{guru_slug}/", > "headers": { > "Authorization": "Bearer YOUR_API_KEY" > } > } > } > } > ``` > > **Local Server Connection** > > ```json theme={null} > { > "mcpServers": { > "gurubase-{guru_slug}": { > "command": "npx", > "args": [ > "-y", > "mcp-remote", > "https://api.gurubase.io/mcp/{guru_slug}/", > "--header", > "Authorization: Bearer YOUR_API_KEY" > ] > } > } > } > ``` > [accordion] VS Code (Copilot) > > Add to your VS Code settings (`settings.json`): > > > [!NOTE] > > > > Use the `X-API-KEY` header (not `Authorization: Bearer`) when configuring Copilot. Copilot's MCP client intercepts the `Authorization` header, which causes authentication to fail. > > **Remote Server Connection** > > ```json theme={null} > { > "mcp": { > "servers": { > "gurubase-{guru_slug}": { > "url": "https://api.gurubase.io/mcp/{guru_slug}/", > "headers": { > "X-API-KEY": "YOUR_API_KEY" > } > } > } > } > } > ``` > > **Local Server Connection** > > ```json theme={null} > { > "mcp": { > "servers": { > "gurubase-{guru_slug}": { > "command": "npx", > "args": [ > "-y", > "mcp-remote", > "https://api.gurubase.io/mcp/{guru_slug}/", > "--header", > "X-API-KEY: YOUR_API_KEY" > ] > } > } > } > } > ``` > [accordion] Zed > > Add to your Zed settings file (`~/.config/zed/settings.json`): > > **Local Server Connection** > > ```json theme={null} > { > "context_servers": { > "gurubase-{guru_slug}": { > "command": { > "path": "npx", > "args": [ > "-y", > "mcp-remote", > "https://api.gurubase.io/mcp/{guru_slug}/", > "--header", > "Authorization: Bearer YOUR_API_KEY" > ] > } > } > } > } > ``` > [accordion] Other MCP Clients > > For any MCP-compatible client, use one of these configuration patterns: > > **Remote Server Connection** (if your client supports `url` + `headers`): > > ```json theme={null} > { > "url": "https://api.gurubase.io/mcp/{guru_slug}/", > "headers": { > "Authorization": "Bearer YOUR_API_KEY" > } > } > ``` > > **Local Server Connection** (if your client only supports `command`): > > ```json theme={null} > { > "command": "npx", > "args": [ > "-y", > "mcp-remote", > "https://api.gurubase.io/mcp/{guru_slug}/", > "--header", > "Authorization: Bearer YOUR_API_KEY" > ] > } > ``` > > > [!NOTE] > > > > **Which one should I use?** If your client supports `url`, use **Remote**. If it only supports `command`, use **Local**. > > > [!NOTE] > > > > **Authentication failing?** If `Authorization: Bearer YOUR_API_KEY` doesn't work, your client may be intercepting the `Authorization` header. Switch to `X-API-KEY: YOUR_API_KEY`. The Gurubase MCP endpoint accepts both. ## Available Tools Once connected, your MCP client will have access to two tools: ### gurubase\_ask Ask a question and get an AI-generated answer from your knowledge base. **When to use:** * You need a complete, synthesized answer * You want explanations, tutorials, or how-to guidance * Quality and completeness matter more than speed **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `question` | string | Yes | The question to ask your Guru | **Response:** ```json theme={null} { "content": "# How do I install Gurubase selfhosted version?\n\nGurubase **Self-Hosted Enterprise Edition** lets you deploy...", "slug": "install-gurubase-self-hosted-requirements-05d0f038", "trust_score": 35, "references": [ { "title": "Self-Hosted Enterprise Edition - Onprem Deployment - Gurubase", "link": "https://docs.gurubase.ai/self-hosted", "icon": "https://mintlify.s3-us-west-1.amazonaws.com/gurubase/_generated/favicon/favicon-32x32.png?v=3", "type": "WEBSITE" }, { "title": "Getting Started with Gurubase - Help Center", "link": "https://support.gurubase.io/hc/en-us/articles/123456789", "icon": "https://support.gurubase.io/favicon.ico", "type": "ZENDESK" } ] } ``` | Field | Description | | - | - | | `content` | The AI-generated answer in Markdown format | | `slug` | Unique identifier for this Q\&A | | `trust_score` | How closely the retrieved sources match the question (0-100). It is not the probability that the answer is correct. | | `references` | Array of source documents used to generate the answer | > [!NOTE] > > This tool is slower (typically 10-30 seconds) because it retrieves sources, > synthesizes information, and generates a comprehensive answer. Use > `gurubase_semantic_search` for quick lookups. ### gurubase\_semantic\_search Find relevant source documents without generating an answer. **When to use:** * You need a quick check of what documentation exists * You want to find specific articles, guides, or references * You need to explore the knowledge base * Speed is important **Parameters:** | Name | Type | Required | Description | | - | - | - | - | | `query` | string | Yes | The search query | | `labels` | array | No | Filter results by category labels | **Response:** ```json theme={null} { "sources": [ { "title": "Widget Runtime Sequence", "link": "text-gurubase-growth-Widget_Runtime_Sequence-9a65cf78", "labels": [], "icon_url": "", "text": "sequenceDiagram\n autonumber\n participant U as User\n participant B as Browser (your site)...", "type": "Text" }, { "title": "Discord - Gurubase", "link": "https://docs.gurubase.ai/integrations/bots/discord", "labels": [], "icon_url": "", "text": "The image shows a Discord bot integration that is connected to a specific Discord server...", "type": "Text" }, { "title": "README.md", "link": "https://github.com/Gurubase/gurubase-widget/tree/master/README.md", "labels": [], "icon_url": "", "text": "## Path-Based Widget Loading\n\nIf you want to load the widget only on specific paths...", "type": "Text" } ], "total_count": 15 } ``` | Field | Description | | - | - | | `sources` | Array of matching documents | | `sources[].title` | Document or page title | | `sources[].link` | URL to the source (external link or internal reference) | | `sources[].labels` | Category labels associated with the source | | `sources[].icon_url` | Icon URL for the source | | `sources[].text` | Relevant text snippet (truncated to \~500 chars) | | `sources[].type` | Source type (e.g., "Text") | | `total_count` | Total number of sources returned | ## Example Usage Once configured, you can use your Guru directly in Claude: **Asking a question:** > "Use the gurubase\_ask tool to explain how to set up authentication" **Searching documentation:** > "Use gurubase\_semantic\_search to find docs about rate limiting" **With labels filter:** > "Search for API documentation rate limiting using gurubase\_semantic\_search with labels 'api', 'reference" ## Self-Hosted Configuration For self-hosted Gurubase (Enterprise plan), update the URL to point to your instance: ```json theme={null} { "mcpServers": { "gurubase-{guru_slug}": { "command": "npx", "args": [ "-y", "mcp-remote", "http://localhost:8029/mcp/{guru_slug}/", "--header", "Authorization: Bearer YOUR_API_KEY" ] } } } ``` > [!NOTE] > > Replace `localhost:8029` with your actual Gurubase instance URL if different. ## Analytics Questions asked via MCP appear in your Guru's Analytics dashboard with the source type **"MCP"**. This allows you to track usage and identify common questions from your development team. > [!NOTE] > > **Country detection caveat:** Country is detected from the client's IP address. Clients that connect directly to Gurubase (Claude Desktop, Claude Code via `mcp-remote`, Cursor, Windsurf, Zed) will resolve to the developer's country. Clients that proxy MCP traffic through their own infrastructure (notably **VS Code Copilot**, which routes through GitHub-hosted servers) will resolve to the proxy's region rather than the developer's location. ## Troubleshooting > [accordion] Claude Desktop: 'Failed to spawn process: No such file or directory' > > This error occurs when Claude Desktop cannot find `npx` in its PATH. GUI applications on macOS don't inherit your shell's PATH. > > **Solution:** Add the `env` section with the correct PATH: > > 1. Find your npx location: `which npx` > 2. Add the directory to the PATH in your config: > > ```json theme={null} > "env": { > "PATH": "/opt/homebrew/opt/node@20/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin" > } > ``` > > 3. Completely quit and restart Claude Desktop (Cmd+Q, not just close the window) > [accordion] 'Invalid API key' error > > * Verify your API key is correct and starts with `gb-` - Check that the API > key has not been revoked - Ensure the API is enabled for your Guru in Settings > [accordion] 'Guru not found' error > > * Verify the guru\_slug in the URL matches your Guru's slug - Check that the > Guru is not disabled - Ensure the API is enabled for your Guru > [accordion] 'Question was processed but could not be retrieved' > > This is a temporary error. Try asking the question again. If it persists, > contact support. > [accordion] Tools not appearing in Claude > > 1. Verify your MCP configuration is correct > 2. Restart Claude Desktop completely > 3. Check Claude Desktop logs for connection errors > 4. Test the endpoint manually: > > ```bash theme={null} > curl -X POST https://api.gurubase.io/mcp/{guru_slug}/ \ > -H "X-API-KEY: YOUR_API_KEY" \ > -H "Content-Type: application/json" \ > -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' > ``` > > `Authorization: Bearer YOUR_API_KEY` also works. > [accordion] Slow responses from gurubase\_ask > > The `gurubase_ask` tool generates comprehensive answers which takes time. For faster lookups, use `gurubase_semantic_search` to find relevant documents without AI synthesis. ## API Reference For programmatic access without MCP, see our [REST API documentation](/api-reference/introduction). ## Next Steps > [card] [MCP Client Connections](/guides/mcp-client) > > Connect external MCP servers to your Guru > [card] [API Reference](/api-reference/introduction) > > Explore our REST API documentation > [card] [Website Widget](/integrations/bots/website-widget) > > Add your Guru to your website > [card] [Slack Bot](/integrations/bots/slack) > > Connect your Guru to Slack > [card] [Discord Bot](/integrations/bots/discord) > > Add your Guru to Discord # End-User Memory Source: https://docs.gurubase.ai/guides/memory Personalize answers across sessions with remembered end-user profiles. Pass user context into the Guru via the Upsert Profiles API or let logged-in users build memory automatically on the web. End-User Memory lets your Guru tailor its answers to the person asking. You can pass an end-user profile (name, plan, region, history, anything else useful) into Gurubase via the [Upsert Profiles](/api-reference/endpoints/upsert-profiles) API, and, on the web channel, memory can also be built automatically from a logged-in user's own questions. When that same user asks a question on a supported channel where they can be identified, the Guru uses the stored memory as context, so answers stay consistent across sessions and devices. This is the Memory-Powered Personalization feature surfaced as a first-class product capability. ## Turning Memory On or Off The default depends on where Gurubase runs: * **Gurubase Cloud:** memory follows your plan and is **on by default** on plans that include it. * **Self-hosted:** memory is **off by default**. To change it for a Guru: 1. Open the Guru's **Edit** page. 2. Expand **Advanced Settings**. 3. Toggle **End-User Memory** on or off and click **Update Guru**. When memory is on, it is used everywhere the caller can be identified: * **Web (logged-in users only):** the authenticated user is identified automatically. Their memory is loaded on every question and updated from each new question (respecting PII masking, so masked questions are stored). Anonymous web visitors have no memory. * **API, widget, MCP:** memory is used whenever you pass an `external_user_id` in the [Ask Question](/api-reference/endpoints/ask-question) call. Without `external_user_id`, no memory is loaded or written. Profiles you supply via [Upsert Profiles](/api-reference/endpoints/upsert-profiles) always take priority. > [!NOTE] > > Slack, Discord, Microsoft Teams, Jira, and GitHub bots do not pass an `external_user_id` yet, so they do not use memory. Web, widget, MCP, and the direct API do. ## Viewing and Deleting Your Own Memory Logged-in web users get a **View your memory** modal that lists what the Guru remembers about them. From the modal they can: * **Delete a single memory** with the row's delete button. * **Clear all memories** with a single action. The modal is scoped to the signed-in user only; a user can never see or delete another user's memory. ## What Memory Unlocks > [card] Plan-Aware Answers > > A Pro-plan customer asking about quotas sees Pro-plan limits; a Free user sees Free limits, automatically. > [card] Cross-Session Continuity > > The Guru remembers what was asked yesterday, last week, and last quarter without re-asking the user every time. > [card] Per-User Refusals > > Combine memory with source-level RBAC so the Guru only cites what each user is entitled to see. ## How It Works **1. Identify the user** Generate or reuse a stable `external_user_id` for each end user in your application. This is the key Gurubase will use to look up the user's memory. **2. Upsert the profile** Call [`POST /{guru_slug}/profiles/`](/api-reference/endpoints/upsert-profiles) with a JSON `memory` object. The structure is up to you - name, plan, region, account tier, recent activity, anything that helps the Guru answer better. **3. Pass the user into questions** When the user asks a question, include the same `external_user_id` in your [Ask Question](/api-reference/endpoints/ask-question) call. The Guru pulls the stored profile and grounds its answer with both the knowledge base **and** the user context. **4. Update over time** Re-upsert the profile whenever something changes (plan change, new permission, new context). The Upsert endpoint is idempotent, so you can safely call it on every relevant event. ## Example Profile Payload ```json theme={null} POST /{guru_slug}/profiles/ { "users": [ { "external_user_id": "user-7f3a-9b21", "memory": { "name": "Sarah E.", "email": "sarah@example.com", "plan": "Pro", "region": "EU", "department": "Sales", "preferred_language": "English", "last_topics": ["pricing", "renewal"] } } ] } ``` The `memory` object structure is fully open. Pass whatever your application knows about the user that the Guru should use as context. ## Pairs Well With > [card] [Smart Triage](/guides/triage) > > Triage uses memory to skip clarifying questions the Guru already knows the answer to. > [card] [Actions](/guides/actions) > > Actions can use memory fields (e.g. `customer_email`, `plan`) as parameters when calling your APIs. > [card] [PII Masking](/guides/pii-masking) > > Mask personal data in answers and logs even while the Guru uses it as context internally. > [card] [Audit Logs](/guides/audit-logs) > > Every memory-informed answer is logged with the `external_user_id` that drove it. ## API Reference * [Upsert User Profiles](/api-reference/endpoints/upsert-profiles) - Create or update profiles in bulk * [Ask Question](/api-reference/endpoints/ask-question) - Ask a question scoped to an `external_user_id` # Multi-Answer Jobs Source: https://docs.gurubase.ai/guides/multi-answer Answer 100+ questions at once from Excel files, for RFPs, compliance, and security questionnaires Upload an Excel file with questions, get AI-generated answers for all of them, across one or more sheets of the same workbook. Multi-Answer Jobs process hundreds of questions in minutes, using your Guru's knowledge base to provide accurate, source-backed responses. Answers are generated through the same pipeline as the Guru's chat interface (the same prompt, model configuration, Agentic Actions, source visibility rules, and Trust Score settings), so a question answered in a Multi-Answer job matches what you would get by asking the Guru directly. Only the formatting differs: answers are written as plain text so they fit cleanly into Excel cells. ## Why Multi-Answer? > [card] RFP Response > > Complete 100+ vendor questionnaires in hours instead of weeks > [card] Security Questionnaires > > Answer SOC 2, ISO 27001, and vendor security assessments at scale > [card] Compliance Audits > > Handle GDPR, HIPAA, PCI-DSS questionnaires with consistent answers > [card] Due Diligence > > Respond to investor or M\&A questionnaires quickly ## Real-World Use Cases > [accordion] RFP & Vendor Questionnaires > > **The problem:** Your sales team receives a 150-question RFP with a 1-week deadline. Manually researching and writing each answer takes days. > > **With Multi-Answer:** > > 1. Export the RFP questions to Excel > 2. Upload to Multi-Answer Jobs > 3. Get draft answers in minutes, backed by your 100+ real customer RFP documents, playbooks, and product docs > 4. Review, refine, and submit > > **Result:** RFP response time reduced from 5 days to 1 hour. > [accordion] Security & Compliance Questionnaires > > **The problem:** Enterprise customers send security questionnaires (SOC 2, VSA, CAIQ) with 200+ questions. Your security team is overwhelmed. > > **With Multi-Answer:** > > 1. Upload your security policies, SOC 2 report, and compliance docs as data sources > 2. Import the customer's questionnaire > 3. Generate answers that reference your actual policies > 4. Security team reviews instead of writes from scratch > > **Result:** Security questionnaire turnaround reduced by 80%. > [accordion] Due Diligence & Investor Questions > > **The problem:** During fundraising or M\&A, you receive extensive due diligence questionnaires covering legal, financial, and technical details. > > **With Multi-Answer:** > > 1. Upload relevant internal documentation > 2. Process the due diligence questionnaire > 3. Get consistent, accurate answers across all categories > 4. Legal/finance teams review and approve > > **Result:** Due diligence response completed in days instead of weeks. > [accordion] Knowledge Base Quality Audit > > **The problem:** You want to test if your knowledge base can answer the most common customer questions accurately. > > **With Multi-Answer:** > > 1. Export your top 100 support questions > 2. Run them through Multi-Answer > 3. Review trust scores and identify gaps > 4. Add missing content to your knowledge base > > **Result:** Proactively identify and fix KB gaps before customers hit them. *** ## Getting Started ![Empty Multi-Answer Jobs page](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/empty.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=b7b4cc7403a1eaeefd785d84a3410641) Open your Guru's settings and choose **Multi-Answer Jobs** from the sidebar. On your first visit the page is empty. Click **Create a Job** to start. ## Creating a Multi-Answer Job A job is built in two passes. First you pick the sheets to answer, then you map the columns of each picked sheet. The general instruction, Answer Tools, and source/label filters are set once and apply to every picked sheet. ### Step 1: Upload the Excel file ![Upload Excel File](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/create-0.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=dc716dffd7f669a5895c2e5e2d492ea5) Click **Select File** and choose the workbook that holds your questions. Only `.xlsx` files are accepted, up to 10 MB. ### Step 2: Choose the sheets to answer ![Select Sheets](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/create-1.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=2cc23a6cc8c2a41298c63625a73e9f96) One job can answer as many sheets of the workbook as you like. After upload, Gurubase lists every sheet with a checkbox and its row count, next to a read-only preview. * Only the **first visible sheet** is selected by default. Tick the other sheets you want answered, or use **Select all visible sheets**. * **Hidden sheets** carry a `hidden` badge and are never selected for you, since they usually hold scratch or archive data. Tick one yourself if you do want it answered. * Click a sheet's name to preview it before you decide. The preview is useful for spotting cover pages or instruction sheets that hold no questions. The footer shows how many sheets are selected. Click **Continue to mapping** when you're done. > [!NOTE] > > If the workbook has only one sheet, this step is skipped and you go straight to mapping. ### Step 3: Map each selected sheet ![Mapping screen with the Sheets strip](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/create-2.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=205c746b99cb3f2943b493193a23a77f) Each sheet is mapped on its own, so sheets with completely different layouts can run in the same job. The **Sheets** strip at the top lists the sheets you picked, each with a status icon: * **Blue dot:** the sheet you are mapping now * **Green check:** the sheet is fully mapped and valid * **Amber warning:** the sheet still needs mapping Click a sheet in the strip to switch to it. **Change selection** takes you back to Step 2 without losing the mappings you've made, and **Change File** starts over with a different workbook. For each sheet, the **Configuration Steps** guide you through the steps below. Picking the header row and the question column moves you to the next step automatically, and you can click a step's circle to go back to it. > [!NOTE] > > For large sheets, the mapping table previews the first 200 rows and 50 columns. Every row of the sheet is still processed. #### Header Row Click the row that holds this sheet's column headers. It is often row 1, but any row works, so a sheet with a title or blank rows above its headers is fine. #### Question Column Click the column that holds the questions. Every row below the header row that has a question is processed; rows with an empty question cell are skipped. The model sees more than the question. The row's other columns (except the answer columns) are passed along as context, so a column like `Owner` or `Category` also shapes the answer. #### Answer Columns ![Select Answer Columns](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/create-3.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=efa3df57fe58bc22caecc694f380acd7) Click one or more columns where answers should be written. Each answer column gets its own answer, which is useful for asking for different formats or lengths of the same question. Every answer column also gets an optional instruction (up to 1,000 characters) in **Answer Configuration** on the right (for example, "Yes or No only" on one column and "Answer in 2-3 sentences" on another). Column headers are passed to the model too, so a header like "Short Answer" already steers the response. > [!NOTE] > > Only the answer cells of the sheets you process are written. Every other sheet, cell, formula, and format in the original workbook is kept in the output file. #### Ignore Rows (Optional) ![Ignore Rows step](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/create-4.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=eb7caccb5db89aceb3b0206c94bd8b33) Some rows should not be answered: a sample question, an example row, or a section title. Click the **Ignore Rows** step, then click or drag over those rows on the table. ![An ignored row](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/ignore-1.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=02d03094e0171282c8954acdd80bae85) Ignored rows are highlighted on the table, and the **Job Summary** on the right shows how many rows of this sheet are ignored. They are skipped during processing and left untouched in the output file. ### Step 4: Job-wide settings ![Configuration panel](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/config.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=325d999138c45b77250fa51db5fc422d) The **Configuration** panel on the right shows the current sheet's mapping in the **Job Summary** and its column instructions. The sections below it are entered once and apply to every selected sheet. #### General Instruction (Optional) Guidance for every answer across all sheets and columns (up to 2,000 characters), such as tone, audience, or what to avoid. #### Answer Tools (Optional) ![Answer Tools](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/answer-tools.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=1764799a9eb39c7c0720062d4d28e2f9) Multi-Answer jobs support the same answer tools as the chat input: * **Deep Think:** The model spends more reasoning effort on every answer. It is slower but gives higher-quality answers, which helps with complex RFP or compliance questions. Shown when your Guru's answer model supports it. * **Web Search:** Answers can draw on up-to-date web results when the knowledge base alone is not enough. Web sources are listed in each answer's references. Shown only when web search is enabled and available for your Guru. #### Filter by Sources/Labels (Optional) Limit which data sources or labels are used when generating answers. The filter applies to every selected sheet. ## Validation ![All sheets mapped and ready](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/mapped-all.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=8a27f1c0682e4dfa3345d96edd492307) Gurubase validates the mapping automatically as you work (you can also click **Validate**). Each sheet is validated on its own: * While any sheet is incomplete, a banner shows how many sheets **still need mapping**, and **Create Job** stays disabled. A sheet is never skipped silently. * Once every sheet is valid, the banner turns green and shows the total number of questions across all sheets. ![Validation summary for one sheet](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/validation.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=1ab3cc7e5aa939c5015efee90cf8c7ad) The validation summary below the panel covers the sheet you are mapping now: * **Total Questions:** Questions in this sheet that will be processed, excluding ignored rows * **Answers to Generate:** Empty answer cells that will be filled * **Answers to Skip:** Answer cells that already have a value. A row whose answer cells are all filled is skipped and left untouched. In a row where only some answer cells are filled, all of that row's answer columns are written. * **Ignored Rows:** Rows you marked in the Ignore Rows step, plus rows skipped automatically for merged cells * **Answer Column Breakdown:** How many answers each column will generate and skip If an answer cell is part of a merged cell and can't be written, that row is skipped automatically and you get a warning. When every sheet is ready, click **Create Job** to start processing. > [!NOTE] > > The downloaded result is your original workbook, changed only in the answer cells of the sheets you processed. Every other sheet, including hidden and unselected ones, comes back with its cells, formulas, and formatting as uploaded. Drawn shapes such as text boxes are not carried over, so keep your original file if it has them. > > If the Guru can't answer a question (it is out of scope, or the knowledge base doesn't have enough on it), the Guru's standard reply for that case is written into the row's answer cells, and the row is counted as failed. ## Managing Ongoing Jobs Jobs that are still processing appear in the jobs table. ### List ![Ongoing Jobs List](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/ongoing-list.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=eaf70e2003ac36cc0b4f146d61818940) See every job with its status, progress, row count, creation time, and creator. Click **View Details** for more. ### Details ![Ongoing Job Details](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/ongoing-details.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=6e29fc2e8ec213641a13e13d64bb8373) Follow the job's progress with: * **Progress Bar:** How many rows have been processed so far * **Summary Cards:** Total questions, processed, failed, and remaining counts * **Configuration:** A table with each processed sheet's header row, question column, and answer columns, plus the general instruction * **Rows Table:** Each row's status, question preview, Trust Score, and a link to the full answer. Multi-sheet jobs also show which **Sheet** each row comes from. Use the search field to find specific questions within the job. ## Managing Finished Jobs Finished jobs show the `COMPLETED` status, and their results can be reviewed and downloaded. ### List ![Finished Jobs List](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/finished-list.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=72f92430e5e5aa7a9d37d6c2c13f2cc5) Completed jobs show 100% progress with their success and failure counts. Use the download icon to get the result file straight from the list. ### Details ![Finished Job Details](https://mintcdn.com/gurubase/b4fdW2zOiYaJORG8/images/guides/multi-answer/finished-details.png?fit=max\&auto=format\&n=b4fdW2zOiYaJORG8\&q=85\&s=cada012c0a61f84cee3a37aba44d938b) Review a completed job with: * **Download Result:** Download the Excel file with the generated answers * **Summary Cards:** Total questions, processed, failed, and remaining counts * **Rows Table:** Every processed question with its status, Trust Score, and a link to the full answer, plus its sheet in multi-sheet jobs Use the search field to find specific questions within the job. ## Tips for Best Results > [accordion] Prepare Your Knowledge Base First > > Multi-Answer quality depends on your data sources. Before running large questionnaires: > > * Upload relevant policies, documentation, and product specs > * Ensure your SOC 2 report, security policies, and compliance docs are indexed > * Test a few sample questions first to verify coverage > [accordion] Use Column-Specific Instructions > > Column headers in your Excel file are passed to the model, so a header like "Short Answer" already guides the response. For finer control, each answer column can also have its own instructions: > > * **Column B:** "Answer in 1-2 sentences, formal tone" > * **Column C:** "Provide detailed answer with specific policy references" > * **Column D:** "Yes/No only, with brief justification" > > This lets you generate multiple answer formats in a single job. > [accordion] Review Trust Scores > > Each answer includes a trust score. Prioritize manual review for: > > * Low trust scores (answer may need more context) > * Questions outside your knowledge base coverage > * Answers that reference general knowledge vs. your specific docs > [accordion] Filter by Labels for Targeted Answers > > Your data sources can have labels (e.g., "security", "product", "legal"). When creating a Multi-Answer job, you can filter to only use sources with specific labels. > > **Example:** You have 500 documents, but for a security questionnaire, you filter to only "security" labeled sources. The AI will only reference your SOC 2 report and security policies, not product marketing docs. > > This ensures answers are grounded in the right documents. *** ## Next Steps > [card] [Data Sources](/guides/data-sources) > > Add the documents your Multi-Answer jobs will reference > [card] [Excel Extraction](/guides/excel-extraction) > > Best practices for preparing Excel files > [card] [Prompting Your Guru](/guides/prompting-your-guru) > > Customize how your Guru generates answers > [card] [Analytics](/guides/analytics) > > Track answer quality and usage patterns # PII Masking Source: https://docs.gurubase.ai/guides/pii-masking Step-by-step guide to protecting your sensitive data ## PII Masking PII (Personally Identifiable Information) masking automatically redacts sensitive data with your regex rules so it never reaches the underlying AI model, helping you protect privacy and comply with data protection regulations. ### How PII Masking Works Masking is enforced at the **model egress** — the moment just before any request is sent to the AI provider. Every outbound request has your current rules applied to all of its text: * **User questions**: the question is masked before it reaches the model. * **Retrieved context**: data-source content pulled in to answer a question is masked before it is sent as context. * **File attachments**: text extracted from documents, logs, PDFs, and Word (DOCX) files, plus the AI-generated descriptions of attached or embedded images, is masked before it reaches the model. * **Embeddings**: text is masked before it is embedded, both at indexing time and at query time. * **Answers & follow-ups**: every step of the answer pipeline is covered. When a regex pattern matches, it is replaced with the `<