### Install Dependencies and Run Development Server Source: https://github.com/dograh-hq/dograh/blob/main/evals/visualizer/README.md Use these commands to install project dependencies and start the local development server. ```bash npm install npm run dev ``` -------------------------------- ### Development Commands Source: https://github.com/dograh-hq/dograh/blob/main/ui/AGENTS.md Standard commands for installing dependencies and starting the development server. ```bash npm install npm run dev # Runs on port 3000 ``` -------------------------------- ### Run Python SDK Examples Source: https://github.com/dograh-hq/dograh/blob/main/examples/README.md Commands to install the Python SDK, configure environment variables, and execute various workflow management scripts. ```bash pip install dograh-sdk export DOGRAH_API_ENDPOINT=http://localhost:8000 export DOGRAH_API_TOKEN=sk-... # Fetch a workflow by ID and place a test phone call. python python/fetch_workflow_and_call.py # Create a new workflow from a definition. python python/create_workflow.py # Build a 3-node agent with the Workflow SDK and save it as a draft. # Edit WORKFLOW_ID at the top of the file first. python python/build_workflow_with_sdk.py # Load an existing workflow, edit the startCall prompt, and save as a draft. # Edit WORKFLOW_ID at the top of the file first. python python/load_and_edit_workflow.py ``` -------------------------------- ### Start Call Prompt Example Source: https://github.com/dograh-hq/dograh/blob/main/docs/voice-agent/start-call.mdx A sample system instruction prompt for the AI's opening conversational turn. ```text After greeting the caller, confirm you are speaking with {{initial_context.debtor_name}}. If they confirm, move to Debt Disclosure. If they say wrong number, move to End Call. ``` -------------------------------- ### Start backend services Source: https://github.com/dograh-hq/dograh/blob/main/docs/contribution/reference.mdx Starts the backend development services. ```bash bash scripts/start_services_dev.sh ``` ```powershell .\scripts\start_services_dev.ps1 ``` -------------------------------- ### Install Dependencies and Set API Keys Source: https://github.com/dograh-hq/dograh/blob/main/evals/stt/README.md Installs necessary Python packages and sets environment variables for API keys. Requires `websockets` and `ffmpeg` to be installed. ```bash pip install websockets export DEEPGRAM_API_KEY="your-key" export SPEECHMATICS_API_KEY="your-key" ``` -------------------------------- ### Install dograh-sdk Source: https://github.com/dograh-hq/dograh/blob/main/sdk/python/README.md Install the dograh-sdk package using pip. ```bash pip install dograh-sdk ``` -------------------------------- ### Start UI development server Source: https://github.com/dograh-hq/dograh/blob/main/docs/contribution/reference.mdx Starts the UI development server, accessible at http://localhost:3000. ```bash cd ui && npm run dev ``` -------------------------------- ### Run TypeScript SDK Examples Source: https://github.com/dograh-hq/dograh/blob/main/examples/README.md Commands to install dependencies, configure environment variables, and run TypeScript scripts using tsx. ```bash cd typescript npm install export DOGRAH_API_ENDPOINT=http://localhost:8000 export DOGRAH_API_TOKEN=sk-... npm run call # fetch_workflow_and_call.ts npm run create # create_workflow.ts npm run build # build_workflow_with_sdk.ts (edit WORKFLOW_ID in the file first) npm run edit # load_and_edit_workflow.ts (edit WORKFLOW_ID in the file first) ``` -------------------------------- ### Start local services Source: https://github.com/dograh-hq/dograh/blob/main/docs/contribution/reference.mdx Starts Postgres, Redis, and MinIO using Docker Compose. ```bash docker compose -f docker-compose-local.yaml up -d ``` -------------------------------- ### Install Dograh SDK Source: https://github.com/dograh-hq/dograh/blob/main/sdk/typescript/README.md Install the Dograh SDK using npm or pnpm. ```bash npm install @dograh/sdk # or pnpm add @dograh/sdk ``` -------------------------------- ### Install dograh-sdk for Local Development Source: https://github.com/dograh-hq/dograh/blob/main/sdk/python/README.md Install the dograh-sdk in editable mode for local development against a checked-out monorepo. ```bash pip install -e sdk/python/ ``` -------------------------------- ### Start the UI Source: https://github.com/dograh-hq/dograh/blob/main/docs/contribution/setup.mdx Launches the Next.js development server for the UI component. ```bash cd ui && npm run dev -- --hostname 0.0.0.0 ``` -------------------------------- ### Setup Local TURN Server Source: https://github.com/dograh-hq/dograh/blob/main/docs/deployment/docker.mdx Downloads and executes the setup script to configure a coturn TURN server for environments with restrictive network conditions. ```bash curl -o setup_local.sh https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/setup_local.sh && chmod +x setup_local.sh && ./setup_local.sh ``` ```powershell Invoke-WebRequest -OutFile setup_local.ps1 https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/setup_local.ps1; .\setup_local.ps1 ``` -------------------------------- ### Run Automated Custom Domain Setup Source: https://github.com/dograh-hq/dograh/blob/main/docs/deployment/custom-domain.mdx Executes the setup script to configure SSL, update environment variables, and restart services. Ensure the script is run from the directory containing the existing dograh/ artifacts. ```bash curl -o setup_custom_domain.sh https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/setup_custom_domain.sh && chmod +x setup_custom_domain.sh && sudo ./setup_custom_domain.sh ``` -------------------------------- ### Start Local Development Server Source: https://github.com/dograh-hq/dograh/blob/main/docs/README.md Navigate to the docs directory and run the Mintlify development server to view the documentation locally. ```bash mint dev ``` -------------------------------- ### Install Certbot Source: https://github.com/dograh-hq/dograh/blob/main/docs/deployment/custom-domain.mdx Install the Certbot client on your server based on the operating system. ```bash sudo apt update sudo apt install certbot -y ``` ```bash sudo yum install certbot -y ``` -------------------------------- ### Start Stack with TURN Profile Source: https://github.com/dograh-hq/dograh/blob/main/docs/deployment/docker.mdx Starts the Docker services including the TURN server and tunnel profiles. ```bash docker compose --profile local-turn --profile tunnel up --pull always ``` -------------------------------- ### Install Dograh SDK Source: https://github.com/dograh-hq/dograh/blob/main/docs/sdks/introduction.mdx Install the Dograh SDK for Python using pip or for TypeScript using npm. ```bash pip install dograh-sdk ``` ```bash npm install @dograh/sdk ``` -------------------------------- ### Install Dev Container CLI Source: https://github.com/dograh-hq/dograh/blob/main/docs/contribution/reference.mdx Installs the CLI globally on the host machine. Requires Node.js. ```bash npm install -g @devcontainers/cli ``` -------------------------------- ### Workflow Graph Example Source: https://github.com/dograh-hq/dograh/blob/main/docs/core-concepts/workflows-and-agents.mdx Illustrates a basic directed graph structure for a workflow, showing nodes like 'Start Call' and 'Qualify Intent' connected by edges with conditions. ```mermaid graph LR A[Start Call] -->|Caller greets| B[Qualify Intent] B -->|Wants support| C[Support Agent] B -->|Wants sales| D[Sales Agent] C -->|Issue resolved| E[End Call] D -->|Demo booked| E ``` -------------------------------- ### Install Mintlify CLI Source: https://github.com/dograh-hq/dograh/blob/main/docs/README.md Install the Mintlify CLI globally using npm. This tool is used for local development and serving documentation. ```bash npm i -g mint ``` -------------------------------- ### Start Services Source: https://github.com/dograh-hq/dograh/blob/main/docs/deployment/custom-domain.mdx Ensure the stack is running so nginx can serve the ACME challenge. ```bash ./remote_up.sh ``` -------------------------------- ### Install Python requirements Source: https://github.com/dograh-hq/dograh/blob/main/docs/contribution/reference.mdx Installs necessary Python dependencies for development. ```bash bash scripts/setup_requirements.sh --dev ``` ```powershell .\scripts\setup_requirements.ps1 -Dev ``` -------------------------------- ### Start a campaign Source: https://github.com/dograh-hq/dograh/blob/main/docs/api-reference/campaigns.mdx Initiate the execution of a campaign. ```APIDOC ## POST /campaign/{campaign_id}/start ### Description Starts an existing campaign. ### Method POST ### Endpoint /campaign/{campaign_id}/start ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The unique identifier of the campaign. ### Response (No specific response details provided in the source) ``` -------------------------------- ### Install UI dependencies Source: https://github.com/dograh-hq/dograh/blob/main/docs/contribution/reference.mdx Installs Node.js dependencies for the UI. Requires Node.js version 24. ```bash cd ui && npm install && cd .. ``` -------------------------------- ### Start Dograh with Docker Compose Source: https://github.com/dograh-hq/dograh/blob/main/docs/deployment/docker.mdx Commands to launch the Dograh stack. Use the build flag when building images from source. ```bash cd dograh ./remote_up.sh ``` ```bash cd dograh ./remote_up.sh --build ``` -------------------------------- ### Configure S3-compatible storage Source: https://github.com/dograh-hq/dograh/blob/main/docs/developer/environment-variables.mdx Example configuration for connecting Dograh to an S3-compatible storage server like rustfs. ```bash ENABLE_AWS_S3=true S3_BUCKET=voice-audio S3_REGION=us-east-1 S3_ENDPOINT_URL=https://s3.example.com S3_SIGNATURE_VERSION=s3v4 # rustfs rejects SigV2 with SignatureDoesNotMatch S3_ADDRESSING_STYLE=path # rustfs and most non-AWS TLS certs require path-style AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... ``` -------------------------------- ### Manage backend services Source: https://github.com/dograh-hq/dograh/blob/main/docs/contribution/setup.mdx Commands to start, stop, and monitor backend processes during development. ```bash bash scripts/start_services_dev.sh ``` ```bash bash scripts/stop_services.sh ``` ```bash tail -f logs/latest/*.log ``` -------------------------------- ### MCP Tool Authentication Header Example Source: https://github.com/dograh-hq/dograh/blob/main/docs/voice-agent/tools/mcp-tool.mdx This is an example of the Authorization header format expected by most hosted MCP servers. Ensure your Dograh credential matches this scheme. ```http Authorization: Bearer ``` -------------------------------- ### Start development server with Uvicorn Source: https://github.com/dograh-hq/dograh/blob/main/api/AGENTS.md Use this command to launch the application with hot-reloading enabled on port 8000. ```bash uvicorn api.app:app --reload --port 8000 ``` -------------------------------- ### Greeting Text Example Source: https://github.com/dograh-hq/dograh/blob/main/docs/voice-agent/start-call.mdx A sample greeting string using template variables for personalization. ```text Hi {{initial_context.debtor_name}}, this is Alex from Apex Recovery Solutions. ``` -------------------------------- ### Start Campaign Source: https://github.com/dograh-hq/dograh/blob/main/docs/api-reference/campaigns/start.mdx Transitions the campaign from `draft` or `paused` to `running`. Dograh begins dialing contacts up to the configured `max_concurrency`. ```APIDOC ## POST /api/v1/campaign/{campaign_id}/start ### Description Starts dialing contacts in a campaign. This transitions the campaign from `draft` or `paused` to `running` state. Dograh will begin dialing contacts up to the configured `max_concurrency`. ### Method POST ### Endpoint /api/v1/campaign/{campaign_id}/start ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The ID of the campaign to start. ``` -------------------------------- ### Install Dograh with Helm Source: https://github.com/dograh-hq/dograh/blob/main/deploy/helm/dograh/README.md Deploys the Dograh chart with default settings, including required secret generation and Gateway API configuration. ```bash cd deploy/helm/dograh # Install with defaults (all internal deps, Gateway API exposure). # The bundled Postgres/Redis/MinIO are in-chart manifests on official upstream # images — no `helm dependency` / subchart pull step needed. helm install dograh . \ --set secrets.ossJwtSecret="$(openssl rand -hex 32)" \ --set secrets.turnSecret="$(openssl rand -hex 32)" \ --set exposure.gatewayApi.gatewayClassName=istio ``` -------------------------------- ### Tool Response Example Source: https://github.com/dograh-hq/dograh/blob/main/docs/configurations/tracing.mdx Represents the JSON output returned by a tool after a successful execution. ```json {"status": "done", "confirmation": "Table booked"} ``` -------------------------------- ### Minimal example receiver (Python) Source: https://github.com/dograh-hq/dograh/blob/main/docs/developer/webhooks.mdx A basic FastAPI endpoint implementation for receiving and processing Dograh webhook POST requests. ```python from fastapi import FastAPI, Request app = FastAPI() @app.post("/webhook/dograh") async def handle_dograh_webhook(request: Request): payload = await request.json() run_id = payload.get("run_id") outcome = payload.get("outcome") # process the call result... return {"status": "ok"} ``` -------------------------------- ### Define initial context JSON structure Source: https://github.com/dograh-hq/dograh/blob/main/docs/voice-agent/template-variables.mdx Example structure for initial context data containing nested user information. ```json { "initial_context": { "user": { "name": "John" } } } ``` -------------------------------- ### Example payload template Source: https://github.com/dograh-hq/dograh/blob/main/docs/developer/webhooks.mdx A JSON template demonstrating how to map workflow context variables into a custom payload structure. ```json { "run_id": "{{workflow_run_id}}", "customer": "{{initial_context.customer_name}}", "outcome": "{{gathered_context.resolution}}", "call_status": "{{gathered_context.call_status}}", "disposition": "{{gathered_context.call_disposition}}", "mapped_disposition": "{{gathered_context.mapped_call_disposition}}", "duration": "{{cost_info.call_duration_seconds}}", "recording": "{{recording_url}}" } ``` -------------------------------- ### Set Production JWT Secret Source: https://github.com/dograh-hq/dograh/blob/main/deploy/helm/dograh/templates/NOTES.txt Example flag for setting a secure JWT secret during Helm installation or upgrade. ```bash --set secrets.ossJwtSecret="$(openssl rand -hex 32)" ``` -------------------------------- ### Initialize Dograh with Docker Source: https://github.com/dograh-hq/dograh/blob/main/docs/getting-started/index.mdx Downloads the docker-compose configuration and the startup script to initialize the platform locally. ```bash curl -o docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml && curl -o start_docker.sh https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.sh && chmod +x start_docker.sh && ./start_docker.sh ``` ```powershell Invoke-WebRequest -OutFile docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml; Invoke-WebRequest -OutFile start_docker.ps1 https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.ps1; .\start_docker.ps1 ``` -------------------------------- ### Minimal Workflow Example Source: https://github.com/dograh-hq/dograh/blob/main/docs/developer/workflow-schema.mdx A basic workflow structure with a start node and an end node, connected by a single edge. This demonstrates the fundamental components of a workflow definition. ```json { "nodes": [ { "id": "start-1", "type": "startCall", "position": { "x": 0, "y": 0 }, "data": { "name": "Start", "prompt": "You are a friendly assistant. Greet the caller and ask how you can help." } }, { "id": "end-1", "type": "endCall", "position": { "x": 400, "y": 0 }, "data": { "name": "End", "prompt": "Thank the caller and say goodbye." } } ], "edges": [ { "id": "edge-1", "source": "start-1", "target": "end-1", "data": { "label": "Done", "condition": "The caller's question has been answered and they want to end the call" } } ] } ``` -------------------------------- ### ValidationError Hint Example Source: https://github.com/dograh-hq/dograh/blob/main/sdk/python/README.md An example of a ValidationError message that includes an LLM hint for self-correction. ```text tool_uuids: expected tool_refs, got str Hint: List of tool UUIDs from `list_tools`. ``` -------------------------------- ### window.DograhWidget.start() Source: https://github.com/dograh-hq/dograh/blob/main/docs/voice-agent/add-to-website.mdx Initiates a voice call. Must be triggered by a user gesture. ```APIDOC ## window.DograhWidget.start() ### Description Begin a voice call. Must be called from inside a user-gesture handler (e.g. click) so the browser grants microphone access. ``` -------------------------------- ### Run Preflight Check Source: https://github.com/dograh-hq/dograh/blob/main/docs/deployment/custom-domain.mdx Verify that the dograh-init runtime render matches the current .env configuration. ```bash ./remote_up.sh --preflight-only ``` -------------------------------- ### Deploy on a generic VPS Source: https://github.com/dograh-hq/dograh/blob/main/deploy/hostinger/README.md Commands to initialize the environment and deploy the application stack alongside a self-managed Traefik instance for testing purposes. ```bash cp .env.example .env # fill in PUBLIC_HOST, TURN_HOST, secrets, ACME_EMAIL docker network create traefik-proxy docker compose -f docker-compose.traefik.yaml --env-file .env up -d # stand-in Traefik docker compose --env-file .env up -d # app stack ``` -------------------------------- ### Update and rebuild services step-by-step Source: https://github.com/dograh-hq/dograh/blob/main/docs/deployment/docker.mdx Use this sequence when pulling fresh code or updating submodules to ensure all changes are reflected in the images. ```bash cd dograh # 1. Pull the latest source. git pull git submodule update --init --recursive # picks up pipecat submodule bumps # 2. Rebuild both images. sudo docker compose --profile remote build api ui # 3. Recreate the running containers so they use the new images. sudo docker compose --profile remote up -d ``` -------------------------------- ### Run contributor bootstrap Source: https://github.com/dograh-hq/dograh/blob/main/docs/contribution/reference.mdx Configures the fork, initializes submodules, creates the Python virtual environment, and copies environment templates. ```bash bash scripts/setup_fork.sh ``` ```powershell .\scripts\setup_fork.ps1 ``` -------------------------------- ### Install Dograh via Claude Code Source: https://github.com/dograh-hq/dograh/blob/main/README.md Commands to add and install the Dograh plugin within the Claude Code environment. ```text # In Claude Code /plugin marketplace add dograh-hq/dograh-plugins /plugin install dograh@dograh ``` -------------------------------- ### Install Dograh Plugins for AI Agents Source: https://github.com/dograh-hq/dograh/blob/main/docs/getting-started/index.mdx Adds and installs the official Dograh plugin to your AI coding agent environment. ```text /plugin marketplace add dograh-hq/dograh-plugins /plugin install dograh@dograh ``` ```text codex plugin marketplace add dograh-hq/dograh-plugins codex plugin add dograh@dograh ``` -------------------------------- ### Fetch Cart Details via HTTP GET Source: https://github.com/dograh-hq/dograh/blob/main/docs/getting-started/add-tools-and-knowledge-base.mdx A sample GET request endpoint used to retrieve cart information from a public API. ```http GET https://dummyjson.com/carts/1 ``` -------------------------------- ### window.DograhWidget.startChat() Source: https://github.com/dograh-hq/dograh/blob/main/docs/voice-agent/add-to-website.mdx Initiates a new conversation with the AI agent. ```APIDOC ## window.DograhWidget.startChat() ### Description Starts a conversation. The agent's greeting will be delivered via the `onMessage` callback. ``` -------------------------------- ### Get Telephony Configuration Source: https://github.com/dograh-hq/dograh/blob/main/docs/api-reference/telephony-configs.mdx Retrieves details of a specific telephony configuration. ```APIDOC ## GET /organizations/telephony-configs/{config_id} ### Description Retrieves the details of a specific telephony configuration identified by its ID. ### Method GET ### Endpoint /organizations/telephony-configs/{config_id} ### Parameters #### Path Parameters - **config_id** (string) - Required - The unique identifier of the telephony configuration. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the configuration. - **name** (string) - The name of the configuration. - **provider** (string) - The identifier of the telephony provider. - **credentials** (object) - The provider credentials (sensitive fields may be masked). - **created_at** (string) - The timestamp when the configuration was created. - **updated_at** (string) - The timestamp when the configuration was last updated. ``` -------------------------------- ### Initialize Dograh Client and Workflow Source: https://github.com/dograh-hq/dograh/blob/main/sdk/typescript/README.md Initialize the Dograh client with the base URL and API key, then create a new workflow instance. ```typescript import { DograhClient, Workflow } from "@dograh/sdk"; const client = new DograhClient({ baseUrl: "http://localhost:8000", apiKey: process.env.DOGRAH_API_KEY, }); const wf = new Workflow({ client, name: "loan_qualification" }); ``` -------------------------------- ### Get campaign progress Source: https://github.com/dograh-hq/dograh/blob/main/docs/api-reference/campaigns.mdx Retrieve the current progress status of a campaign. ```APIDOC ## GET /campaign/{campaign_id}/progress ### Description Retrieves the progress status of a specific campaign. ### Method GET ### Endpoint /campaign/{campaign_id}/progress ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The unique identifier of the campaign. ### Response (No specific response details provided in the source) ``` -------------------------------- ### Get a campaign Source: https://github.com/dograh-hq/dograh/blob/main/docs/api-reference/campaigns.mdx Fetch detailed information about a specific campaign using its ID. ```APIDOC ## GET /campaign/{campaign_id} ### Description Retrieves details for a specific campaign. ### Method GET ### Endpoint /campaign/{campaign_id} ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The unique identifier of the campaign. ``` -------------------------------- ### Get Campaign Progress Source: https://github.com/dograh-hq/dograh/blob/main/docs/api-reference/campaigns/progress.mdx Fetches the current progress of a campaign based on its ID. ```APIDOC ## GET /api/v1/campaign/{campaign_id}/progress ### Description Returns a real-time snapshot of how many contacts have been processed. ### Method GET ### Endpoint /api/v1/campaign/{campaign_id}/progress ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The unique identifier of the campaign. ### Response #### Success Response (200) - **total** (integer) - Total number of contacts in the campaign - **processed** (integer) - Contacts that have been attempted at least once - **completed** (integer) - Contacts with a successful call outcome - **failed** (integer) - Contacts that exhausted all retry attempts without success - **pending** (integer) - Contacts not yet attempted - **completion_percentage** (number) - `processed / total × 100` ### Response Example ```json { "total": 1000, "processed": 500, "completed": 450, "failed": 50, "pending": 500, "completion_percentage": 50.0 } ``` ``` -------------------------------- ### Get Campaign by ID Source: https://github.com/dograh-hq/dograh/blob/main/docs/api-reference/campaigns/get.mdx Fetches details of a specific campaign using its ID. ```APIDOC ## GET /api/v1/campaign/{campaign_id} ### Description Retrieve a single campaign by ID. ### Method GET ### Endpoint /api/v1/campaign/{campaign_id} ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The unique identifier of the campaign to retrieve. ``` -------------------------------- ### DograhWidget.start() Source: https://github.com/dograh-hq/dograh/blob/main/docs/voice-agent/add-to-website.mdx Initiates the voice call. Must be invoked within a user-gesture handler (e.g., click or touch event) to ensure browser microphone permissions are granted. ```APIDOC ## DograhWidget.start() ### Description Starts the voice call session. This method must be triggered by a user interaction to comply with browser security policies regarding microphone access. ### Signature `window.DograhWidget.start(): void` ``` -------------------------------- ### Get Agent Source: https://github.com/dograh-hq/dograh/blob/main/docs/api-reference/agents.mdx Retrieves details for a specific voice agent (workflow) by its ID. ```APIDOC ## GET /workflow/fetch/{workflow_id} ### Description Retrieves details for a specific voice agent (workflow) by its ID. ### Method GET ### Endpoint /workflow/fetch/{workflow_id} ### Parameters #### Path Parameters - **workflow_id** (string) - Required - The unique identifier of the workflow. ``` -------------------------------- ### Run the automated remote setup script Source: https://github.com/dograh-hq/dograh/blob/main/docs/deployment/docker.mdx Executes the remote deployment script with root privileges to configure Docker, ports, and SSL certificates. ```bash curl -o setup_remote.sh https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/setup_remote.sh && chmod +x setup_remote.sh && sudo ./setup_remote.sh ``` -------------------------------- ### Get Agent Count Source: https://github.com/dograh-hq/dograh/blob/main/docs/api-reference/agents.mdx Retrieves the total count of voice agents (workflows). ```APIDOC ## GET /workflow/count ### Description Retrieves the total count of voice agents (workflows). ### Method GET ### Endpoint /workflow/count ``` -------------------------------- ### Personal install hook script Source: https://github.com/dograh-hq/dograh/blob/main/docs/contribution/reference.mdx Create an executable script at .devcontainer/install.local.sh to automatically reinstall personal tools after a container rebuild. Ensure commands are idempotent to avoid unnecessary overhead. ```bash #!/usr/bin/env bash set -euo pipefail command -v claude >/dev/null 2>&1 || curl -fsSL https://claude.ai/install.sh | bash command -v codex >/dev/null 2>&1 || npm i -g @openai/codex ``` -------------------------------- ### Restart and verify authentication configuration Source: https://github.com/dograh-hq/dograh/blob/main/docs/deployment/authentication.mdx Apply the new environment variables and verify the backend health endpoint reports the correct provider. ```bash docker compose up -d ``` ```bash curl -s http://localhost:8000/api/v1/health # expect: "auth_provider":"stack", plus "stack_project_id" and "stack_publishable_client_key" ``` -------------------------------- ### Get campaign call runs Source: https://github.com/dograh-hq/dograh/blob/main/docs/api-reference/campaigns.mdx Retrieve a list of all call runs associated with a campaign. ```APIDOC ## GET /campaign/{campaign_id}/runs ### Description Retrieves all call runs for a specific campaign. ### Method GET ### Endpoint /campaign/{campaign_id}/runs ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The unique identifier of the campaign. ### Response (No specific response details provided in the source) ``` -------------------------------- ### Example Initial Context for Agent Run Source: https://github.com/dograh-hq/dograh/blob/main/docs/api-reference/runs.mdx Pass runtime data into an agent at run time using the `initial_context` field. These values can be referenced as template variables in your agent's prompt. ```json { "initial_context": { "customer_name": "Jane", "appointment_date": "March 15" } } ``` -------------------------------- ### Get Run Source: https://github.com/dograh-hq/dograh/blob/main/docs/api-reference/agents.mdx Retrieves details for a specific run of a voice agent (workflow) by its IDs. ```APIDOC ## GET /workflow/{workflow_id}/runs/{run_id} ### Description Retrieves details for a specific run of a voice agent (workflow) by its IDs. ### Method GET ### Endpoint /workflow/{workflow_id}/runs/{run_id} ### Parameters #### Path Parameters - **workflow_id** (string) - Required - The unique identifier of the workflow. - **run_id** (string) - Required - The unique identifier of the run. ``` -------------------------------- ### Initialize and Use GenderService Source: https://github.com/dograh-hq/dograh/blob/main/api/services/gender/README.md Basic usage pattern for initializing the service, predicting gender, and retrieving salutations. ```python from services.gender.gender_service import GenderService # Initialize the service service = GenderService() # Predict gender for a single name result = await service.predict("John") print(f"Gender: {result.gender}") # "male" print(f"Confidence: {result.confidence}") # 0.996 print(f"Source: {result.source}") # "model" # Get salutation for a name greeting = await service.get_salutation("John") print(f"Salutation: {greeting}") # "Mr." greeting = await service.get_salutation("Mary") print(f"Salutation: {greeting}") # "Ms." greeting = await service.get_salutation("Unknown") print(f"Salutation: {greeting}") # "Dear" # Clean up await service.close() ```