agent-pulse 1.3.0 → 1.4.0

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 +52 -15
  2. package/package.json +4 -5
package/README.md CHANGED
@@ -99,19 +99,19 @@ import { Agent, openAI, google, grok } from 'agent-pulse';
99
99
  // OpenAI
100
100
  const bot1 = new Agent({
101
101
  name: 'gpt-bot',
102
- provider: new openAI('gpt-4o')
102
+ provider: new openAI('gpt-5.2')
103
103
  });
104
104
 
105
105
  // Google Gemini
106
106
  const bot2 = new Agent({
107
107
  name: 'gemini-bot',
108
- provider: new google('gemini-1.5-pro')
108
+ provider: new google('gemini-3-pro')
109
109
  });
110
110
 
111
111
  // xAI / Grok
112
112
  const bot3 = new Agent({
113
113
  name: 'grok-bot',
114
- provider: new grok('grok-beta')
114
+ provider: new grok('grok-4.2')
115
115
  });
116
116
  ```
117
117
 
@@ -217,7 +217,7 @@ const summaryTool = {
217
217
 
218
218
  const agent = new Agent({
219
219
  name: 'intake',
220
- provider: new google('gemini-1.5-pro'),
220
+ provider: new google('gemini-3-pro'),
221
221
  tools: [summaryTool]
222
222
  });
223
223
 
@@ -263,7 +263,7 @@ By setting `max_tool_iterations`, the agent can autonomously call tools, receive
263
263
  ```typescript
264
264
  const agent = new Agent({
265
265
  name: 'researcher',
266
- provider: new openAI('gpt-4o'),
266
+ provider: new openAI('gpt-5.2'),
267
267
  tools: [weatherTool, searchTool],
268
268
  max_tool_iterations: 5 // Allow up to 5 loop turns
269
269
  });
@@ -280,7 +280,7 @@ If your agent is running on a server but needs the **client** to perform an acti
280
280
  ```typescript
281
281
  const agent = new Agent({
282
282
  name: 'account-mgr',
283
- provider: new openAI('gpt-4o'),
283
+ provider: new openAI('gpt-5.2'),
284
284
  tools: [requestConfirmationTool]
285
285
  });
286
286
 
@@ -312,7 +312,7 @@ The same pattern works for Gemini! While Google's API uses a different internal
312
312
  ```typescript
313
313
  const agent = new Agent({
314
314
  name: 'gemini-agent',
315
- provider: new google('gemini-1.5-flash')
315
+ provider: new google('gemini-3-flash')
316
316
  });
317
317
 
318
318
  const final = await agent.run([
@@ -340,7 +340,7 @@ import { Agent, openAI } from 'agent-pulse';
340
340
 
341
341
  const agent = new Agent({
342
342
  name: 'analyst',
343
- provider: new openAI('gpt-4o'),
343
+ provider: new openAI('gpt-5.2'),
344
344
  // You can pass file paths (if handled by environment) or load content yourself
345
345
  files: ['/path/to/data.txt']
346
346
  });
@@ -362,7 +362,7 @@ const recipeSchema = z.object({
362
362
 
363
363
  const agent = new Agent({
364
364
  name: 'chef',
365
- provider: new google('gemini-1.5-pro'),
365
+ provider: new google('gemini-3-pro'),
366
366
  output_schema: recipeSchema
367
367
  });
368
368
 
@@ -389,7 +389,7 @@ app.get('/chat', async (req, res) => {
389
389
 
390
390
  const agent = new Agent({
391
391
  name: 'web-bot',
392
- provider: new openAI('gpt-4o')
392
+ provider: new openAI('gpt-5.2')
393
393
  });
394
394
 
395
395
  // Connect agent events to the response stream
@@ -409,7 +409,7 @@ import { Agent, google } from 'agent-pulse';
409
409
 
410
410
  const agent = new Agent({
411
411
  name: 'researcher',
412
- provider: new google('gemini-2.5-flash-lite'),
412
+ provider: new google('gemini-3-flash'),
413
413
  config: {
414
414
  googleSearch: true
415
415
  }
@@ -425,6 +425,47 @@ agent.on('response', (result) => {
425
425
  await agent.run("Who won the Super Bowl in 2024?");
426
426
  ```
427
427
 
428
+ ### 7. Image Generation
429
+
430
+ Generate images by setting the agent's model to an image generation model (e.g., `grok-imagine-image` for xAI or models like `gemini-1.5-pro` for Google).
431
+
432
+ #### xAI (Grok Imagine)
433
+ xAI uses `aspect_ratio` instead of `size`.
434
+
435
+ ```typescript
436
+ import { Agent, grok } from 'agent-pulse';
437
+
438
+ const agent = new Agent({
439
+ name: 'artist',
440
+ provider: new grok('grok-imagine-image'),
441
+ config: {
442
+ aspect_ratio: '16:9', // Supported: "1:1", "16:9", "9:16", "4:3", "3:2", etc.
443
+ response_format: 'b64_json' // Get base64 data instead of temporary URLs
444
+ }
445
+ });
446
+
447
+ const result = await agent.run("A futuristic city skyline in neon colors.");
448
+
449
+ // result.content will contain markdown image strings:
450
+ // "![Generated Image](data:image/png;base64,...)" or "![Generated Image](https://...)"
451
+ ```
452
+
453
+ #### Google (Gemini)
454
+ Gemini models can generate images as part of their response.
455
+
456
+ ```typescript
457
+ import { Agent, google } from 'agent-pulse';
458
+
459
+ const agent = new Agent({
460
+ name: 'painter',
461
+ provider: new google('gemini-3-pro')
462
+ });
463
+
464
+ const result = await agent.run("Generate an image of a serene mountain lake.");
465
+
466
+ // result.content will contain the markdown image string.
467
+ ```
468
+
428
469
  ## Extensibility: Custom Providers
429
470
 
430
471
  To add a new provider (e.g. Anthropic, Mistral), create a class that implements the `LLMProvider` interface.
@@ -448,10 +489,6 @@ const agent = new Agent({
448
489
  provider: new MyProvider('my-model')
449
490
  });
450
491
  ```
451
- ## To locally link the package
452
-
453
- 1. Run `npm link` in the agent-pulse directory
454
- 2. Run `npm link agent-pulse --legacy-peer-deps` in your project directory
455
492
 
456
493
  ## License
457
494
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-pulse",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "A lightweight, agentic AI framework for JavaScript/TypeScript",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -26,13 +26,12 @@
26
26
  "license": "MIT",
27
27
  "repository": {
28
28
  "type": "git",
29
- "url": "git+https://github.com/mehere14/Agentic-Framework.git",
30
- "directory": "agent-pulse"
29
+ "url": "git+https://github.com/mehere14/agent-pulse-public.git"
31
30
  },
32
31
  "bugs": {
33
- "url": "https://github.com/mehere14/Agentic-Framework/issues"
32
+ "url": "https://github.com/mehere14/agent-pulse-public/issues"
34
33
  },
35
- "homepage": "https://github.com/mehere14/Agentic-Framework/tree/main/agent-pulse#readme",
34
+ "homepage": "https://github.com/mehere14/agent-pulse-public#readme",
36
35
  "dependencies": {
37
36
  "@google/genai": "^1.33.0",
38
37
  "dotenv": "^16.4.5",