Retrieves the name of the active agent for a given client session in a swarm.
This function fetches the name of the currently active agent associated with the specified client session within a swarm.
It validates the client session and swarm, logs the operation if enabled, and delegates the retrieval to the swarm public service.
The execution is wrapped in beginContext to ensure it runs outside of existing method and execution contexts, providing a clean execution environment.
Parameters
clientId: string
The unique identifier of the client session whose active agent name is being retrieved.
Returns Promise<string>
A promise that resolves to the name of the active agent (AgentName) associated with the client session.
Throws
If the client session is invalid, the swarm validation fails, or the swarm public service encounters an error during retrieval.
Retrieves the name of the active agent for a given client session in a swarm.
This function fetches the name of the currently active agent associated with the specified client session within a swarm. It validates the client session and swarm, logs the operation if enabled, and delegates the retrieval to the swarm public service. The execution is wrapped in
beginContext
to ensure it runs outside of existing method and execution contexts, providing a clean execution environment.