overai 1.4.4 → 1.4.5

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.
Files changed (2) hide show
  1. package/README.md +110 -51
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -4,17 +4,22 @@
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
  [![Downloads](https://img.shields.io/npm/dm/overai.svg)](https://www.npmjs.com/package/overai)
6
6
 
7
- **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.
7
+ **OverAI** is the comprehensive, production-ready AI Agents framework designed for **Builders, Entrepreneurs, and Enterprise Developers**.
8
8
 
9
- ## 🚀 Why OverAI?
9
+ Unlike other frameworks that stop at "Hello World", OverAI provides the full stack needed to **Build, Deploy, and Monetize** AI solutions. From simple automation scripts to full-fledged AI SaaS platforms with billing, API keys, and workflow integrations.
10
10
 
11
- Stop stitching together disparate tools. OverAI provides a unified "Business-in-a-Box" framework for AI developers:
11
+ ## 🚀 Why Choose OverAI?
12
12
 
13
- - **💰 Built-in Monetization**: Includes ready-to-use SaaS templates with **Stripe integration** and **Credit Systems**.
14
- - **🔌 Enterprise Integrations**: Native support for **N8N workflows**, **MCP Servers**, and **Slack**.
15
- - **🧠 Code-First Autonomy**: Define complex, dynamic agent behaviors using standard TypeScript/JavaScript.
16
- - **🤝 True Multi-Agent Collaboration**: Agents that communicate, delegate, and solve problems together.
17
- - **🛡️ Production-Grade**: Type-safe, CI/CD friendly, and scalable.
13
+ ### 💼 For Entrepreneurs & SaaS Builders
14
+ * **Business-in-a-Box**: Launch your AI API in minutes with built-in **Stripe simulation**, **Credit/Quota management**, and **API Key authentication**.
15
+ * **Monetization Ready**: Every agent interaction can be tracked and billed.
16
+ * **White-Label Friendly**: Designed to be the backend of your product.
17
+
18
+ ### 👨‍💻 For Developers & Engineers
19
+ * **Type-Safe & Scalable**: Built entirely in TypeScript for robust, maintainable code.
20
+ * **Multi-Agent Orchestration**: Create teams of agents that collaborate, delegate, and solve complex problems.
21
+ * **Protocol Agnostic**: Native support for **MCP (Model Context Protocol)** to connect with any data source.
22
+ * **Workflow Integration**: Seamlessly trigger agents from **N8N**, **Zapier**, or your own webhooks.
18
23
 
19
24
  ---
20
25
 
@@ -24,91 +29,145 @@ Stop stitching together disparate tools. OverAI provides a unified "Business-in-
24
29
  npm install overai
25
30
  ```
26
31
 
27
- ## ⚡ Quick Start: Your First Agent
32
+ ---
33
+
34
+ ## ⚡ Quick Start: Single Agent
35
+
36
+ Create a simple agent that can perform tasks.
28
37
 
29
38
  ```typescript
30
39
  import { Agent, OverAI } from 'overai';
31
40
 
32
41
  async function main() {
33
42
  const agent = new Agent({
34
- name: "Helper",
35
- instructions: "You are a helpful assistant.",
43
+ name: "Copywriter",
44
+ instructions: "You are an expert marketing copywriter.",
36
45
  verbose: true
37
46
  });
38
47
 
39
48
  const overAI = new OverAI({
40
49
  agents: [agent],
41
- tasks: ["Say hello and introduce yourself."],
50
+ tasks: ["Write a catchy tagline for a new coffee brand."],
42
51
  verbose: true
43
52
  });
44
53
 
45
- await overAI.start();
54
+ const result = await overAI.start();
55
+ console.log(result);
46
56
  }
47
57
  main();
48
58
  ```
49
59
 
50
60
  ---
51
61
 
52
- ## 💸 Build Your AI SaaS in 5 Minutes
62
+ ## 🤝 Multi-Agent Collaboration
53
63
 
54
- OverAI includes a complete SaaS starter kit. Launch an API server with:
55
- - ✅ **API Key Authentication**
56
- - ✅ **Credit-Based Billing** (Pay-per-request)
57
- - ✅ **Stripe Payment Simulation**
58
- - ✅ **N8N Webhook Integration**
64
+ Create a team of agents that work together.
59
65
 
60
- ### Run the SaaS Server Example
61
- ```bash
62
- # Set your OpenAI Key
63
- export OPENAI_API_KEY="sk-..."
66
+ ```typescript
67
+ import { Agent, OverAI } from 'overai';
64
68
 
65
- # Run the pre-built SaaS server
66
- npx ts-node examples/saas-server.ts
67
- ```
69
+ async function main() {
70
+ const researcher = new Agent({
71
+ name: "Researcher",
72
+ instructions: "Research the latest trends in AI.",
73
+ });
68
74
 
69
- Your API is now live at `http://localhost:3001`!
75
+ const writer = new Agent({
76
+ name: "Writer",
77
+ instructions: "Write a blog post based on the research provided.",
78
+ });
70
79
 
71
- ### Monetization Endpoints
72
- - **Chat**: `POST /api/v1/agent/chat` (Costs 1 credit)
73
- - **Top-up**: `POST /api/billing/topup` (Simulate Stripe payment)
80
+ const overAI = new OverAI({
81
+ agents: [researcher, writer],
82
+ tasks: [
83
+ "Research 3 top AI trends for 2025.",
84
+ "Write a short blog post summarizing these trends."
85
+ ],
86
+ verbose: true
87
+ });
74
88
 
75
- [View the full SaaS Server Code](./examples/saas-server.ts)
89
+ await overAI.start();
90
+ }
91
+ main();
92
+ ```
93
+
94
+ ---
95
+
96
+ ## 💸 SaaS & Monetization Starter Kit
97
+
98
+ OverAI comes with a **complete SaaS API Server example**. Use this to launch your own AI business.
99
+
100
+ ### Features Included:
101
+ - **Authentication**: Secure API Key middleware (`x-api-key`).
102
+ - **Billing System**: Credit deduction per request (1 credit = 1 request).
103
+ - **Payment Gateway**: Mock Stripe integration to simulate top-ups.
104
+ - **Webhooks**: N8N compatible endpoints.
105
+
106
+ ### How to Run Your SaaS Backend:
107
+
108
+ 1. **Set your OpenAI Key**:
109
+ ```bash
110
+ export OPENAI_API_KEY="sk-..."
111
+ ```
112
+
113
+ 2. **Start the Server**:
114
+ ```bash
115
+ npx ts-node examples/saas-server.ts
116
+ ```
117
+ *Server starts at `http://localhost:3001`*
118
+
119
+ 3. **Test Monetization**:
120
+ * **Top-up Credits** (Simulate Stripe):
121
+ ```bash
122
+ curl -X POST http://localhost:3001/api/billing/topup \
123
+ -H "Content-Type: application/json" \
124
+ -H "x-api-key: sk_demo_12345" \
125
+ -d '{"amount": 10.00}'
126
+ ```
127
+ * **Paid Chat Request**:
128
+ ```bash
129
+ curl -X POST http://localhost:3001/api/v1/agent/chat \
130
+ -H "Content-Type: application/json" \
131
+ -H "x-api-key: sk_demo_12345" \
132
+ -d '{"message": "Hello, I paid for this!"}'
133
+ ```
76
134
 
77
135
  ---
78
136
 
79
- ## 🔗 Integrations
137
+ ## 🔌 Integrations & Workflows
138
+
139
+ ### N8N Integration
140
+ OverAI agents can be triggered via webhooks, making them perfect for N8N workflows.
80
141
 
81
- ### N8N & Workflow Automation
82
- Expose your agents as N8N nodes or trigger workflows directly from your agents.
83
142
  ```typescript
84
- // Built-in webhook support for external triggers
143
+ // Example N8N Webhook Endpoint (included in saas-server.ts)
85
144
  app.post('/api/webhook/n8n', async (req, res) => {
86
- // Trigger agent workflows from N8N
145
+ const { workflow_data } = req.body;
146
+ // Process N8N data with agents...
147
+ res.json({ status: "success", result: agentResponse });
87
148
  });
88
149
  ```
89
150
 
90
151
  ### Model Context Protocol (MCP)
91
- Connect your agents to external data sources and tools using the standardized MCP protocol.
152
+ Support for the MCP standard allows your agents to safely access local files, databases, and external tools without custom glue code.
92
153
 
93
154
  ---
94
155
 
95
- ## 🛠️ Development Setup
156
+ ## 🛠️ Development
96
157
 
97
- 1. Clone the repository:
98
- ```bash
99
- git clone https://github.com/MervinPraison/PraisonAI.git
100
- cd PraisonAI/src/praisonai-ts
101
- ```
158
+ To contribute or modify the framework:
102
159
 
103
- 2. Install dependencies:
104
- ```bash
105
- npm install
106
- ```
160
+ 1. **Clone your fork**:
161
+ ```bash
162
+ git clone https://github.com/your-username/overai.git
163
+ cd overai
164
+ ```
107
165
 
108
- 3. Build the package:
109
- ```bash
110
- npm run build
111
- ```
166
+ 2. **Install & Build**:
167
+ ```bash
168
+ npm install
169
+ npm run build
170
+ ```
112
171
 
113
172
  ## License
114
173
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "overai",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
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",
@@ -51,7 +51,7 @@
51
51
  "ai billing",
52
52
  "ai api server"
53
53
  ],
54
- "author": "Mervin Praison",
54
+ "author": "OverAI",
55
55
  "license": "MIT",
56
56
  "devDependencies": {
57
57
  "@ai-sdk/anthropic": "^3.0.1",