1.1.1 • Published 11 months ago

@bytebot/sdk v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Bytebot Node Library

npm shield fern shield

The Bytebot Node.js library provides access to the Bytebot API from JavaScript/TypeScript.

API Docs

You can find Bytebot's complete API docs at docs.bytebot.ai.

Installation

npm install --save @bytebot/sdk
# or
yarn add @bytebot/sdk

Usage

import { BytebotClient, Table, Column, Text } from "@bytebot/sdk";

const bytebot = new BytebotClient({
    apiKey: "YOUR_API_KEY",
});

async function run() {
    // Start a new session
    const startSessionResponse = await bytebot.browser.startSession("https://www.ycombinator.com/companies");
    const sessionId = startSessionResponse.sessionId;
    console.log("startSessionResponse", startSessionResponse);

    // Act actions
    await bytebot.browser.act({ sessionId, prompt: "Click on the W24 filter" }).then((res) => {
        console.log("act", res);
    });

    await bytebot.browser
        .extract({
            sessionId,
            schema: Table([
                Column("Company Name", Text("The name of the company")),
                Column("Company Description", Text("The description of the company")),
            ]),
        })
        .then((res) => {
            console.log("extract", res);
        });

    // End the session
    await bytebot.browser.endSession(sessionId);
}

run().catch(console.error);

Beta status

This SDK is in beta, and there will be breaking changes between versions without a major version update.

1.1.1

11 months ago

1.1.0

11 months ago

1.0.0

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.20

1 year ago

0.0.2

1 year ago

0.0.18

1 year ago