Skip to content

Open source version of OpenAI Operator - Ask your browser to perform highlevel tasks

License

Notifications You must be signed in to change notification settings

agentlabs-dev/openator

Repository files navigation

Openator

.

Openator is a state-of-the-art browser agent tool that is capable of planning and executing actions formulated in natural language.

This project is under active development and any help or support is welcome.

License version Docker Image CI

.

🌟 Give us some love by starring this repository! 🌟

.

Quick Start

Install the package using npm or yarn.

npm i openator

Spin up your first agent with a task.

import { initOpenator, ChatOpenAI } from 'openator';

const main = async () => {
  const llm = new ChatOpenAI({
    apiKey: process.env.OPENAI_API_KEY!,
  });

  const openator = initOpenator({
    llm,
    headless: false,
  });

  await openator.start(
    'https://amazon.com',
    'Find a black wirelesskeyboard and return the price.',
  );
};

main();

Add Secrets and Variables

Optionally, you can add variables and secrets to your agent. These variables will be interpolated during runtime by the agent.

This is especially helpful if you want to pass more context to the agent, such as a username and a password.

import { initOpenator, Variable, ChatOpenAI } from 'openator';

const llm = new ChatOpenAI({
  apiKey: process.env.OPENAI_API_KEY!,
});

const openator = initOpenator({
  headless: false,
  llm,
  variables: [
    new Variable({
      name: 'username',
      value: 'my username',
      isSecret: false,
    }),
    new Variable({
      name: 'password',
      value: process.env.PASSWORD,
      isSecret: true,
    }),
  ],
});

await openator.start(
  'https://my-website.com',
  'Authenticate with the username {{username}} and password {{password}} and then find the latest news on the website.',
);

Available LLM Providers

Optionally you can configure the LLM to use different models or configurations.

We support the following models:

Platform Supported models Advised model
OpenAI gpt-4o, gpt-4o-mini, gpt-4-turbo gpt-4o
Ollama qwen2.5, llama3.2 -
GoogleGenerativeAI gemini-2.0-flash, gemini-2.0-flash-lite, gemini-1.5-flash -

Note that we benchmarked the performance of Openator on OpenAI gpt-4o and we recommend using it. While you can try other models, we haven't battled-tested them yet.

OpenAIChat

Here's the configuration type for the ChatOpenAI provider.

import { ChatOpenAI } from 'openator';

const llm = new ChatOpenAI({
  apiKey: process.env.OPENAI_API_KEY!,
  model: 'gpt-4o',
  temperature: 0, // optional
  maxRetries: 3, // optional
  maxConcurrency: 1, // optional
});

OllamaChat

import { ChatOllama } from 'openator';

const llm = new ChatOllama({
  model: 'qwen2.5',
  temperature: 0, // optional
  maxRetries: 3, // optional
  maxConcurrency: 1, // optional
  baseUrl: 'http://localhost:11434', // optional
});

GoogleGenerativeAI

import { ChatGoogleGenAI } from 'openator';

const llm = new ChatGoogleGenAI({
  model: 'gemini-2.0-flash',
  apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY!,
  temperature: 0, // optional
  maxRetries: 3, // optional
  maxConcurrency: 1, // optional
});

Demo

Here is what you can build with Openator, you can find more examples and source code in our main repository. The frontend is not included but can be found in our open-source repository.

Example task:

await openator.start(
  'https://amazon.com',
  'Purchase a black wireless keyboard',
);

agentlabs.dev

How it works

agentlabs.dev

.

🌟 Give us some love by starring this repository! 🌟

.

About

Open source version of OpenAI Operator - Ask your browser to perform highlevel tasks

Resources

License

Stars

Watchers

Forks

Packages

No packages published