Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The required property determines if authentication is mandatory to interact with the agent. When set to true, every attempt to communicate with the agent will trigger the authentication process, and if unsuccessful, an error message will be displayed. Setting the property to false makes authentication optional and users will be able to interact with the agent anonymously. While the agent can be restricted in its capabilities and the information it has access to, it will still respond to the anonymous user.

Each profile type may have its own set of related properties.

...

To access identity information inside of your agent routines, you must use session data. For instance, to access the user name inside of a routine, you will refer to it as follows: pjs.session.identity.name. This can then be used to limit the data that is being accessed or updated by the agent can retrieve or process.

Client-side Implementation

JWT tokens can be retrieved from client-side storage mechanisms like localStore, sessionStorage, cookies, or JavaScript variables. The Deploy this Agent Dialog in the Profound AI IDE helps construct the appropriate client-side code based on the setup of your agent.

...

If the token is wrapped in an arrow function like above, the agent will re-evaluate it with every interaction. This means within a Single Page Application, the user can log in or out and the agent will automatically recognize the new effective user without having to restart the conversation.