### AI Agent Instructions Example Source: https://github.com/cognigy/documentation/blob/main/docs/ai/empower/agentic-ai/getting-started.md Example of specific instructions provided to an AI Agent to guide its conversational behavior and response style. ```txt - Greet users warmly and professionally. - Keep responses concise; expand only if requested. ``` -------------------------------- ### Helm Install Output Notes Source: https://github.com/cognigy/documentation/blob/main/docs/live-agent/installation/deployment/installation-using-helm.md Example output displayed after a successful `helm install` command, indicating the release name, created secrets, and commands to check the status or retrieve release details. ```text NOTES: Thank you for installing live-agent. Your release is named cognigy-live-agent with version . The following secrets have been created: - cognigy-live-agent-postgresql - cognigy-live-agent-redis To learn more about the release, try: $ helm status cognigy-live-agent $ helm get all cognigy-live-agent NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status by running 'kubectl get svc -w cognigy-live-agent' ``` -------------------------------- ### Cognigy.AI Secret Management with Argo CD Source: https://github.com/cognigy/documentation/blob/main/docs/ai/installation/installation-process.md Example configuration for managing Cognigy.AI secrets when using Argo CD, specifically addressing the limitation with Helm's lookup function by utilizing the `existingSecret` option. ```yaml dbConnectionString: enabled: true services: serviceAi: enabled: true serviceName: service-ai auth: existingSecret: "" ``` -------------------------------- ### AI Agent Persona and Instructions Source: https://github.com/cognigy/documentation/blob/main/docs/ai/empower/agentic-ai/getting-started.md Defines the core persona and specific instructions for an AI Agent, influencing its communication style and behavior. Instructions are provided in a bullet-point format. ```APIDOC AI Agent Configuration: General Settings: Name: string (Visible to end users, e.g., 'John') Description: string (Shapes behavior and communication style, e.g., 'John works at ACME and is highly skilled at making customers feel comfortable.') Avatar: Selection of an avatar. Speaking Style: Concise/Comprehensive: Slider to adjust response length. Formal/Informal: Slider to adjust tone (casual/conversational). Knowledge & Instructions: Instructions: list of strings (Bullet-point instructions for AI Agent behavior, e.g., ['Greet users warmly and professionally.', 'Keep responses concise; expand only if requested.']) ``` -------------------------------- ### Internal PostgreSQL Setup Example (values.yaml) Source: https://github.com/cognigy/documentation/blob/main/docs/live-agent/installation/helm-values/database.md Illustrates how to configure the `values.yaml` file for an internal PostgreSQL setup. It highlights the importance of changing the default password or using an existing secret for enhanced security. ```yaml # Example snippet for values.yaml postgresql: enabled: true nameOverride: "postgresql" auth: database: "live_agent_production" username: "postgres" # It is good practice to change the postgresqlPassword # postgresqlPassword: postgres # Uncomment and change or comment out to autogenerate # For external setup, uncomment and set: # host: "your_external_host" # port: "5432" # SSLMode: "require" # existingSecret: "your-existing-secret-name" # auth: # secretKeys: # adminPasswordKey: "postgresql-password" ``` -------------------------------- ### Voice Agent Question Node Configuration Source: https://github.com/cognigy/documentation/blob/main/docs/ai/overview/getting-started-with-voice-agent.md This snippet outlines the configuration for a Question Node in a Cognigy.AI voice agent. It specifies how the agent should prompt the user, the expected input type, and the output format for the user's response. ```APIDOC Cognigy.AI Flow Configuration: Node: Question Node Settings: - Question Type: Select 'Number' to expect a numerical input from the user. - Output Type: Select 'Text' to store the user's numerical input as a text string. - Text: The prompt message to be delivered to the user. Example: 'Welcome to our customer service line. To learn about payment options, press 1. To contact technical support, press 2.' ``` -------------------------------- ### Voice Agent Lookup and Say Node Configuration Source: https://github.com/cognigy/documentation/blob/main/docs/ai/overview/getting-started-with-voice-agent.md This snippet describes the configuration for Lookup and Say nodes used in a Cognigy.AI voice agent to handle user input. It shows how to define cases based on user input and provide corresponding spoken responses. ```APIDOC Cognigy.AI Flow Configuration: Node: Lookup Node Settings: - Type: Select 'Text' to perform a text-based lookup. Node: Case Node (within Lookup) Settings: - Value: Specify the expected input value (e.g., '1' or '2'). Node: Say Node (following Case Node) Settings: - Text: The spoken response to be delivered to the user based on the matched case. Example for Value '1': 'We accept the following payment methods: Credit Card (Visa, Mastercard, American Express), PayPal for secure online payments, or Bank Transfer for direct transfers from your bank account. Thank you for contacting us! Have a great day! Goodbye.' Example for Value '2': 'Apologies, all support members are busy. Try to contact us later. Thank you for your patience.' ``` -------------------------------- ### DTMF Node Configuration Example Source: https://github.com/cognigy/documentation/blob/main/docs/ai/build/node-reference/voice/voice-gateway/dtmf.md Demonstrates the setup of a Cognigy Flow using various nodes, including Set Session Config, Question, Lookup, Case, Say, DTMF, Call Recording, and Handover to Agent, to handle customer interactions via DTMF input. ```cognigy-flow Set Session Config Node: DTMF Section: Capture DTMF Signals: Enabled DTMF Submit Digit: "" Question Node: Question Type: Number Output Type: Text Text: "Hello! Welcome to our Support. We can help you with your equipment needs. If you want to place an order for equipment, press 1. If you have already received your equipment and need help with setup or are experiencing issues, press 2." Lookup Node: Type: Text Case Node (Branch 1): Value: "1" Say Node: Text: "After the signal, please leave a voice message with the information about the equipment you wish to order, and we will call you back" DTMF Node: Digit Sequence: "1" Call Recording Node (Optional) Case Node (Branch 2): Value: "2" Say Node: Text: "After the signal, you will be transferred to a contact center" DTMF Node: Digit Sequence: "2" Handover to Agent Node ``` -------------------------------- ### Login to Helm Registry and Upgrade Cognigy.AI Source: https://github.com/cognigy/documentation/blob/main/docs/ai/installation/migration/kustomize-to-helm-migration.md This command sequence logs into a Helm registry and upgrades or installs the Cognigy.AI Helm release. It requires authentication credentials and a values file for configuration. Ensure the HELM_CHART_VERSION is set correctly. ```bash helm registry login cognigy.azurecr.io \ --username \ --password helm upgrade --install --namespace cognigy-ai cognigy-ai oci://cognigy.azurecr.io/helm/cognigy.ai --version HELM_CHART_VERSION --values values_prod.yaml ``` -------------------------------- ### Tool Action Node Configuration Source: https://github.com/cognigy/documentation/blob/main/docs/ai/empower/agentic-ai/getting-started.md Configures a Tool Action Node to integrate external tools, such as unlocking accounts. It specifies whether to use parameters and defines the parameters required for the tool's execution. ```APIDOC Tool Action Node (e.g., unlock_account): Settings: Use Parameters: boolean (Activate to request user input, e.g., user email) Parameters: email: string (Parameter for user email validation) ``` -------------------------------- ### Create REST Endpoint Setup Source: https://github.com/cognigy/documentation/blob/main/docs/ai/deploy/endpoint-reference/rest.md Guides users through the process of creating and configuring a REST Endpoint within the Cognigy.AI platform. This involves selecting the REST Endpoint type, providing a name, choosing a Flow, and obtaining the Endpoint URL for integration. ```APIDOC Create REST Endpoint: 1. Navigate to Deploy > Endpoints in the Project's left-side menu. 2. Click '+ New Endpoint' on the Endpoints page. 3. In the New Endpoint section: - Select 'REST' as the Endpoint type. - Provide a unique name for the endpoint. - Choose a Flow from the available list. - Save the changes. 4. In the Configuration Information section, copy the 'Endpoint URL'. 5. Save the changes again. ``` -------------------------------- ### Configure Live Agent Environment Variables (TXT) Source: https://github.com/cognigy/documentation/blob/main/docs/live-agent/getting-started/live-agent-setup/live-agent-setup-handover-endpoint.md This snippet shows the environment variables required for on-premises Cognigy.AI installations to enable handover to Cognigy Live Agent. These variables specify the feature flag, API base URL, and platform token for the integration. ```txt FEATURE_USE_COGNIGY_LIVE_AGENT: true COGNIGY_LIVE_AGENT_API_BASE_URL_WITH_PROTOCOL: COGNIGY_LIVE_AGENT_PLATFORM_TOKEN: ``` -------------------------------- ### Say Node Text Example Source: https://github.com/cognigy/documentation/blob/main/docs/live-agent/getting-started/live-agent-setup/live-agent-setup-handover-flow.md Provides an example of text content to be used in a 'Say Node' within a Cognigy.AI Flow, informing the user about the handover process. ```cognigiflow Say Node: Text: "Hi, let's hand you over to the humans" ``` -------------------------------- ### Install Dependencies and Run Secret Migration Script Source: https://github.com/cognigy/documentation/blob/main/docs/ai/installation/migration/kustomize-to-helm-migration.md Installs the required Python packages for the secret migration script using pip and then executes the Python script to generate new secrets for the Helm installation. The target namespace (e.g., 'cognigy-ai') must be specified. ```bash pip3 install -r requirements.txt python3 secret-migration.py -ns cognigy-ai ``` -------------------------------- ### Regular Expression Slot Example Source: https://github.com/cognigy/documentation/blob/main/docs/ai/empower/nlu/slot-fillers.md Example of a regular expression format used for the 'Regular Expression' Slot type. Regex expressions must start with '/' and end with '/g' for global matching. ```regex /^\d{3}-\d{3}-\d{4}$/g ``` -------------------------------- ### Retrieve Cognigy.AI Service Security Logs Source: https://github.com/cognigy/documentation/blob/main/docs/ai/installation/installation-process.md Fetches the logs from the `service-security` deployment in the `cognigy-ai` namespace to retrieve initial user credentials. This command streams logs in real-time. ```bash kubectl logs -f -n=cognigy-ai --tail 100 deployment/service-security ``` -------------------------------- ### Cognigy System Configuration Example Source: https://github.com/cognigy/documentation/blob/main/docs/ai/build/node-reference/voice/voice-gateway/parameter-details.md An example JSON structure illustrating the configuration for synthesizer, recognizer, and user settings within the Cognigy system. ```JSON { "synthesizer": { "vendor": "microsoft", "language": "de-DE", "voice": "en-US-JennyNeural" }, "recognizer": { "vendor": "google", "language": "de-DE", "hints": [ "help", "skip", "confirm" ], "hintsBoost": 20 }, "user": { "noInputMode": "speech" } } ``` -------------------------------- ### Handover Accepted Message Example Source: https://github.com/cognigy/documentation/blob/main/docs/live-agent/getting-started/live-agent-setup/live-agent-setup-handover-flow.md Provides an example of a message to be displayed to the user when the handover to a live agent is initiated. ```cognigiflow Handover to Agent Node: Handover Accepted Message: "Performing the Handover..." ``` -------------------------------- ### Install Helm Chart Version 4.44.0 Source: https://github.com/cognigy/documentation/blob/main/docs/live-agent/installation/migration/helm-dependencies.md Command to install the 'cognigy-live-agent' Helm chart from an OCI registry. It specifies version 4.44.0, targets the 'live-agent' namespace, and applies a custom values file. ```sh helm install cognigy-live-agent oci://cognigy.azurecr.io/helm/live-agent --version 4.44.0 --namespace live-agent -f custom-values.yaml ``` -------------------------------- ### Helm Chart Custom Values for Installation Source: https://github.com/cognigy/documentation/blob/main/docs/live-agent/installation/migration/helm-dependencies.md Configuration snippet for a custom-values.yaml file. It disables the migration job and sets application and worker replica counts to zero, preparing for an initial chart installation with an empty database. ```yaml # custom-values.yaml app: replica: 0 worker: replica: 0 odata: enabled: false migration: enabled: false ``` -------------------------------- ### Build Cognigy Documentation Server Docker Image Source: https://github.com/cognigy/documentation/blob/main/contribution/overview.md Builds the Docker image for the Cognigy documentation server locally using the specified Dockerfile. This step prepares the environment for running the documentation locally. ```bash docker build -f ./build/Dockerfile.development --platform linux/amd64 -t doc-local . ``` -------------------------------- ### Lodash Utility Functions Source: https://github.com/cognigy/documentation/blob/main/docs/ai/build/node-reference/basic/code/modules.md Illustrates the use of the Lodash utility library in Code Nodes for common JavaScript tasks. This example shows how to get the last element of an array. ```javascript _.keys(); ``` ```javascript const favouriteFoods = ["pizza", "spaghetti", "burger"]; const last = _.last(favouriteFoods); actions.output(last); ``` -------------------------------- ### Run Cognigy Documentation Server Locally Source: https://github.com/cognigy/documentation/blob/main/contribution/overview.md Runs the previously built Docker image for the Cognigy documentation server. It maps port 8000, mounts the current directory to the container, and names the container 'doc-server'. ```bash docker run \ --rm \ -it \ -p 8000:8000 \ --name doc-server \ --mount type=bind,source="$(pwd)",target=/app \ doc-local:latest ``` -------------------------------- ### Login to Cognigy OCI Registry Source: https://github.com/cognigy/documentation/blob/main/docs/live-agent/installation/deployment/installation-using-helm.md Authenticates with the Cognigy OCI registry using your credentials. This is necessary before pulling or installing Helm charts from the registry. ```sh helm registry login cognigy.azurecr.io ``` -------------------------------- ### Helm SMTP Configuration for No Authentication Source: https://github.com/cognigy/documentation/blob/main/docs/live-agent/FAQs.md Instructions for modifying SMTP configuration for self-hosted installations where no authentication provider is used. This section guides users on setting up SMTP correctly. ```APIDOC Helm SMTP Values: Configuration for SMTP settings in self-hosted installations. Purpose: To fix SMTP issues, particularly when no authentication provider is configured. Reference: ../live-agent/installation/helm-values/smtp.md ``` -------------------------------- ### Delete Kubernetes PVC (MongoDB Optional) Source: https://github.com/cognigy/documentation/blob/main/docs/ai/installation/migration/kustomize-to-helm-migration.md Optionally deletes the Persistent Volume Claim for a single-replica MongoDB setup. This is typically used during migrations from single-replica to multi-replica MongoDB configurations. ```bash kubectl delete pvc mongodb -n default ``` -------------------------------- ### Create Knowledge AI Flow Source: https://github.com/cognigy/documentation/blob/main/docs/ai/empower/knowledge-ai/getting-started.md Instructions for creating a basic Cognigy.AI Flow to test Knowledge AI functionality. This involves creating a Flow with a Search Extract Output Node. ```cognigy-flow Click **Create Flow**. Cognigy.AI creates a Flow named **Knowledge AI** followed by a number. ``` -------------------------------- ### Retrieve Previous Cognigy.AI Service Security Logs Source: https://github.com/cognigy/documentation/blob/main/docs/ai/installation/installation-process.md Retrieves logs from a previous instance of the `service-security` deployment. This is useful if the current deployment logs do not show the initial credentials due to restarts. ```bash kubectl logs -n=cognigy-ai --previous deployment/service-security ``` -------------------------------- ### Email Notification Node Configuration Source: https://github.com/cognigy/documentation/blob/main/docs/ai/empower/agentic-ai/getting-started.md Configures an Email Notification Node to send emails, typically as a confirmation or notification after a tool action is completed. It requires recipient details, subject, and content. ```APIDOC Email Notification Node: Recipient TO Email Addresses: string (Email address for receiving notifications) Email Subject: string (Subject line of the email, e.g., 'Account Unlocked') Email Content: string (Body of the email, e.g., 'Dear user, your account has been successfully unlocked') ``` -------------------------------- ### Rollback: Apply Kustomize Configuration with kubectl Source: https://github.com/cognigy/documentation/blob/main/docs/ai/installation/migration/kustomize-to-helm-migration.md This command applies the Kustomize configuration to bring back the Kustomize installation of Cognigy.AI. It navigates to the Kustomize directory and applies the Kubernetes resources defined there. ```bash cd kubernetes/core//product kubectl apply -k ./ ``` -------------------------------- ### Verify Cognigy.AI Deployments with kubectl Source: https://github.com/cognigy/documentation/blob/main/docs/ai/installation/migration/kustomize-to-helm-migration.md After deploying the Helm chart, this command verifies that all Cognigy.AI deployments within the specified namespace are in a ready state. This is a crucial step to ensure the application is running correctly. ```bash kubectl get deployments -n=cognigy-ai ``` -------------------------------- ### Rollback: Delete Cognigy.AI Namespace with kubectl Source: https://github.com/cognigy/documentation/blob/main/docs/ai/installation/migration/kustomize-to-helm-migration.md After a successful rollback to the Kustomize installation, this command cleans up the Cognigy.AI namespace that was used by the Helm release. This ensures no residual resources from the Helm deployment remain. ```bash kubectl delete namespace cognigy-ai ``` -------------------------------- ### Rollback: Restore Kustomize PVCs with kubectl Source: https://github.com/cognigy/documentation/blob/main/docs/ai/installation/migration/kustomize-to-helm-migration.md This command reapplies the PVC manifests that were used with the Kustomize installation. This step is part of the rollback process to re-establish the persistent storage configuration for the Kustomize deployment. ```bash kubectl apply -f redis-persistent-pvc-kustomize.yaml kubectl apply -f flow-modules-pvc-kustomize.yaml kubectl apply -f functions-pvc-kustomize.yaml ``` -------------------------------- ### Config Verb Example Source: https://github.com/cognigy/documentation/blob/main/docs/voice-gateway/references/verbs/config.md Example configuration for the 'config' verb, specifying synthesizer, recognizer, and barge-in settings. The verb is non-blocking. ```json { "verb": "config", "synthesizer": { "vendor": "microsoft", "language": "de-DE", "voice": "de-DE-KillianNeural" }, "recognizer": { "vendor": "google", "language": "de-DE" }, "bargeIn": { "enable": true, "input": [ "speech" ], "actionHook": "/userInput" } } ``` -------------------------------- ### Cognigy.AI API Authentication and Usage Source: https://github.com/cognigy/documentation/blob/main/docs/ai/developers/api-and-cli.md Details on how to authenticate with the Cognigy.AI API using API keys, either via query parameters or headers. It also provides an example of making a GET request to retrieve projects. ```APIDOC API Authentication and Usage: Authentication Methods: - Query Parameter: `api_key` with your API key as the value. - Header: `X-API-Key` with your API key set as the value. Example API Call: Assume API Base URL is `https://api-dummy.cognigy.ai` and API Key is `myDummyApiKey123`. To get a list of all projects assigned to the user: GET `https://api-dummy.cognigy.ai/projects?api_key=myDummyApiKey123` This call is used by the frontend when loading the **Main** page. ``` -------------------------------- ### Run Cognigy Documentation Server Locally (Mac) Source: https://github.com/cognigy/documentation/blob/main/contribution/overview.md Runs the Cognigy documentation server Docker image, specifically for Mac users. It includes the `--platform linux/amd64` flag to ensure compatibility on Apple Silicon Macs. ```bash docker run \ --rm \ -it \ -p 8000:8000 \ --name doc-server \ --mount type=bind,source="$(pwd)",target=/app --platform linux/amd64 \ doc-local:latest ``` -------------------------------- ### Clean-up: Delete Kustomize Services with kubectl Source: https://github.com/cognigy/documentation/blob/main/docs/ai/installation/migration/kustomize-to-helm-migration.md This command deletes services in the `default` namespace that are prefixed with 'service-'. This cleanup step removes any remaining service resources from the Kustomize installation after the Cognigy.AI Helm release is operational. ```bash for i in $(kubectl get service --namespace default --template '{{range .items}}{{.metadata.name}}{"\n"}{{end}}' | grep service-) du kubectl --namespace default delete service $i done ``` -------------------------------- ### xApps Architecture Explanation Example Source: https://github.com/cognigy/documentation/blob/main/docs/ai/empower/knowledge-ai/knowledge-source/text-formats/ctxt.md This example details the architecture of Cognigy xApps, explaining the interaction between the xApp Shell Page, service-static-files, serviceapp-session-manager, and databases. It includes metadata like URL and an image reference. ```markdown How is the xApps architecture designed? The xApp Shell Page loads its assets (HTML/CSS/JS) by requesting static files via HTTP/HTTPs 1.1 requests to service-static-files and establishes a WebSocket connection (via Socket.io) to serviceapp-session-manager to retrieve information about xApp sessions. This information includes an async event to initialize an xApp session, which creates a unique URL, and specifies which xApp will be displayed in a specific xApp session. The Elastic Load Balancer helps distribute incoming traffic, while Traefik dynamically routes traffic to backend servers based on specific requirements. The serviceapp-session-manager updates the xApp session state in the App Session DB, and the WebSocket transfers data to the Shell page, which loads xApps and provides data to the SDK. url: https://docs.cognigy.com/ai/xApp/architecture/ image: https://docs.cognigy.com/ai/images/xApp/architecture.png ```