Skip to content

Latest commit

 

History

History
59 lines (30 loc) · 2.59 KB

File metadata and controls

59 lines (30 loc) · 2.59 KB

summary

End an existing programmatic agent preview session and get trace location.

description

You must have previously started a programmatic agent preview session with the "agent preview start" command to then use this command to end it. This command also displays the local directory where the session trace files are stored.

Use the session ID from agent preview start with the --session-id flag to end the session. Omit --session-id if the agent has only one active preview session. You must also use either the --authoring-bundle or --api-name flag to specify the API name of the authoring bundle or the published agent, respectively. To find either API name, navigate to your package directory in your DX project. The API name of an authoring bundle is the same as its directory name under the "aiAuthoringBundles" metadata directory. Similarly, the published agent's API name is the same as its directory name under the "Bots" metadata directory.

flags.session-id.summary

Session ID outputted by "agent preview start". Not required when the agent has exactly one active session. Run "agent preview sessions" to see the list of all sessions.

flags.api-name.summary

API name of the activated published agent you want to preview.

flags.authoring-bundle.summary

API name of the authoring bundle metadata component that contains the agent's Agent Script file.

error.noSession

No agent preview session found. Run "sf agent preview start" to start a new agent preview session.

error.multipleSessions

Multiple preview sessions found for this agent. Use the --session-id flag to identify a specific session. Sessions: %s

error.agentNotFound

Agent '%s' not found. Check that the API name is correct and that the agent exists in your org or project.

error.sessionInvalid

Preview session '%s' is invalid or has expired.

error.endFailed

Failed to end preview session: %s

output.tracesPath

Session traces: %s

examples

  • End a preview session of a published agent by specifying its session ID and API name ; use the default org:

    <%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --api-name My_Published_Agent

  • Similar to previous example, but don't specify a session ID; you get an error if the published agent has more than one active session. Use the org with alias "my-dev-org":

    <%= config.bin %> <%= command.id %> --api-name My_Published_Agent --target-org my-dev-org

  • End a preview session of an agent using its authoring bundle API name; you get an error if the agent has more than one active session.

    <%= config.bin %> <%= command.id %> --authoring-bundle My_Local_Agent