overai 1.4.5 → 1.4.6

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 +51 -15
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -31,32 +31,68 @@ npm install overai
31
31
 
32
32
  ---
33
33
 
34
- ## ⚡ Quick Start: Single Agent
35
-
36
- Create a simple agent that can perform tasks.
34
+ ## ⚡ Quick Start: Gemini Example
35
+
36
+ 1. **Create `tsconfig.json`**:
37
+ ```json
38
+ {
39
+ "compilerOptions": {
40
+ "module": "ESNext",
41
+ "moduleResolution": "node",
42
+ "target": "ES2020",
43
+ "esModuleInterop": true,
44
+ "skipLibCheck": true,
45
+ "strict": true,
46
+ "resolveJsonModule": true,
47
+ "allowSyntheticDefaultImports": true
48
+ },
49
+ "ts-node": {
50
+ "esm": true,
51
+ "experimentalSpecifierResolution": "node"
52
+ }
53
+ }
54
+ ```
37
55
 
56
+ 2. **Create `main.ts`**:
38
57
  ```typescript
39
58
  import { Agent, OverAI } from 'overai';
40
59
 
41
60
  async function main() {
42
- const agent = new Agent({
43
- name: "Copywriter",
44
- instructions: "You are an expert marketing copywriter.",
45
- verbose: true
46
- });
47
-
48
- const overAI = new OverAI({
49
- agents: [agent],
50
- tasks: ["Write a catchy tagline for a new coffee brand."],
51
- verbose: true
52
- });
53
-
61
+ // 1. Créer un agent
62
+ const agent = new Agent({
63
+ name: "GeminiAgent",
64
+ instructions: "Tu es Gemini, un modèle de Google. Réponds en français.",
65
+ llm: "google/gemini-2.0-flash",
66
+ verbose: true
67
+ });
68
+
69
+ // 2. Configurer OverAI avec l'agent et une tâche
70
+ const overAI = new OverAI({
71
+ agents: [agent],
72
+ tasks: ["Explique-moi ce qu'est un Agent IA en une phrase simple."],
73
+ verbose: true
74
+ });
75
+
76
+ // 3. Lancer l'exécution
77
+ console.log("🚀 Démarrage de OverAI...");
78
+ try {
54
79
  const result = await overAI.start();
80
+ console.log("\n✅ Résultat :");
55
81
  console.log(result);
82
+ } catch (error) {
83
+ console.error("❌ Erreur :", error);
84
+ }
56
85
  }
86
+
57
87
  main();
58
88
  ```
59
89
 
90
+ 3. **Run the agent**:
91
+ ```bash
92
+ export GOOGLE_API_KEY="your-gemini-key"
93
+ npx tsx main.ts
94
+ ```
95
+
60
96
  ---
61
97
 
62
98
  ## 🤝 Multi-Agent Collaboration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "overai",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
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",