.
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.
.
.
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();
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.',
);
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.
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
});
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
});
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
});
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',
);
.
.