overai 1.4.2 β 1.4.3
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 +60 -201
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -1,257 +1,116 @@
|
|
|
1
1
|
# OverAI TypeScript Node.js AI Agents Framework
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/overai)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://github.com/MervinPraison/PraisonAI/actions)
|
|
6
|
+
[](https://www.npmjs.com/package/overai)
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
**OverAI** is the production-ready Multi AI Agents framework that lets you **Build, Deploy, and Monetize** AI agents. From simple automation scripts to full-fledged AI SaaS platforms with billing and API keys, OverAI handles the complexity so you can focus on the business logic.
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
## π Why OverAI?
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
- **True Multi-Agent Collaboration**: Agents don't just pass data; they communicate, delegate tasks, critique each other's work, and solve problems iteratively.
|
|
11
|
-
- **Production-Grade Engineering**: Built for developers. Benefit from Git version control, TypeScript type safety, CI/CD integration, and easy debuggingβthings that are hard to do with visual drag-and-drop tools.
|
|
12
|
-
- **Deep Embedding**: Don't just call an external webhook. Embed powerful AI agents directly into your existing backend services and APIs.
|
|
12
|
+
Stop stitching together disparate tools. OverAI provides a unified "Business-in-a-Box" framework for AI developers:
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- **π° Built-in Monetization**: Includes ready-to-use SaaS templates with **Stripe integration** and **Credit Systems**.
|
|
15
|
+
- **π Enterprise Integrations**: Native support for **N8N workflows**, **MCP Servers**, and **Slack**.
|
|
16
|
+
- **π§ Code-First Autonomy**: Define complex, dynamic agent behaviors using standard TypeScript/JavaScript.
|
|
17
|
+
- **π€ True Multi-Agent Collaboration**: Agents that communicate, delegate, and solve problems together.
|
|
18
|
+
- **π‘οΈ Production-Grade**: Type-safe, CI/CD friendly, and scalable.
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
npm install overai
|
|
18
|
-
```
|
|
20
|
+
---
|
|
19
21
|
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
1. Clone the repository:
|
|
23
|
-
```bash
|
|
24
|
-
git clone https://github.com/your-username/overai.git
|
|
25
|
-
cd overai
|
|
26
|
-
```
|
|
22
|
+
## π¦ Installation
|
|
27
23
|
|
|
28
|
-
2. Install dependencies:
|
|
29
24
|
```bash
|
|
30
|
-
npm install
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
3. Build the package:
|
|
34
|
-
```bash
|
|
35
|
-
npm run build
|
|
25
|
+
npm install overai
|
|
36
26
|
```
|
|
37
27
|
|
|
38
|
-
##
|
|
39
|
-
|
|
40
|
-
Here are examples of different ways to use OverAI:
|
|
41
|
-
|
|
42
|
-
### 1. Single Agent Example
|
|
28
|
+
## β‘ Quick Start: Your First Agent
|
|
43
29
|
|
|
44
30
|
```typescript
|
|
45
31
|
import { Agent, OverAI } from 'overai';
|
|
46
32
|
|
|
47
33
|
async function main() {
|
|
48
|
-
// Create a simple agent (no task specified)
|
|
49
34
|
const agent = new Agent({
|
|
50
|
-
name: "
|
|
51
|
-
instructions: "
|
|
35
|
+
name: "Helper",
|
|
36
|
+
instructions: "You are a helpful assistant.",
|
|
52
37
|
verbose: true
|
|
53
38
|
});
|
|
54
39
|
|
|
55
|
-
// Run the agent
|
|
56
40
|
const overAI = new OverAI({
|
|
57
41
|
agents: [agent],
|
|
58
|
-
tasks: ["
|
|
42
|
+
tasks: ["Say hello and introduce yourself."],
|
|
59
43
|
verbose: true
|
|
60
44
|
});
|
|
61
45
|
|
|
62
|
-
|
|
63
|
-
console.log('Starting single agent example...');
|
|
64
|
-
const results = await overAI.start();
|
|
65
|
-
console.log('\nFinal Results:', results);
|
|
66
|
-
} catch (error) {
|
|
67
|
-
console.error('Error:', error);
|
|
68
|
-
}
|
|
46
|
+
await overAI.start();
|
|
69
47
|
}
|
|
70
|
-
|
|
71
48
|
main();
|
|
72
49
|
```
|
|
73
50
|
|
|
74
|
-
|
|
51
|
+
---
|
|
75
52
|
|
|
76
|
-
|
|
77
|
-
import { Agent, OverAI } from 'overai';
|
|
78
|
-
|
|
79
|
-
async function main() {
|
|
80
|
-
// Create multiple agents with different roles
|
|
81
|
-
const researchAgent = new Agent({
|
|
82
|
-
name: "ResearchAgent",
|
|
83
|
-
instructions: "Research and provide detailed information about renewable energy sources.",
|
|
84
|
-
verbose: true
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
const summaryAgent = new Agent({
|
|
88
|
-
name: "SummaryAgent",
|
|
89
|
-
instructions: "Create a concise summary of the research findings about renewable energy sources. Use {previous_result} as input.",
|
|
90
|
-
verbose: true
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
const recommendationAgent = new Agent({
|
|
94
|
-
name: "RecommendationAgent",
|
|
95
|
-
instructions: "Based on the summary in {previous_result}, provide specific recommendations for implementing renewable energy solutions.",
|
|
96
|
-
verbose: true
|
|
97
|
-
});
|
|
53
|
+
## πΈ Build Your AI SaaS in 5 Minutes
|
|
98
54
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"Summarize the key findings from the research.",
|
|
105
|
-
"Provide actionable recommendations based on the summary."
|
|
106
|
-
],
|
|
107
|
-
verbose: true
|
|
108
|
-
});
|
|
55
|
+
OverAI includes a complete SaaS starter kit. Launch an API server with:
|
|
56
|
+
- β
**API Key Authentication**
|
|
57
|
+
- β
**Credit-Based Billing** (Pay-per-request)
|
|
58
|
+
- β
**Stripe Payment Simulation**
|
|
59
|
+
- β
**N8N Webhook Integration**
|
|
109
60
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
} catch (error) {
|
|
115
|
-
console.error('Error:', error);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
61
|
+
### Run the SaaS Server Example
|
|
62
|
+
```bash
|
|
63
|
+
# Set your OpenAI Key
|
|
64
|
+
export OPENAI_API_KEY="sk-..."
|
|
118
65
|
|
|
119
|
-
|
|
66
|
+
# Run the pre-built SaaS server
|
|
67
|
+
npx ts-node examples/saas-server.ts
|
|
120
68
|
```
|
|
121
69
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
```typescript
|
|
125
|
-
import { Agent, Task, OverAI } from 'overai';
|
|
70
|
+
Your API is now live at `http://localhost:3001`!
|
|
126
71
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
name: "DietAgent",
|
|
131
|
-
role: "Nutrition Expert",
|
|
132
|
-
goal: "Create healthy and delicious recipes",
|
|
133
|
-
backstory: "You are a certified nutritionist with years of experience in creating balanced meal plans.",
|
|
134
|
-
verbose: true, // Enable streaming output
|
|
135
|
-
instructions: `You are a professional chef and nutritionist. Create 5 healthy food recipes that are both nutritious and delicious.
|
|
136
|
-
Each recipe should include:
|
|
137
|
-
1. Recipe name
|
|
138
|
-
2. List of ingredients with quantities
|
|
139
|
-
3. Step-by-step cooking instructions
|
|
140
|
-
4. Nutritional information
|
|
141
|
-
5. Health benefits
|
|
142
|
-
|
|
143
|
-
Format your response in markdown.`
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
const blogAgent = new Agent({
|
|
147
|
-
name: "BlogAgent",
|
|
148
|
-
role: "Food Blogger",
|
|
149
|
-
goal: "Write engaging blog posts about food and recipes",
|
|
150
|
-
backstory: "You are a successful food blogger known for your ability to make recipes sound delicious and approachable.",
|
|
151
|
-
verbose: true, // Enable streaming output
|
|
152
|
-
instructions: `You are a food and health blogger. Write an engaging blog post about the provided recipes.
|
|
153
|
-
The blog post should:
|
|
154
|
-
1. Have an engaging title
|
|
155
|
-
2. Include an introduction about healthy eating`
|
|
156
|
-
});
|
|
72
|
+
### Monetization Endpoints
|
|
73
|
+
- **Chat**: `POST /api/v1/agent/chat` (Costs 1 credit)
|
|
74
|
+
- **Top-up**: `POST /api/billing/topup` (Simulate Stripe payment)
|
|
157
75
|
|
|
158
|
-
|
|
159
|
-
const createRecipesTask = new Task({
|
|
160
|
-
name: "Create Recipes",
|
|
161
|
-
description: "Create 5 healthy and delicious recipes",
|
|
162
|
-
agent: dietAgent
|
|
163
|
-
});
|
|
76
|
+
[View the full SaaS Server Code](./examples/saas-server.ts)
|
|
164
77
|
|
|
165
|
-
|
|
166
|
-
name: "Write Blog",
|
|
167
|
-
description: "Write a blog post about the recipes",
|
|
168
|
-
agent: blogAgent,
|
|
169
|
-
dependencies: [createRecipesTask] // This task depends on the recipes being created first
|
|
170
|
-
});
|
|
78
|
+
---
|
|
171
79
|
|
|
172
|
-
|
|
173
|
-
const overAI = new OverAI({
|
|
174
|
-
tasks: [createRecipesTask, writeBlogTask],
|
|
175
|
-
verbose: true
|
|
176
|
-
});
|
|
80
|
+
## π Integrations
|
|
177
81
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
main();
|
|
82
|
+
### N8N & Workflow Automation
|
|
83
|
+
Expose your agents as N8N nodes or trigger workflows directly from your agents.
|
|
84
|
+
```typescript
|
|
85
|
+
// Built-in webhook support for external triggers
|
|
86
|
+
app.post('/api/webhook/n8n', async (req, res) => {
|
|
87
|
+
// Trigger agent workflows from N8N
|
|
88
|
+
});
|
|
188
89
|
```
|
|
189
90
|
|
|
190
|
-
###
|
|
91
|
+
### Model Context Protocol (MCP)
|
|
92
|
+
Connect your agents to external data sources and tools using the standardized MCP protocol.
|
|
191
93
|
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
export OPENAI_API_KEY='your-api-key'
|
|
195
|
-
```
|
|
94
|
+
---
|
|
196
95
|
|
|
197
|
-
|
|
96
|
+
## π οΈ Development Setup
|
|
198
97
|
|
|
199
|
-
|
|
98
|
+
1. Clone the repository:
|
|
200
99
|
```bash
|
|
201
|
-
|
|
100
|
+
git clone https://github.com/MervinPraison/PraisonAI.git
|
|
101
|
+
cd PraisonAI/src/praisonai-ts
|
|
202
102
|
```
|
|
203
103
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
## Package Structure
|
|
207
|
-
|
|
208
|
-
```
|
|
209
|
-
src/
|
|
210
|
-
βββ agent/ # Agent-related interfaces and implementations
|
|
211
|
-
βββ agents/ # Multi-agent system management
|
|
212
|
-
βββ knowledge/ # Knowledge base and management
|
|
213
|
-
βββ llm/ # Language Model interfaces
|
|
214
|
-
βββ memory/ # Memory management systems
|
|
215
|
-
βββ process/ # Process management
|
|
216
|
-
βββ task/ # Task management
|
|
217
|
-
βββ tools/ # Various utility tools
|
|
218
|
-
βββ arxivTools.ts
|
|
219
|
-
βββ ... (other tools)
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
## Contributing
|
|
223
|
-
|
|
224
|
-
1. Fork the repository
|
|
225
|
-
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
226
|
-
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
227
|
-
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
228
|
-
5. Open a Pull Request
|
|
229
|
-
|
|
230
|
-
## License
|
|
231
|
-
|
|
232
|
-
MIT License - see the LICENSE file for details
|
|
233
|
-
|
|
234
|
-
## Testing
|
|
235
|
-
|
|
236
|
-
### Manual Testing
|
|
237
|
-
|
|
104
|
+
2. Install dependencies:
|
|
238
105
|
```bash
|
|
239
|
-
|
|
240
|
-
npx ts-node tests/development/simple/single-agent.ts
|
|
241
|
-
npx ts-node tests/development/simple/multi-agent.ts
|
|
242
|
-
npx ts-node tests/development/simple/multi-agents-simple.js
|
|
106
|
+
npm install
|
|
243
107
|
```
|
|
244
108
|
|
|
245
|
-
|
|
246
|
-
|
|
109
|
+
3. Build the package:
|
|
247
110
|
```bash
|
|
248
|
-
|
|
249
|
-
npx ts-node examples/simple/single-agent.ts
|
|
250
|
-
npx ts-node examples/simple/multi-agent.ts
|
|
111
|
+
npm run build
|
|
251
112
|
```
|
|
252
113
|
|
|
253
|
-
|
|
114
|
+
## License
|
|
254
115
|
|
|
255
|
-
|
|
256
|
-
npm run test
|
|
257
|
-
```
|
|
116
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "overai",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "OverAI TypeScript AI Agents Framework -
|
|
3
|
+
"version": "1.4.3",
|
|
4
|
+
"description": "OverAI TypeScript AI Agents Framework - Build, Deploy, and Monetize AI Agents in Minutes",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -46,7 +46,11 @@
|
|
|
46
46
|
"javascript ai framework",
|
|
47
47
|
"ai agent framework",
|
|
48
48
|
"typescript ai agent framework",
|
|
49
|
-
"javascript ai agent framework"
|
|
49
|
+
"javascript ai agent framework",
|
|
50
|
+
"ai saas",
|
|
51
|
+
"ai monetization",
|
|
52
|
+
"ai billing",
|
|
53
|
+
"ai api server"
|
|
50
54
|
],
|
|
51
55
|
"author": "Mervin Praison",
|
|
52
56
|
"license": "MIT",
|