### Install Dot CLI on self-hosted instance Source: https://docs.getdot.ai/developers/cli.md Install the Dot CLI from a self-hosted Dot instance using curl. ```bash curl https://your-dot-instance.com/install | sh ``` -------------------------------- ### Install Dot CLI on macOS/Linux (US and EU regions) Source: https://docs.getdot.ai/developers/cli.md Install the Dot CLI on macOS or Linux using curl. Use the URL matching your Dot region: app.getdot.ai for US, eu.getdot.ai for EU. ```bash # US region curl https://app.getdot.ai/install | sh # EU region curl https://eu.getdot.ai/install | sh ``` -------------------------------- ### POST /api/agentic request example Source: https://docs.getdot.ai/developers/api/commonly-used-endpoints Example HTTP request to ask Dot a question. Requires an API key in the X-API-KEY header and a JSON body with messages, chat_id, and optional skip_check and extra fields. The response is 'No content'. ```http POST /api/agentic HTTP/1.1 X-API-KEY: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 104 { "messages": [ { "ANY_ADDITIONAL_PROPERTY": "anything" } ], "chat_id": "text", "skip_check": false, "extra": "text" } ``` -------------------------------- ### GET /api/export_history request example Source: https://docs.getdot.ai/developers/api/commonly-used-endpoints Example HTTP request to the export_history endpoint. Requires an admin API token passed in the X-API-KEY header. The response is a 200 with no content in this example. ```HTTP GET /api/export_history HTTP/1.1 X-API-KEY: YOUR_API_KEY Accept: */* ``` -------------------------------- ### Direct HTTP/HTTPS connection example Source: https://docs.getdot.ai/integrations/databases/clickhouse.md Shows the connection details for the recommended direct HTTP/HTTPS method, including host, port, username, password, and database. ```text Host: clickhouse.company.com Port: 8443 Username: dot_user Password: your_secure_password Database: analytics_db ``` -------------------------------- ### Create a User and Assign Privileges Source: https://docs.getdot.ai/integrations/databases/mysql-mariadb Execute these SQL commands as a superuser to create a user 'dot_user' and a role 'dot_role', then assign the role to the user. Replace '' with a strong password. ```sql CREATE USER 'dot_user'@'%' IDENTIFIED BY ''; CREATE ROLE 'dot_role'; GRANT 'dot_role' TO 'dot_user'@'%'; ``` -------------------------------- ### Agent Operating Principles Example Source: https://docs.getdot.ai/train-dot/model/notes An example of agent operating principles, written as instructions with strong language like 'Always' and 'Never' to guide Dot's behavior in specific situations. ```text Always clarify with the user if they want live or booked revenue when they ask about revenue. Always by default filter out internal users (IS_INTERNAL = FALSE). Always use the table fct_arr_consolidated when this table is enough to answer questions about ARR. Never answer questions about a/b tests and rather refer them to https://experiments.internal.com ``` -------------------------------- ### curl command for GET /api/chat_history_export Source: https://docs.getdot.ai/developers/api/commonly-used-endpoints.md Example curl command to export chat history as a CSV file. It uses the X-API-KEY header with an admin API token and passes start_date, end_date, and tz parameters. The example uses the EU endpoint https://eu.getdot.ai and saves the output to history.csv. ```bash # EU: https://eu.getdot.ai curl -H "X-API-KEY: YOUR_API_TOKEN" -o history.csv \ "https://app.getdot.ai/api/chat_history_export?start_date=2026-10-01&end_date=2026-10-31&tz=Europe/Berlin" ``` -------------------------------- ### Full example URL for embedding Dot with UI parameters Source: https://docs.getdot.ai/developers/embed.md A complete URL example that combines multiple optional parameters to customize the embedded Dot UI, such as hiding side navigation, help, share button, explanation, and setting a primary color and chat placeholder text. Use this as a template for constructing your own embed URLs. ```url https://eu.getdot.ai?hideSideNavigation=true&hideHelp=true&hideShareButton=true&hideExplanation=true&minimizeProgess=True&primaryColor=%23c700c7&chatPlaceHolderText=Ask%20AI ``` -------------------------------- ### GET /api/get_users - Get All Users Source: https://docs.getdot.ai/developers/api/commonly-used-endpoints Retrieves all users. Requires X-API-KEY header. Returns 200 with no content. ```HTTP GET /api/get_users HTTP/1.1 X-API-KEY: YOUR_API_KEY Accept: */* ``` -------------------------------- ### Log in to Dot CLI Source: https://docs.getdot.ai/developers/cli.md Log in to Dot CLI. Opens a browser to sign in and saves the token locally. Use --device to print a sign-in link, then run dot login --poll with the printed code. Use --browser to force the browser flow. ```bash dot login ``` -------------------------------- ### Preview and run an evaluation Source: https://docs.getdot.ai/developers/api/evaluations-in-ci.md Runs a dry-run preview that starts no agent and spends no evaluation credits, then runs the evaluation and saves JSON and JUnit reports. The run grades the file's questions without changing the saved definition. ```bash dot eval run suite.yaml --target production --dry-run dot eval run suite.yaml --target production \ --output artifacts/results.json --junit artifacts/results.xml ``` -------------------------------- ### GET /api/c2/{chat_id} Source: https://docs.getdot.ai/developers/api/commonly-used-endpoints Reads one whole conversation by chat ID. Use include_all=true to get the full conversation. ```APIDOC ## GET /api/c2/{chat_id} ### Description Reads one whole conversation by chat ID. ### Method GET ### Endpoint /api/c2/{chat_id} ### Parameters #### Path Parameters - **chat_id** (string) - Required - The ID of the chat to retrieve. #### Query Parameters - **include_all** (boolean) - Optional - Set to `true` to include the full conversation. ### Response #### Success Response (200) - **conversation** - The full conversation data. ``` -------------------------------- ### dot env --help Source: https://docs.getdot.ai/developers/cli.md Displays help for additional environment verbs: rename, delete, unset, conflicts, target, and sync-target. ```bash dot env --help ``` -------------------------------- ### Organization Notes Example Source: https://docs.getdot.ai/train-dot/model/notes A short example of an organization note providing background knowledge about a company. The source notes that this is much shorter than typical background notes. ```text TinyTrucks is a children's toy company. We manufature educational and entertaining toy trucks. We sell directly them online to parents in Europe and the US. ``` -------------------------------- ### Metric Glossary Example Source: https://docs.getdot.ai/train-dot/model/notes.md Example of a metric glossary definition that Dot will use when answering queries. It includes a header instruction and SQL queries for ARR and NRR metrics. ```markdown This is our metric glossary. Always use the definitions specified here to write queries ## ARR: Annual Recurring Revenue ```sql SELECT sum(contract_value) FROM opportunities_table WHERE status = 'closed' ``` ## NRR: Net Revenue Retention ... ``` -------------------------------- ### Typical agent recipe: fix documentation for a dbt model Source: https://docs.getdot.ai/train-dot/environments.md A workflow for fixing documentation in a dbt model: create and use an environment, set a target schema, build the model, sync the target, verify with `dot ask`, then merge and delete the environment. Assumes a connection ID and a dbt project. ```bash dot env create "fix-customer-tier" && dot env use fix-customer-tier dot env target set fix-customer-tier --schema dbt_dev_alice dbt build --select dim_customers # build the model into the dev schema dot env sync-target fix-customer-tier dot ask "Which columns does dim_customers have?" # verify Dot sees the dev version dot env merge fix-customer-tier --confirm --delete-after ``` -------------------------------- ### Python: Main function to create Notion page Source: https://docs.getdot.ai/train-dot/custom-skills Main function that creates a Notion page with properties, checks required environment variables, and prints success or error messages. Requires NOTION_DATABASE_ID and NOTION_API_TOKEN. Exits with error if missing. ```python def main(name, description, status_name, priority, due_date): """Main function for testing.""" setup_logging() # Check for required environment variables db_id = os.getenv("NOTION_DATABASE_ID") if not db_id: print("āŒ NOTION_DATABASE_ID not set") print("Set it with: export NOTION_DATABASE_ID='your_database_id'") sys.exit(1) token = os.getenv("NOTION_API_TOKEN") if not token: print("āŒ NOTION_API_TOKEN not set") print("Set it with: export NOTION_API_TOKEN='your_token'") sys.exit(1) try: # Create page with only Name property (since that's what your database has) notion = NotionWrapper() properties = { "Name": title_prop(f"{name}"), "Description": rich_text(description), "Status": status(status_name), "Due Date": date(due_date), "Priority": select(priority) } page_id = notion.create_page(db_id, properties) # Generate URLs page_url = get_page_url(page_id) database_url = get_database_url(db_id) print("\nšŸŽ‰ Success! Created Notion page:") print(f"šŸ“ Page ID: {page_id}") print(f"šŸ”— Page URL: {page_url}") print(f"šŸ“Š Database URL: {database_url}") print("\nYou can click these URLs to view in Notion!") return { "page_id": page_id, "page_url": page_url, "database_id": db_id, "database_url": database_url } except NotionWrapperError as e: print(f"āŒ Error: {e}") sys.exit(1) ```