@eko-ai/eko 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -21
- package/dist/core/eko.d.ts +3 -2
- package/dist/extension/content/index.d.ts +1 -0
- package/dist/extension/tools/browser.d.ts +2 -1
- package/dist/extension/tools/get_all_tabs.d.ts +9 -0
- package/dist/extension/tools/index.d.ts +4 -1
- package/dist/extension/tools/request_login.d.ts +10 -0
- package/dist/extension/tools/tab_management.d.ts +1 -1
- package/dist/extension/utils.d.ts +2 -1
- package/dist/extension.cjs.js +797 -209
- package/dist/extension.esm.js +797 -209
- package/dist/extension_content_script.js +129 -2
- package/dist/index.cjs.js +518 -114
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +518 -115
- package/dist/models/action.d.ts +9 -4
- package/dist/models/workflow.d.ts +8 -3
- package/dist/nodejs/script/build_dom_tree.d.ts +1 -0
- package/dist/nodejs/tools/browser_use.d.ts +28 -0
- package/dist/nodejs/tools/index.d.ts +2 -0
- package/dist/nodejs.cjs.js +71638 -12
- package/dist/nodejs.esm.js +71632 -6
- package/dist/schemas/workflow.schema.d.ts +2 -13
- package/dist/services/llm/claude-provider.d.ts +2 -1
- package/dist/services/llm/openai-provider.d.ts +2 -1
- package/dist/services/parser/workflow-parser.d.ts +0 -7
- package/dist/types/action.types.d.ts +8 -3
- package/dist/types/tools.types.d.ts +44 -1
- package/dist/types/workflow.types.d.ts +22 -9
- package/dist/universal_tools/cancel_workflow.d.ts +9 -0
- package/dist/universal_tools/human.d.ts +30 -0
- package/dist/universal_tools/index.d.ts +4 -0
- package/dist/universal_tools/summary_workflow.d.ts +9 -0
- package/dist/utils/execution-logger.d.ts +69 -0
- package/dist/web/tools/browser.d.ts +2 -1
- package/dist/web.cjs.js +29 -17
- package/dist/web.esm.js +29 -17
- package/package.json +6 -9
package/README.md
CHANGED
|
@@ -1,17 +1,31 @@
|
|
|
1
|
-
# Eko
|
|
2
1
|
|
|
3
|
-
[](LICENSE) [](https://example.com/build-status) [](https://eko.fellou.ai/docs/release/versions/)
|
|
4
2
|
|
|
5
|
-
**Eko** is a revolutionary framework designed to empower developers and users alike to program their browser and operating system using natural language. With seamless integration of browser APIs, OS-level capabilities, and cutting-edge AI tools like Claude 3.5, Eko redefines how we interact with technology, making it intuitive, powerful, and accessible.
|
|
6
3
|
|
|
7
|
-
|
|
4
|
+
<h1 align="center">
|
|
5
|
+
<a href="https://github.com/FellouAI/eko" target="_blank">
|
|
6
|
+
<img src="https://github.com/user-attachments/assets/55dbdd6c-2b08-4e5f-a841-8fea7c2a0b92" alt="eko-logo" width="200" height="200">
|
|
7
|
+
</a>
|
|
8
|
+
<br>
|
|
9
|
+
<small>Eko - Build Production-ready Agentic Workflow with Natural Language</small>
|
|
10
|
+
</h1>
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
- **
|
|
14
|
-
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
[](LICENSE) [](https://example.com/build-status) [](https://eko.fellou.ai/docs/release/versions/)
|
|
15
|
+
|
|
16
|
+
Eko (pronounced like ‘echo’) is a production-ready JavaScript framework that enables developers to create reliable agents, **from simple commands to complex workflows**. It provides a unified interface for running agents in both **computer and browser environments**.
|
|
17
|
+
|
|
18
|
+
# Framework Comparison
|
|
19
|
+
|
|
20
|
+
| Feature | Eko | Langchain | Browser-use | Dify.ai | Coze |
|
|
21
|
+
|--------------------------------------|-------|------------|--------------|----------|--------|
|
|
22
|
+
| **Supported Platform** | **All platform** | Server side | Browser | Web | Web |
|
|
23
|
+
| **One sentence to multi-step workflow** | ✅ | ❌ | ✅ | ❌ | ❌ |
|
|
24
|
+
| **Intervenability** | ✅ | ✅ | ❌ | ❌ | ❌ |
|
|
25
|
+
| **Development Efficiency** | **High** | Low | Middle | Middle | Low |
|
|
26
|
+
| **Task Complexity** | **High** | High | Low | Middle | Middle | Middle |
|
|
27
|
+
| **Open-source** | ✅ | ✅ | ✅ | ✅ | ❌ |
|
|
28
|
+
| **Access to private web resources** | ✅ | ❌ | ❌ | ❌ | ❌ |
|
|
15
29
|
|
|
16
30
|
## Quickstart
|
|
17
31
|
|
|
@@ -19,7 +33,7 @@
|
|
|
19
33
|
npm install @eko-ai/eko
|
|
20
34
|
```
|
|
21
35
|
|
|
22
|
-
>
|
|
36
|
+
> For detailed usage, please refer to the [Eko Quickstart guide](https://eko.fellou.ai/docs/getting-started/quickstart/).
|
|
23
37
|
|
|
24
38
|
```typescript
|
|
25
39
|
import { Eko } from '@eko-ai/eko';
|
|
@@ -38,6 +52,46 @@ await eko.execute(sysWorkflow);
|
|
|
38
52
|
|
|
39
53
|
```
|
|
40
54
|
|
|
55
|
+
## Demos
|
|
56
|
+
|
|
57
|
+
**Prompt:** `Collect the latest NASDAQ data on Yahoo Finance, including price changes, market capitalization, trading volume of major stocks, analyze the data and generate visualization reports`.
|
|
58
|
+
|
|
59
|
+
https://github.com/user-attachments/assets/4087b370-8eb8-4346-a549-c4ce4d1efec3
|
|
60
|
+
|
|
61
|
+
Click [here](https://github.com/FellouAI/eko-demos/tree/main/browser-extension-stock) to get the source code.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
**Prompt:** `Based on the README of FellouAI/eko on github, search for competitors, highlight the key contributions of Eko, write a blog post advertising Eko, and post it on Write.as.`
|
|
66
|
+
|
|
67
|
+
https://github.com/user-attachments/assets/6feaea86-2fb9-4e5c-b510-479c2473d810
|
|
68
|
+
|
|
69
|
+
Click [here](https://github.com/FellouAI/eko-demos/tree/main/browser-extension-blog) to get the source code.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
**Prompt:** `Clean up all files in the current directory larger than 1MB`
|
|
74
|
+
|
|
75
|
+
https://github.com/user-attachments/assets/ef7feb58-3ddd-4296-a1de-bb8b6c66e48b
|
|
76
|
+
|
|
77
|
+
Click [here](https://eko.fellou.ai/docs/computeruse/computer-node/#example-file-cleanup-workflow) to Learn more.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
**Prompt:** Automatic software testing
|
|
82
|
+
```
|
|
83
|
+
Current login page automation test:
|
|
84
|
+
1. Correct account and password are: admin / 666666
|
|
85
|
+
2. Please randomly combine usernames and passwords for testing to verify if login validation works properly, such as: username cannot be empty, password cannot be empty, incorrect username, incorrect password
|
|
86
|
+
3. Finally, try to login with the correct account and password to verify if login is successful
|
|
87
|
+
4. Generate test report and export
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
https://github.com/user-attachments/assets/7716300a-c51d-41f1-8d4f-e3f593c1b6d5
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
Click [here](https://eko.fellou.ai/docs/browseruse/browser-web#example-login-automation-testing) to Learn more.
|
|
94
|
+
|
|
41
95
|
## Use Cases
|
|
42
96
|
|
|
43
97
|
- Browser automation and web scraping
|
|
@@ -64,24 +118,21 @@ Eko can be used in multiple environments:
|
|
|
64
118
|
- Browser Extension
|
|
65
119
|
- Web Applications
|
|
66
120
|
- Node.js Applications
|
|
67
|
-
- [Fellou AI Browser](https://fellou.ai)
|
|
68
121
|
|
|
69
122
|
## Community and Support
|
|
70
123
|
|
|
71
124
|
- Report issues on [GitHub Issues](https://github.com/FellouAI/eko/issues)
|
|
125
|
+
- Join our [slack community discussions](https://join.slack.com/t/eko-ai/shared_invite/zt-2xhvkudv9-nHvD1g8Smp227sM51x_Meg)
|
|
72
126
|
- Contribute tools and improvements
|
|
73
127
|
- Share your use cases and feedback
|
|
74
|
-
- Join our community discussions
|
|
75
|
-
|
|
76
|
-
## Contributing
|
|
77
128
|
|
|
78
|
-
|
|
129
|
+
<h1 align="center">
|
|
130
|
+
<a href="https://github.com/FellouAI/eko" target="_blank">
|
|
131
|
+
<img width="699" alt="Screenshot 2025-01-22 at 6 41 57 PM" src="https://github.com/user-attachments/assets/88320cc9-1755-4f21-913b-2bfc909e781d" />
|
|
132
|
+
</a>
|
|
133
|
+
</h1>
|
|
79
134
|
|
|
80
|
-
|
|
81
|
-
- Code style guidelines
|
|
82
|
-
- Submission process
|
|
83
|
-
- Tool development
|
|
84
|
-
- Use case optimization
|
|
135
|
+
[](https://star-history.com/#FellouAI/eko&Date)
|
|
85
136
|
|
|
86
137
|
## License
|
|
87
138
|
|
package/dist/core/eko.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EkoConfig, EkoInvokeParam, Tool, Workflow, WorkflowCallback } from '../types';
|
|
1
|
+
import { EkoConfig, EkoInvokeParam, Tool, Workflow, WorkflowCallback, NodeOutput } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Eko core
|
|
4
4
|
*/
|
|
@@ -9,7 +9,8 @@ export declare class Eko {
|
|
|
9
9
|
private workflowGeneratorMap;
|
|
10
10
|
constructor(config: EkoConfig);
|
|
11
11
|
generate(prompt: string, param?: EkoInvokeParam): Promise<Workflow>;
|
|
12
|
-
execute(workflow: Workflow, callback?: WorkflowCallback): Promise<
|
|
12
|
+
execute(workflow: Workflow, callback?: WorkflowCallback): Promise<NodeOutput[]>;
|
|
13
|
+
cancel(workflow: Workflow): Promise<void>;
|
|
13
14
|
modify(workflow: Workflow, prompt: string): Promise<Workflow>;
|
|
14
15
|
private getTool;
|
|
15
16
|
callTool(toolName: string, input: object, callback?: WorkflowCallback): Promise<any>;
|
|
@@ -10,7 +10,8 @@ export declare function right_click(tabId: number, coordinate?: [number, number]
|
|
|
10
10
|
export declare function right_click_by(tabId: number, xpath?: string, highlightIndex?: number): Promise<any>;
|
|
11
11
|
export declare function double_click(tabId: number, coordinate?: [number, number]): Promise<any>;
|
|
12
12
|
export declare function double_click_by(tabId: number, xpath?: string, highlightIndex?: number): Promise<any>;
|
|
13
|
-
export declare function screenshot(windowId: number): Promise<ScreenshotResult>;
|
|
13
|
+
export declare function screenshot(windowId: number, compress?: boolean): Promise<ScreenshotResult>;
|
|
14
|
+
export declare function compress_image(dataUrl: string, scale?: number, quality?: number): Promise<string>;
|
|
14
15
|
export declare function scroll_to(tabId: number, coordinate: [number, number]): Promise<any>;
|
|
15
16
|
export declare function scroll_to_by(tabId: number, xpath?: string, highlightIndex?: number): Promise<any>;
|
|
16
17
|
export declare function get_dropdown_options(tabId: number, xpath?: string, highlightIndex?: number): Promise<any>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BrowserTab } from '../../types/tools.types';
|
|
2
|
+
import { Tool, InputSchema, ExecutionContext } from '../../types/action.types';
|
|
3
|
+
export declare class GetAllTabs implements Tool<any, BrowserTab[]> {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
input_schema: InputSchema;
|
|
7
|
+
constructor();
|
|
8
|
+
execute(context: ExecutionContext, params: any): Promise<BrowserTab[]>;
|
|
9
|
+
}
|
|
@@ -3,8 +3,11 @@ import { ElementClick } from './element_click';
|
|
|
3
3
|
import { ExportFile } from './export_file';
|
|
4
4
|
import { ExtractContent } from './extract_content';
|
|
5
5
|
import { FindElementPosition } from './find_element_position';
|
|
6
|
+
import { GetAllTabs } from './get_all_tabs';
|
|
6
7
|
import { OpenUrl } from './open_url';
|
|
7
8
|
import { Screenshot } from './screenshot';
|
|
8
9
|
import { TabManagement } from './tab_management';
|
|
9
10
|
import { WebSearch } from './web_search';
|
|
10
|
-
|
|
11
|
+
import { RequestLogin } from './request_login';
|
|
12
|
+
export * from '../../universal_tools';
|
|
13
|
+
export { BrowserUse, ElementClick, ExportFile, ExtractContent, FindElementPosition, OpenUrl, GetAllTabs, Screenshot, TabManagement, WebSearch, RequestLogin, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Tool, InputSchema, ExecutionContext } from '../../types/action.types';
|
|
2
|
+
export declare class RequestLogin implements Tool<any, any> {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
input_schema: InputSchema;
|
|
6
|
+
constructor();
|
|
7
|
+
execute(context: ExecutionContext, params: any): Promise<any>;
|
|
8
|
+
awaitLogin(tabId: number, task_id: string): Promise<boolean>;
|
|
9
|
+
isLoginIn(context: ExecutionContext): Promise<boolean>;
|
|
10
|
+
}
|
|
@@ -11,7 +11,7 @@ export declare class TabManagement implements Tool<TabManagementParam, TabManage
|
|
|
11
11
|
/**
|
|
12
12
|
* Tab management
|
|
13
13
|
*
|
|
14
|
-
* @param {*} params {
|
|
14
|
+
* @param {*} params { command: `new_tab [url]` | 'tab_all' | 'current_tab' | 'go_back' | 'close_tab' | 'switch_tab [tabId]' | `change_url [url]` }
|
|
15
15
|
* @returns > { result, success: true }
|
|
16
16
|
*/
|
|
17
17
|
execute(context: ExecutionContext, params: TabManagementParam): Promise<TabManagementResult>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ExecutionContext } from '../types/action.types';
|
|
2
2
|
export declare function getWindowId(context: ExecutionContext): Promise<number>;
|
|
3
3
|
export declare function getTabId(context: ExecutionContext): Promise<number>;
|
|
4
|
-
export declare function getCurrentTabId(windowId?: number
|
|
4
|
+
export declare function getCurrentTabId(windowId?: number): Promise<number>;
|
|
5
5
|
export declare function open_new_tab(url: string, newWindow: boolean, windowId?: number): Promise<chrome.tabs.Tab>;
|
|
6
6
|
export declare function executeScript(tabId: number, func: any, args: any[]): Promise<any>;
|
|
7
7
|
export declare function waitForTabComplete(tabId: number, timeout?: number): Promise<chrome.tabs.Tab>;
|
|
8
|
+
export declare function doesTabExists(tabId: number): Promise<unknown>;
|
|
8
9
|
export declare function getPageSize(tabId?: number): Promise<[number, number]>;
|
|
9
10
|
export declare function sleep(time: number): Promise<void>;
|
|
10
11
|
export declare function injectScript(tabId: number, filename?: string): Promise<void>;
|