Skip to main content
Secret values allow you to securely pass credentials, API keys, and other sensitive data to AI agents during task execution. These values are not logged or stored anywhere.

Basic Usage

import Anchorbrowser from 'anchorbrowser';

(async () => {
  const anchorClient = new Anchorbrowser({
    apiKey: process.env.ANCHORBROWSER_API_KEY
  });

  const response = await anchorClient.agent.task(
    'Login to linkedin, approve all friend requests, search for "Anchorbrowser" and send a connection request',
    {
      taskOptions: {
        url: 'https://linkedin.com',
        secretValues: {
          LINKEDIN_EMAIL: process.env.LINKEDIN_EMAIL,
          LINKEDIN_PASSWORD: process.env.LINKEDIN_PASSWORD
        }
      }
    }
  );

  console.log(response);
})();
Secret values are the recommended way to handle any sensitive data in AI agent tasks. Never include credentials directly in prompts or system messages.