Represents targeting information for events (who the event is addressed to)
// Address to specific agentconst to1 = new To({ speakerUri: 'tag:example.com,2025:agent1'});// Private message to specific serviceconst to2 = new To({ serviceUrl: 'https://example.com/agent', private: true}); Copy
// Address to specific agentconst to1 = new To({ speakerUri: 'tag:example.com,2025:agent1'});// Private message to specific serviceconst to2 = new To({ serviceUrl: 'https://example.com/agent', private: true});
Creates a new To instance
To configuration options
Error if neither speakerUri nor serviceUrl is provided
Readonly
Optional
Convert to JSON string
Convert to plain object
Static
Represents targeting information for events (who the event is addressed to)
Example