How to Use
-
Make sure you configured an Agent Copilot URL using the following pattern:
https://${AgentCopilotBaseUrl}/?userId=${userId}&sessionId=${sessionId}&URLToken=${URLToken}. For the configuration details, refer to the Agent Copilot URL section. -
Pass this URL along with the handover to the human agent:
- For native integrations, the embedded version is supported automatically.
- For custom integrations, include the link in your handover configuration and embed it via iFrame:
- If you are using a voice use case, check the Transfer Node in your Flow and ensure the UUIValue is forwarded via SIP headers during the transfer to the human agent.
Secure Access with JWT
You can secure access to Agent Copilot by passing a JWT in the URL. This approach ensures that only authenticated users can open the Agent Copilot workspace.auth is the JWT used for authentication.
In the Copilot section of the Endpoint settings, you can control how the JWT is verified with the Authentication and Accept Only JWT Requests. The following methods support JWT authentication:
- Default (built-in) — Agent Copilot handles the JWT authentication between the contact center platform and Cognigy. Activate Accept Only JWT Requests in the Endpoint settings.
- Token Secret — the contact center and Cognigy share a 256-bit JWT secret. Configure it by selecting or creating a connection in the Agent Copilot Authentication field. The contact center platform must sign the JWT with the shared secret before passing it in the URL.
- Public Key — enter one or more PEM-encoded public keys into the Public Keys field. The JWT must be signed with the corresponding private key. Multiple keys are supported to allow for key rotation.
- Key Store — provide a JWKS URL in the Key Store URL field. The Agent Copilot backend retrieves the public key from the key store using the
kidclaim in the JWT header.
- Creates values for
userIdandsessionId. - Uses
URLTokenfrom the respective Cognigy Endpoint. - Reads the signing key from an internal storage.
- Signs a JWT with a payload containing the
userIdandsessionId.
- Checks if the
authparameter is passed in the URL. - If
authis passed, the value is treated as a JWT and the Agent Copilot backend verifies the JWT signature using the configured authentication method. - During verification, Agent Copilot decodes the payload of the JWT to retrieve the
userIdandsessionIdparameters, and readsURLTokenfrom the URL query string.