@peebles-group/agentlib-js 1.0.1 → 1.0.2

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 +16 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@ A lightweight Node.js library for building AI agents with LLM providers and MCP
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install peebles-agentlib
8
+ npm install @peebles-group/agentlib-js
9
9
  ```
10
10
 
11
11
  ## Quick Start
@@ -22,7 +22,7 @@ npm install peebles-agentlib
22
22
  mkdir my-agent-project
23
23
  cd my-agent-project
24
24
  npm init -y
25
- npm install peebles-agentlib dotenv
25
+ npm install @peebles-group/agentlib-js dotenv
26
26
  ```
27
27
 
28
28
  ## Features
@@ -36,10 +36,13 @@ npm install peebles-agentlib
36
36
  ## Basic Usage
37
37
 
38
38
  ```javascript
39
- import { Agent } from 'peebles-agentlib';
39
+ import { Agent, LLMService } from '@peebles-group/agentlib-js';
40
40
  import dotenv from 'dotenv';
41
41
  dotenv.config();
42
42
 
43
+ // Initialize LLM service for direct tasks
44
+ const llm = new LLMService('openai', process.env.OPENAI_API_KEY);
45
+
43
46
  // Simple agent
44
47
  const agent = new Agent('openai', process.env.OPENAI_API_KEY, {
45
48
  model: 'gpt-4o-mini'
@@ -66,7 +69,7 @@ await mcpAgent.addMCPServer('browser', {
66
69
  AgentLib supports type-safe structured outputs using Zod schemas for reliable JSON responses.
67
70
 
68
71
  ```javascript
69
- import { Agent } from 'peebles-agentlib';
72
+ import { Agent } from '@peebles-group/agentlib-js';
70
73
  import { z } from 'zod';
71
74
  import dotenv from 'dotenv';
72
75
  dotenv.config();
@@ -112,7 +115,7 @@ The repository includes several development examples that demonstrate different
112
115
 
113
116
  ```javascript
114
117
  // In your project
115
- import { Agent } from 'peebles-agentlib';
118
+ import { Agent } from '@peebles-group/agentlib-js';
116
119
 
117
120
  // Instead of (development only)
118
121
  import { Agent } from './src/Agent.js';
@@ -137,7 +140,7 @@ const agent = new Agent(provider, apiKey, options);
137
140
 
138
141
  **Example:**
139
142
  ```javascript
140
- import { Agent } from 'peebles-agentlib';
143
+ import { Agent } from '@peebles-group/agentlib-js';
141
144
 
142
145
  const agent = new Agent('openai', process.env.OPENAI_API_KEY, {
143
146
  model: 'gpt-4o-mini',
@@ -187,12 +190,13 @@ When calling an LLM, the result object has the following structure:
187
190
  ]
188
191
  },
189
192
  {
190
- type: 'function',
191
- description: 'Search the web for information',
192
- name: 'web_search',
193
- parameters: [Object],
194
- strict: true
195
- }
193
+ id: 'fc_0c7a9f052c2a6aec0068fa6e20bca0819abbc24ec38aad74dc',
194
+ type: 'function_call',
195
+ status: 'completed',
196
+ arguments: '{"element":"Our Menu","ref":"e222","doubleClick":false,"button":"left","modifiers":[]}',
197
+ call_id: 'call_iBNFPVHDsSH1UUGUIUM5uvCE',
198
+ name: 'browser_click'
199
+ }
196
200
  ],
197
201
  "parallel_tool_calls": true,
198
202
  "previous_response_id": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peebles-group/agentlib-js",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A minimal JavaScript library implementing concurrent async agents for illustrating multi-agent systems and other agentic design patterns including recursive ones purely through function calling loops.",
5
5
  "main": "index.js",
6
6
  "type": "module",