diff --git a/messages/agent.preview.end.md b/messages/agent.preview.end.md index ad25725..09a4d2f 100644 --- a/messages/agent.preview.end.md +++ b/messages/agent.preview.end.md @@ -1,30 +1,32 @@ # summary -End a preview session and get trace location (beta). +End an existing programmatic agent preview session and get trace location. # description -End an existing preview session and print the local path where session traces are stored. Use the session ID returned by "agent preview start". Specify the same agent with --api-name or --authoring-bundle as used when starting the session; one is required. +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. + +The original "agent preview start" command outputs a session ID which you then use with the --session-id flag of this command to end the session. You don't have to specify the --session-id flag if an 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, respecitvely. 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 from "agent preview start". Omit when the agent has exactly one active session. +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 or ID of the published agent. +API name of the activated published agent you want to preview. # flags.authoring-bundle.summary -API name of the authoring bundle (Agent Script). +API name of the authoring bundle metadata component that contains the agent's Agent Script file. # error.noSession -No preview session found. Run "sf agent preview start" first. +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. Specify --session-id. Sessions: %s +Multiple preview sessions found for this agent. Use the --session-id flag to identify a specific session. Sessions: %s # output.tracesPath @@ -32,14 +34,14 @@ Session traces: %s # examples -- End the single active preview session for a simulated agent: +- End a preview session of a published agent by specifying its session ID and API name ; use the default org: - <%= config.bin %> <%= command.id %> --target-org my-dev-org --authoring-bundle My_Local + <%= config.bin %> <%= command.id %> --session-id --api-name My_Published_Agent -- End the single active preview session for a 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 %> --target-org my-dev-org --api-name My_Published_Agent + <%= config.bin %> <%= command.id %> --api-name My_Published_Agent --target-org my-dev-org -- End a specific session when multiple exist: +- 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 %> --session-id --target-org my-dev-org + <%= config.bin %> <%= command.id %> --authoring-bundle My_Local_Agent diff --git a/messages/agent.preview.md b/messages/agent.preview.md index 0e62bfa..d4d38ea 100644 --- a/messages/agent.preview.md +++ b/messages/agent.preview.md @@ -21,7 +21,7 @@ When the session concludes, the command asks if you want to save the API respons # flags.api-name.summary -API name of the published and active agent you want to interact with. +API name of the activated published agent you want to interact with. # flags.authoring-bundle.summary diff --git a/messages/agent.preview.send.md b/messages/agent.preview.send.md index 187d4fc..428ce76 100644 --- a/messages/agent.preview.send.md +++ b/messages/agent.preview.send.md @@ -1,45 +1,47 @@ # summary -Send a message in a preview session (beta). +Send a message to an existing agent preview session. # description -Send an utterance to an existing preview session and get the agent response. Use the session ID returned by "agent preview start". Specify the same agent with --api-name or --authoring-bundle as used when starting the session; one is required. +You must have previously started a programmatic agent preview session with the "agent preview start" command to then use this command to send the agent a message (utterance). This command then displays the agent's response. + +The original "agent preview start" command outputs a session ID which you then use with the --session-id flag of this command to send a message. You don't have to specify the --session-id flag if an 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, respecitvely. 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 from "agent preview start". Omit when the agent has exactly one active session. +Session ID outputted by "agent preview start". Not required when the agent has exactly one active session. Run "agent preview sessions" to see list of all sessions. # flags.utterance.summary -Utterance to send to the agent. +Utterance to send to the agent, enclosed in double quotes. # flags.api-name.summary -API name or ID of the published agent. +API name of the activated published agent you want to preview. # flags.authoring-bundle.summary -API name of the authoring bundle (Agent Script). +API name of the authoring bundle metadata component that contains the agent's Agent Script file. # error.noSession -No preview session found. Run "sf agent preview start" first. +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. Specify --session-id. Sessions: %s +Multiple preview sessions found for this agent. Use the --session-id flag to identify a specific session. Sessions: %s # examples -- Send a message to a simulated Agent: +- Send a message to an activated published agent using its API name and session ID; use the default org: - <%= config.bin %> <%= command.id %> --utterance "What can you help me with?" --authoring-bundle My_Agent + <%= config.bin %> <%= command.id %> --utterance "What can you help me with?" --api-name My_Published_Agent --session-id -Send a message to a published Agent: +- Similar to previous example, but don't specify a session ID; you get an error if the agent has more than one active session. Use the org with alias "my-dev-org": -<%= config.bin %> <%= command.id %> --utterance "What can you help me with?" --api-name My_Published_Agent + <%= config.bin %> <%= command.id %> --utterance "What can you help me with?" --api-name My_Published_Agent --target-org my-dev-org -- Send to a specific session when multiple exist: +- Send a message to 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 %> --session-id --utterance "What can you help me with?" --target-org my-dev-org + <%= config.bin %> <%= command.id %> --utterance "what can you help me with?" --authoring-bundle My_Local_Agent diff --git a/messages/agent.preview.sessions.md b/messages/agent.preview.sessions.md index ac064d1..27dc69c 100644 --- a/messages/agent.preview.sessions.md +++ b/messages/agent.preview.sessions.md @@ -1,14 +1,16 @@ # summary -List cached preview sessions (beta). +List all known programmatic agent preview sessions. # description -List preview sessions that were started with "agent preview start" and are still in the cache. Use this to see which sessions exist so you can end them with "agent preview end" (e.g. to clean up or resolve "multiple sessions" when using send without --session-id). Agent ID is the authoring bundle name for Agent Script agents, or the agent ID for published agents. +This command lists the agent preview sessions that were started with the "agent preview start" command and are still in the local cache. Use this command to discover specific session IDs that you can pass to the "agent preview send" or "agent preview end" commands with the --session-id flag. + +Programmatic agent preview sessions can be started for both published activated agents and by using an agent's local authoring bundle, which contains its Agent Script file. In this command's output table, the Agent column contains either the API name of the authoring bundle or the published agent, whichever was used when starting the session. In the table, if the same API name has multiple rows with different session IDs, then it means that you previously started multiple preview sessions with the associated agent. # output.empty -No cached preview sessions found. +No cached agent preview sessions found. # output.tableHeader.agent @@ -20,6 +22,6 @@ Session ID # examples -- List all cached preview sessions: +- List all cached agent preview sessions: - <%= config.bin %> <%= command.id %> + <%= config.bin %> <%= command.id %> diff --git a/messages/agent.preview.start.md b/messages/agent.preview.start.md index 4a70b00..3d84016 100644 --- a/messages/agent.preview.start.md +++ b/messages/agent.preview.start.md @@ -1,22 +1,26 @@ # summary -Start a programmatic preview session (beta). +Start a programmatic agent preview session. # description -Start an agent preview session and get a session ID. Use the session ID with "agent preview send" and "agent preview end". Specify the agent with --api-name (published agent) or --authoring-bundle (Agent Script); one is required. Use --use-live-actions for live mode; otherwise preview uses mock (simulated) actions. +This command outputs a session ID that you then use with the "agent preview send" command to send an utterance to the agent. Use the "agent preview sessions" command to list all active sessions and the "agent preview end" command to end a specific session. + +Identify the agent you want to start previewing with either the --authoring-bundle flag to specify a local authoring bundle's API name or --api-name to specify an activated published agent's API name. 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. + +When starting a preview session using the authoring bundle, which contains the agent's Agent Script file, the preview uses mocked actions by default. Specify --use-live-actions for live mode, which uses the real Apex classes, flows, etc, in the org for the actions. # flags.api-name.summary -API name or ID of the published agent. +API name of the activated published agent you want to preview. # flags.authoring-bundle.summary -API name of the authoring bundle (Agent Script) to preview. +API name of the authoring bundle metadata component that contains the agent's Agent Script file. # flags.use-live-actions.summary -Use real actions in the org; if not specified, preview uses mock (simulated) actions. +Use real actions in the org; if not specified, preview uses AI to simulate (mock) actions. # output.sessionId @@ -24,14 +28,14 @@ Session ID: %s # examples -- Start a preview session with an authoring bundle and use mock actions: +- Start a programmatic agent preview session by specifying an authoring bundle; uses mocked actions by default. Use the org with alias "my-dev-org": - <%= config.bin %> <%= command.id %> --authoring-bundle My_Agent_Bundle --target-org my-dev-org + <%= config.bin %> <%= command.id %> --authoring-bundle My_Agent_Bundle --target-org my-dev-org -- Start a preview session with an authoring bundle and use real actions: +- Similar to previous example but use live actions and the default org: - <%= config.bin %> <%= command.id %> --authoring-bundle My_Agent_Bundle --use-live-actions --target-org my-dev-org + <%= config.bin %> <%= command.id %> --authoring-bundle My_Agent_Bundle --use-live-actions -- Start a preview session with a published agent: +- Start a preview session with an activated published agent: - <%= config.bin %> <%= command.id %> --api-name My_Published_Agent + <%= config.bin %> <%= command.id %> --api-name My_Published_Agent