Skip to main content
The Agent Platform JavaScript SDK enables you to identify and use specific agents for web tasks.

Step 1: List available agents

Use the following command to display available agents.
const agents = await agent.listAgents();
console.log('Available agents:', agents);

Step 2: Use specific agent

Use the following command to select a specific agent from the list of available agents.
const task = await agent.run(
  'Complex e-commerce price comparison',
  { agentIdentifier: bestAgent?.agent_identifier }
);
For more information on H’s agents, see Agents.

Step 3: Select the best agent (Optional)

The command below selects the best agent for you based on the nature of your task and use case.
const bestAgent = await agent.getBestAgent('web');
I