Available Agent
Eko provides various built-in agents for different environments including:
Browser extension
BrowserAgent
Browser: Use browser agent to operate the browser.
import { Eko } from "@eko-ai/eko";import { BrowserAgent } from "@eko-ai/eko-extension";
let eko = new Eko({ llms: { default: { provider: "anthropic", model: "claude-3-7-sonnet", apiKey: "your_api_key" }, }, agents: [new BrowserAgent()],});
let result = await eko.run(` Open Twitter, search for "Fellou AI" and follow`);The agent is built-in with the following tools:
navigate_to: Navigate to a specific urlcurrent_page: Get the information of the current webpage (url, title)go_back: Navigate back in browser historyinput_text: Input text into an elementclick_element: Click on an element by indexscroll_to_element: Scroll to the elementscroll_mouse_wheel: Scroll the mouse wheel at current positionhover_to_element: Mouse hover over the elementextract_page_content: Extract the text content of the current webpageget_select_options: Get all options from a native dropdown elementselect_option: Select the native dropdown optionget_all_tabs: Get all tabs of the current browserswitch_tab: Switch to the specified tab pagewait: Wait for specified duration
Node.js
BrowserAgent
Browser: Use browser agent to operate the browser.
import { Eko } from "@eko-ai/eko";import { BrowserAgent } from "@eko-ai/eko-nodejs";
let eko = new Eko({ llms: { default: { provider: "anthropic", model: "claude-3-7-sonnet", apiKey: "your_api_key" }, }, agents: [new BrowserAgent()],});
let result = await eko.run(` Open Twitter, search for "Fellou AI" and follow`);FileAgent
File: Use file agent to operate the local file.
import { Eko } from "@eko-ai/eko";import { FileAgent } from "@eko-ai/eko-nodejs";
let eko = new Eko({ llms: { default: { provider: "anthropic", model: "claude-3-7-sonnet", apiKey: "your_api_key" }, }, agents: [new FileAgent()],});
let result = await eko.run(` Create a test.txt on the desktop and write hello eko.`);The agent is built-in with the following tools:
file_list: Getting a list of files in a specified directory.file_read: Read file content. Use to read files or check file content.file_write: Overwrite or append content to a file.file_str_replace: Replace specified string in a file.file_find_by_name: Find files by name pattern in specified directory.
Web
BrowserAgent
Browser: Use browser agent to operate the current page.
import { Eko } from "@eko-ai/eko";import { BrowserAgent } from "@eko-ai/eko-web";
let eko = new Eko({ llms: { default: { provider: "anthropic", model: "claude-3-7-sonnet", apiKey: "your_api_key" }, }, agents: [new BrowserAgent()],});
let result = await eko.run(` Find the text box and enter hello eko`);