@agentionai/agents 0.3.0-beta → 0.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.
- package/README.md +137 -424
- package/dist/agents/Agent.d.ts +1 -1
- package/dist/claude.d.ts +9 -0
- package/dist/claude.js +29 -0
- package/dist/core.d.ts +15 -0
- package/dist/core.js +39 -0
- package/dist/gemini.d.ts +9 -0
- package/dist/gemini.js +30 -0
- package/dist/index.js +8 -0
- package/dist/mistral.d.ts +9 -0
- package/dist/mistral.js +30 -0
- package/dist/openai.d.ts +9 -0
- package/dist/openai.js +30 -0
- package/package.json +29 -4
- package/readme.md +0 -1
package/README.md
CHANGED
|
@@ -1,517 +1,230 @@
|
|
|
1
1
|
# Agention
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> AI Agents Without the Magic
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@agentionai/agents)
|
|
6
|
-
[](https://opensource.org/licenses/MIT)
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
A comprehensive TypeScript toolkit for building LLM-powered agents with RAG, and multi-agent workflows. No hidden state machines, no forced abstractions—just typed agents, composable graphs, and complete control in a complete toolkit.
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- **🤖 Multi-Provider Support** - Works with Claude, OpenAI, Mistral, and Google Gemini out of the box
|
|
13
|
-
- **🔧 Powerful Tool System** - Define tools with JSON Schema validation, agents use them automatically
|
|
14
|
-
- **🔀 Graph Pipelines** - Chain agents together with sequential, parallel, map, voting, and router patterns
|
|
15
|
-
- **💾 Vector Search** - Built-in LanceDB integration for semantic search and RAG applications
|
|
16
|
-
- **📄 Document Processing** - Intelligent chunking with token-aware splitting and metadata tracking
|
|
17
|
-
- **📊 Metrics & Observability** - Track tokens, timing, and pipeline execution
|
|
18
|
-
- **🔒 Type-Safe** - Full TypeScript support with strict typing throughout
|
|
19
|
-
|
|
20
|
-
## Installation
|
|
9
|
+
**[Documentation](https://docs.agention.ai/)** • **[Examples](https://docs.agention.ai/guide/examples)** • **[GitHub](https://github.com/laurentzuijdwijk/agention-lib)**
|
|
21
10
|
|
|
22
|
-
|
|
23
|
-
npm install @agentionai/agents
|
|
24
|
-
```
|
|
11
|
+
## Quick Start
|
|
25
12
|
|
|
26
|
-
Install
|
|
13
|
+
Install only what you need with selective imports:
|
|
27
14
|
|
|
28
15
|
```bash
|
|
29
|
-
#
|
|
30
|
-
npm install @anthropic-ai/sdk
|
|
31
|
-
|
|
32
|
-
# For OpenAI
|
|
33
|
-
npm install openai
|
|
34
|
-
|
|
35
|
-
# For vector search (optional)
|
|
36
|
-
npm install @lancedb/lancedb apache-arrow
|
|
16
|
+
# Install core library + Claude SDK
|
|
17
|
+
npm install @agentionai/agents @anthropic-ai/sdk
|
|
37
18
|
```
|
|
38
19
|
|
|
39
|
-
## Quick Start
|
|
40
|
-
|
|
41
|
-
### Basic Agent
|
|
42
|
-
|
|
43
20
|
```typescript
|
|
44
|
-
|
|
21
|
+
// Import only Claude - no other agent SDKs required!
|
|
22
|
+
import { ClaudeAgent } from '@agentionai/agents/claude';
|
|
45
23
|
|
|
46
24
|
const agent = new ClaudeAgent({
|
|
47
|
-
model: 'claude-sonnet-4-
|
|
48
|
-
|
|
25
|
+
model: 'claude-sonnet-4-5',
|
|
26
|
+
name: 'Assistant',
|
|
27
|
+
description: 'You are a helpful assistant.',
|
|
49
28
|
});
|
|
50
29
|
|
|
51
|
-
const response = await agent.execute('What
|
|
30
|
+
const response = await agent.execute('What can you help me with?');
|
|
52
31
|
console.log(response);
|
|
53
32
|
```
|
|
54
33
|
|
|
55
|
-
###
|
|
34
|
+
### Selective Imports
|
|
56
35
|
|
|
57
|
-
|
|
58
|
-
import { ClaudeAgent, Tool } from '@agentionai/agents';
|
|
59
|
-
|
|
60
|
-
const calculator = new Tool({
|
|
61
|
-
name: 'calculate',
|
|
62
|
-
description: 'Perform mathematical calculations',
|
|
63
|
-
input_schema: {
|
|
64
|
-
type: 'object',
|
|
65
|
-
properties: {
|
|
66
|
-
expression: { type: 'string', description: 'Math expression to evaluate' },
|
|
67
|
-
},
|
|
68
|
-
required: ['expression'],
|
|
69
|
-
},
|
|
70
|
-
handler: async ({ expression }) => {
|
|
71
|
-
return String(eval(expression));
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
const agent = new ClaudeAgent({
|
|
76
|
-
model: 'claude-sonnet-4-20250514',
|
|
77
|
-
systemPrompt: 'You are a helpful math assistant.',
|
|
78
|
-
tools: [calculator],
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
const response = await agent.execute('What is 15% of 230?');
|
|
82
|
-
// Agent automatically uses the calculator tool
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Multi-Agent Pipeline
|
|
36
|
+
Import only the agents you need:
|
|
86
37
|
|
|
87
38
|
```typescript
|
|
88
|
-
import {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
name: 'researcher',
|
|
93
|
-
model: 'gpt-4o',
|
|
94
|
-
systemPrompt: 'Research the topic thoroughly.',
|
|
95
|
-
tools: [webSearchTool],
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
// Writing agent
|
|
99
|
-
const writer = new ClaudeAgent({
|
|
100
|
-
name: 'writer',
|
|
101
|
-
model: 'claude-sonnet-4-20250514',
|
|
102
|
-
systemPrompt: 'Write a compelling blog post from the research.',
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
// Chain them together
|
|
106
|
-
const pipeline = new Pipeline([researcher, writer]);
|
|
107
|
-
const result = await pipeline.execute('AI in Healthcare');
|
|
108
|
-
// researcher output → writer input → final blog post
|
|
39
|
+
import { ClaudeAgent } from '@agentionai/agents/claude'; // Requires @anthropic-ai/sdk
|
|
40
|
+
import { OpenAiAgent } from '@agentionai/agents/openai'; // Requires openai
|
|
41
|
+
import { GeminiAgent } from '@agentionai/agents/gemini'; // Requires @google/generative-ai
|
|
42
|
+
import { MistralAgent } from '@agentionai/agents/mistral'; // Requires @mistralai/mistralai
|
|
109
43
|
```
|
|
110
44
|
|
|
111
|
-
|
|
45
|
+
Or import everything (requires all SDKs):
|
|
112
46
|
|
|
113
47
|
```typescript
|
|
114
|
-
import { ClaudeAgent,
|
|
115
|
-
|
|
116
|
-
// Setup vector store
|
|
117
|
-
const embeddings = new OpenAIEmbeddings({ model: 'text-embedding-3-small' });
|
|
118
|
-
const store = await LanceDBVectorStore.create({
|
|
119
|
-
name: 'docs',
|
|
120
|
-
uri: './data/vectors',
|
|
121
|
-
tableName: 'knowledge',
|
|
122
|
-
embeddings,
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
// Add documents
|
|
126
|
-
await store.addDocuments([
|
|
127
|
-
{ id: '1', content: 'Company policy on refunds...' },
|
|
128
|
-
{ id: '2', content: 'Technical documentation...' },
|
|
129
|
-
]);
|
|
130
|
-
|
|
131
|
-
// Create search tool
|
|
132
|
-
const searchTool = store.toRetrievalTool(
|
|
133
|
-
'Search company knowledge base',
|
|
134
|
-
{ defaultLimit: 5 }
|
|
135
|
-
);
|
|
136
|
-
|
|
137
|
-
// Agent can search and answer
|
|
138
|
-
const agent = new ClaudeAgent({
|
|
139
|
-
model: 'claude-sonnet-4-20250514',
|
|
140
|
-
systemPrompt: 'Answer questions using the knowledge base.',
|
|
141
|
-
tools: [searchTool],
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
const answer = await agent.execute('What is our refund policy?');
|
|
48
|
+
import { ClaudeAgent, OpenAiAgent } from '@agentionai/agents';
|
|
145
49
|
```
|
|
146
50
|
|
|
147
|
-
## Core Concepts
|
|
148
|
-
|
|
149
|
-
### Agents
|
|
150
|
-
|
|
151
|
-
Agents wrap LLM providers with a consistent interface. All agents support:
|
|
152
|
-
|
|
153
|
-
- Conversation history management
|
|
154
|
-
- Tool use
|
|
155
|
-
- Token tracking
|
|
156
|
-
- Pipeline integration
|
|
157
51
|
|
|
158
|
-
|
|
159
|
-
import { ClaudeAgent, OpenAiAgent, MistralAgent, GeminiAgent } from '@agentionai/agents';
|
|
52
|
+
## Features
|
|
160
53
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
```
|
|
54
|
+
- **Multi-Provider, No Lock-in** - Claude, OpenAI, Gemini, Mistral—same interface. Switch models with one line.
|
|
55
|
+
- **Composable, Not Magical** - Agents are objects. Pipelines are arrays. No hidden state, no surprises.
|
|
56
|
+
- **Full Observability** - Per-call token counts, execution timing, pipeline structure visualization.
|
|
57
|
+
- **TypeScript-Native** - Strict typing, interfaces, and generics from the ground up.
|
|
58
|
+
- **RAG Ready** - LanceDB vector store, token-aware chunking, ingestion pipeline out of the box.
|
|
167
59
|
|
|
168
|
-
### Tools
|
|
169
60
|
|
|
170
|
-
|
|
61
|
+
### Agent with Tools
|
|
171
62
|
|
|
172
63
|
```typescript
|
|
64
|
+
import { GeminiAgent, Tool } from '@agentionai/agents/gemini';
|
|
65
|
+
|
|
173
66
|
const weatherTool = new Tool({
|
|
174
67
|
name: 'get_weather',
|
|
175
|
-
description: 'Get current weather for a
|
|
68
|
+
description: 'Get the current weather for a location',
|
|
176
69
|
input_schema: {
|
|
177
70
|
type: 'object',
|
|
178
71
|
properties: {
|
|
179
|
-
|
|
180
|
-
units: { type: 'string', enum: ['celsius', 'fahrenheit'] },
|
|
72
|
+
location: { type: 'string', description: 'City name' },
|
|
181
73
|
},
|
|
182
|
-
required: ['
|
|
74
|
+
required: ['location'],
|
|
183
75
|
},
|
|
184
|
-
handler: async ({
|
|
185
|
-
|
|
186
|
-
return JSON.stringify(
|
|
76
|
+
handler: async ({ location }) => {
|
|
77
|
+
// In production, call a weather API
|
|
78
|
+
return JSON.stringify({
|
|
79
|
+
location,
|
|
80
|
+
temperature: 22,
|
|
81
|
+
conditions: 'Sunny',
|
|
82
|
+
});
|
|
187
83
|
},
|
|
188
84
|
});
|
|
189
|
-
```
|
|
190
85
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
// Specialized sub-agent
|
|
197
|
-
const researchAssistant = new OpenAiAgent({
|
|
198
|
-
name: 'research-assistant',
|
|
199
|
-
description: 'Expert at finding research papers',
|
|
200
|
-
tools: [pubmedSearchTool],
|
|
201
|
-
model: 'gpt-4o-mini',
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
// Main agent delegates to sub-agent
|
|
205
|
-
const mainAgent = new ClaudeAgent({
|
|
206
|
-
name: 'coordinator',
|
|
207
|
-
agents: [researchAssistant], // Sub-agents available as tools
|
|
208
|
-
model: 'claude-sonnet-4-20250514',
|
|
86
|
+
const agent = new GeminiAgent({
|
|
87
|
+
model: 'gemini-flash-lite-latest',
|
|
88
|
+
name: 'Weather Agent',
|
|
89
|
+
description: 'You are a weather assistant.',
|
|
90
|
+
tools: [weatherTool],
|
|
209
91
|
});
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### Graph Pipelines
|
|
213
|
-
|
|
214
|
-
Build complex workflows by combining agents and executors:
|
|
215
92
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
```typescript
|
|
219
|
-
import { SequentialExecutor } from '@agentionai/agents';
|
|
220
|
-
|
|
221
|
-
const chain = new SequentialExecutor({
|
|
222
|
-
name: 'content-pipeline',
|
|
223
|
-
agents: [researcher, writer, editor],
|
|
224
|
-
});
|
|
225
|
-
// researcher → writer → editor
|
|
93
|
+
const response = await agent.execute("What's the weather in Paris?");
|
|
226
94
|
```
|
|
227
95
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
```typescript
|
|
231
|
-
import { ParallelExecutor } from '@agentionai/agents';
|
|
232
|
-
|
|
233
|
-
const parallel = new ParallelExecutor({
|
|
234
|
-
name: 'multi-perspective',
|
|
235
|
-
agents: [optimist, pessimist, realist],
|
|
236
|
-
});
|
|
237
|
-
// All run simultaneously on same input
|
|
238
|
-
```
|
|
96
|
+
### Multi-Agent Pipeline
|
|
239
97
|
|
|
240
|
-
|
|
98
|
+
Chain agents together with different providers and models:
|
|
241
99
|
|
|
242
100
|
```typescript
|
|
243
|
-
import {
|
|
101
|
+
import { ClaudeAgent } from '@agentionai/agents/claude';
|
|
102
|
+
import { OpenAiAgent } from '@agentionai/agents/openai';
|
|
103
|
+
import { Pipeline } from '@agentionai/agents/core';
|
|
244
104
|
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
105
|
+
const researcher = new OpenAiAgent({
|
|
106
|
+
id: 'researcher',
|
|
107
|
+
name: 'Researcher',
|
|
108
|
+
description: 'Research the given topic and provide key facts.',
|
|
109
|
+
model: 'gpt-4o',
|
|
110
|
+
tools: [searchTool],
|
|
248
111
|
});
|
|
249
112
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
```typescript
|
|
257
|
-
import { VotingSystem } from '@agentionai/agents';
|
|
258
|
-
|
|
259
|
-
const voting = new VotingSystem({
|
|
260
|
-
name: 'code-review',
|
|
261
|
-
candidates: [juniorDev, seniorDev, architect],
|
|
262
|
-
judge: techLead,
|
|
113
|
+
const writer = new ClaudeAgent({
|
|
114
|
+
id: 'writer',
|
|
115
|
+
name: 'Writer',
|
|
116
|
+
description: 'Write a blog post based on the research provided.',
|
|
117
|
+
model: 'claude-sonnet-4-5',
|
|
263
118
|
});
|
|
264
|
-
// Multiple solutions proposed, judge picks best
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
#### Router Patterns
|
|
268
119
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
const router = new RouterExecutor({
|
|
273
|
-
name: 'support-router',
|
|
274
|
-
routes: [
|
|
275
|
-
{ name: 'billing', agent: billingAgent, description: 'Billing questions' },
|
|
276
|
-
{ name: 'technical', agent: techAgent, description: 'Technical issues' },
|
|
277
|
-
],
|
|
278
|
-
routerAgent: classifierAgent,
|
|
279
|
-
});
|
|
280
|
-
// Routes input to appropriate agent
|
|
120
|
+
const pipeline = new Pipeline([researcher, writer]);
|
|
121
|
+
const result = await pipeline.execute('Renewable energy trends in 2024');
|
|
281
122
|
```
|
|
282
123
|
|
|
283
|
-
###
|
|
284
|
-
|
|
285
|
-
#### Chunking Strategies
|
|
124
|
+
### Agent Delegation
|
|
286
125
|
|
|
287
|
-
|
|
126
|
+
Use agents as tools for hierarchical workflows:
|
|
288
127
|
|
|
289
128
|
```typescript
|
|
290
|
-
import {
|
|
129
|
+
import { ClaudeAgent } from '@agentionai/agents/claude';
|
|
130
|
+
import { OpenAiAgent } from '@agentionai/agents/openai';
|
|
291
131
|
|
|
292
|
-
//
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
// Token-aware chunking (best for LLM context limits)
|
|
300
|
-
const tokenChunker = new TokenChunker({
|
|
301
|
-
chunkSize: 500, // tokens, not characters
|
|
302
|
-
chunkOverlap: 50,
|
|
132
|
+
// Research assistant (cheaper model for data gathering)
|
|
133
|
+
const researchAssistant = new OpenAiAgent({
|
|
134
|
+
id: 'research-assistant',
|
|
135
|
+
name: 'Research Assistant',
|
|
136
|
+
description: 'Search and summarize information on topics.',
|
|
137
|
+
model: 'gpt-4o-mini',
|
|
138
|
+
tools: [searchTool],
|
|
303
139
|
});
|
|
304
140
|
|
|
305
|
-
//
|
|
306
|
-
const
|
|
307
|
-
|
|
308
|
-
|
|
141
|
+
// Lead researcher delegates to assistant, synthesizes findings
|
|
142
|
+
const researcher = new ClaudeAgent({
|
|
143
|
+
id: 'researcher',
|
|
144
|
+
name: 'Lead Researcher',
|
|
145
|
+
description: 'Research topics thoroughly using your assistant.',
|
|
146
|
+
model: 'claude-sonnet-4-5',
|
|
147
|
+
agents: [researchAssistant], // Assistant available as a tool
|
|
309
148
|
});
|
|
310
149
|
|
|
311
|
-
const
|
|
312
|
-
sourceId: 'doc-123',
|
|
313
|
-
metadata: { author: 'Alice' },
|
|
314
|
-
});
|
|
150
|
+
const result = await researcher.execute('Latest developments in quantum computing');
|
|
315
151
|
```
|
|
316
152
|
|
|
317
|
-
|
|
153
|
+
## Core Concepts
|
|
318
154
|
|
|
319
|
-
|
|
155
|
+
### Agents
|
|
156
|
+
Unified interface across Claude, OpenAI, Gemini, and Mistral. Tools, history, and token tracking built-in.
|
|
320
157
|
|
|
321
|
-
|
|
322
|
-
import { IngestionPipeline, RecursiveChunker } from '@agentionai/agents';
|
|
323
|
-
|
|
324
|
-
const chunker = new RecursiveChunker({ chunkSize: 1000 });
|
|
325
|
-
const embeddings = new OpenAIEmbeddings({ model: 'text-embedding-3-small' });
|
|
326
|
-
const store = await LanceDBVectorStore.create({
|
|
327
|
-
name: 'docs',
|
|
328
|
-
uri: './data',
|
|
329
|
-
tableName: 'chunks',
|
|
330
|
-
embeddings,
|
|
331
|
-
});
|
|
158
|
+
[Learn more →](https://docs.agention.ai/guide/agents)
|
|
332
159
|
|
|
333
|
-
|
|
160
|
+
### Tools
|
|
161
|
+
JSON Schema + handler pattern. Unique capability: wrap any agent as a tool for delegation hierarchies.
|
|
334
162
|
|
|
335
|
-
|
|
336
|
-
sourceId: 'doc-001',
|
|
337
|
-
batchSize: 50,
|
|
338
|
-
onProgress: ({ phase, processed, total }) => {
|
|
339
|
-
console.log(`${phase}: ${processed}/${total}`);
|
|
340
|
-
},
|
|
341
|
-
});
|
|
342
|
-
```
|
|
163
|
+
[Learn more →](https://docs.agention.ai/guide/tools)
|
|
343
164
|
|
|
344
|
-
###
|
|
165
|
+
### History
|
|
166
|
+
Provider-agnostic, persistent (Redis, file, custom), shareable across agents of different providers.
|
|
345
167
|
|
|
346
|
-
|
|
168
|
+
[Learn more →](https://docs.agention.ai/guide/history)
|
|
347
169
|
|
|
348
|
-
|
|
349
|
-
|
|
170
|
+
### Graph Pipelines
|
|
171
|
+
Compose sequential, parallel, voting, routing, and nested graphs. Mix models and providers freely.
|
|
350
172
|
|
|
351
|
-
|
|
352
|
-
const result = await pipeline.execute('Input', { metrics });
|
|
173
|
+
[Learn more →](https://docs.agention.ai/guide/graph-pipelines)
|
|
353
174
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
totalDuration: stats.totalDuration,
|
|
357
|
-
totalTokens: stats.totalInputTokens + stats.totalOutputTokens,
|
|
358
|
-
nodeCount: stats.nodes.length,
|
|
359
|
-
});
|
|
175
|
+
### RAG & Vector Stores
|
|
176
|
+
LanceDB vector store, token-aware chunking, ingestion pipeline, and retrieval tools out of the box.
|
|
360
177
|
|
|
361
|
-
|
|
362
|
-
stats.nodes.forEach(node => {
|
|
363
|
-
console.log(`${node.name}: ${node.duration}ms, ${node.tokens?.total} tokens`);
|
|
364
|
-
});
|
|
365
|
-
```
|
|
178
|
+
[Learn more →](https://docs.agention.ai/guide/vector-stores)
|
|
366
179
|
|
|
367
|
-
|
|
180
|
+
### Observability
|
|
181
|
+
Per-call and per-node token counts, duration metrics, full execution visibility.
|
|
368
182
|
|
|
369
|
-
|
|
370
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
371
|
-
│ Agention │
|
|
372
|
-
│ │
|
|
373
|
-
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
|
|
374
|
-
│ │ Claude │ │ OpenAI │ │ Mistral │ │ Gemini │ │
|
|
375
|
-
│ │ Agent │ │ Agent │ │ Agent │ │ Agent │ │
|
|
376
|
-
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
|
|
377
|
-
│ │ │ │ │ │
|
|
378
|
-
│ └─────────────┴───────────────┴─────────────┘ │
|
|
379
|
-
│ │ │
|
|
380
|
-
│ ┌─────▼─────┐ │
|
|
381
|
-
│ │ BaseAgent │ │
|
|
382
|
-
│ │ Interface │ │
|
|
383
|
-
│ └─────┬─────┘ │
|
|
384
|
-
│ │ │
|
|
385
|
-
│ ┌──────────────────┼──────────────────┐ │
|
|
386
|
-
│ │ │ │ │
|
|
387
|
-
│ ┌────▼────┐ ┌─────▼─────┐ ┌─────▼─────┐ │
|
|
388
|
-
│ │ Tools │ │ Pipelines │ │ History │ │
|
|
389
|
-
│ └─────────┘ └───────────┘ └───────────┘ │
|
|
390
|
-
│ │ │ │
|
|
391
|
-
│ ┌────▼────────────┐ │ │
|
|
392
|
-
│ │ Vector Stores │ │ │
|
|
393
|
-
│ │ - LanceDB │ │ │
|
|
394
|
-
│ │ - Embeddings │ │ │
|
|
395
|
-
│ └─────────────────┘ │ │
|
|
396
|
-
│ │ │
|
|
397
|
-
│ ┌──────────────────┼──────────────────┐ │
|
|
398
|
-
│ │ │ │ │
|
|
399
|
-
│ ┌────▼────┐ ┌─────▼─────┐ ┌─────▼─────┐ │
|
|
400
|
-
│ │Sequential│ │ Parallel │ │ Router │ │
|
|
401
|
-
│ │Executor │ │ Executor │ │ Executor │ │
|
|
402
|
-
│ └──────────┘ └───────────┘ └───────────┘ │
|
|
403
|
-
│ │
|
|
404
|
-
└─────────────────────────────────────────────────────────────┘
|
|
405
|
-
```
|
|
183
|
+
[Learn more →](https://docs.agention.ai/guide/graph-pipelines#metrics--observability)
|
|
406
184
|
|
|
407
185
|
## Documentation
|
|
408
186
|
|
|
409
|
-
- **[Getting Started](docs/guide/getting-started
|
|
410
|
-
- **[
|
|
411
|
-
- **[
|
|
412
|
-
- **[
|
|
413
|
-
- **[
|
|
414
|
-
- **[
|
|
415
|
-
- **[Examples](docs/guide/examples
|
|
416
|
-
- **[API Reference](docs/api)** - Full API documentation
|
|
187
|
+
- **[Getting Started](https://docs.agention.ai/guide/getting-started)** - Installation and first agent
|
|
188
|
+
- **[Quick Start](https://docs.agention.ai/guide/quickstart)** - Build a weather assistant in 5 minutes
|
|
189
|
+
- **[Agents](https://docs.agention.ai/guide/agents)** - Agent configuration and providers
|
|
190
|
+
- **[Tools](https://docs.agention.ai/guide/tools)** - Adding capabilities and agent delegation
|
|
191
|
+
- **[Graph Pipelines](https://docs.agention.ai/guide/graph-pipelines)** - Multi-agent workflows
|
|
192
|
+
- **[Vector Stores](https://docs.agention.ai/guide/vector-stores)** - RAG and semantic search
|
|
193
|
+
- **[Examples](https://docs.agention.ai/guide/examples)** - Real-world implementations
|
|
194
|
+
- **[API Reference](https://docs.agention.ai/api)** - Full API documentation
|
|
195
|
+
|
|
196
|
+
## Why Agention?
|
|
197
|
+
|
|
198
|
+
| | Raw SDKs | Heavy Frameworks | Agention |
|
|
199
|
+
|---|---|---|---|
|
|
200
|
+
| **Control** | Full | Limited | Full |
|
|
201
|
+
| **Boilerplate** | High | Low | Low |
|
|
202
|
+
| **Transparency** | Full | Limited | Full |
|
|
203
|
+
| **Multi-provider** | Manual | Varies | Built-in |
|
|
204
|
+
| **TypeScript** | Varies | Often partial | Native |
|
|
205
|
+
|
|
206
|
+
- **Ship faster** — Stop rebuilding agent infrastructure for every project
|
|
207
|
+
- **Stay flexible** — Swap providers, mix models, customize everything
|
|
208
|
+
- **Keep control** — See exactly what's happening at every step
|
|
209
|
+
- **Scale confidently** — Built-in metrics, token tracking, and observability
|
|
417
210
|
|
|
418
211
|
## Examples
|
|
419
212
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
- **Basic Agents** - Simple agent usage with different providers
|
|
423
|
-
- **Tool Usage** - Agents with custom tools
|
|
424
|
-
- **Multi-Agent Pipelines** - Sequential, parallel, and voting patterns
|
|
425
|
-
- **RAG Applications** - Vector search and document retrieval
|
|
426
|
-
- **Document Ingestion** - Chunking and embedding pipelines
|
|
427
|
-
- **Graph-based RAG** - Advanced knowledge graph integration
|
|
428
|
-
|
|
429
|
-
## Development
|
|
430
|
-
|
|
431
|
-
### Commands
|
|
432
|
-
|
|
433
|
-
```bash
|
|
434
|
-
# Build
|
|
435
|
-
npm run build
|
|
436
|
-
|
|
437
|
-
# Test
|
|
438
|
-
npm test
|
|
439
|
-
npm run test:watch
|
|
440
|
-
|
|
441
|
-
# Linting
|
|
442
|
-
npm run lint
|
|
443
|
-
npm run lint:fix
|
|
444
|
-
|
|
445
|
-
# Documentation
|
|
446
|
-
npm run docs:dev # Start docs dev server
|
|
447
|
-
npm run docs:build # Build documentation
|
|
448
|
-
npm run docs:api # Generate API docs
|
|
449
|
-
|
|
450
|
-
# Examples
|
|
451
|
-
npm run example # Run example code
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
### Project Structure
|
|
455
|
-
|
|
456
|
-
```
|
|
457
|
-
agention-lib/
|
|
458
|
-
├── lib/
|
|
459
|
-
│ ├── agents/ # Agent implementations
|
|
460
|
-
│ │ ├── anthropic/ # Claude agent
|
|
461
|
-
│ │ ├── openai/ # OpenAI agent
|
|
462
|
-
│ │ ├── mistral/ # Mistral agent
|
|
463
|
-
│ │ ├── google/ # Gemini agent
|
|
464
|
-
│ │ └── BaseAgent.ts # Abstract base class
|
|
465
|
-
│ ├── tools/ # Tool system
|
|
466
|
-
│ ├── history/ # Conversation management
|
|
467
|
-
│ ├── graph/ # Pipeline executors
|
|
468
|
-
│ │ ├── executors/ # Sequential, Parallel, Map, Voting, Router
|
|
469
|
-
│ │ ├── MetricsCollector.ts
|
|
470
|
-
│ │ └── Pipeline.ts
|
|
471
|
-
│ ├── chunking/ # Document chunking
|
|
472
|
-
│ │ ├── TextChunker.ts
|
|
473
|
-
│ │ ├── RecursiveChunker.ts
|
|
474
|
-
│ │ └── TokenChunker.ts
|
|
475
|
-
│ ├── ingestion/ # Ingestion pipeline
|
|
476
|
-
│ └── vectorstore/ # Vector store implementations
|
|
477
|
-
│ ├── LanceDBVectorStore.ts
|
|
478
|
-
│ └── embeddings/
|
|
479
|
-
├── examples/ # Example applications
|
|
480
|
-
├── docs/ # Documentation
|
|
481
|
-
└── dist/ # Build output
|
|
482
|
-
```
|
|
213
|
+
Check out the [examples](https://github.com/laurentzuijdwijk/agention-lib/tree/master/examples) directory for complete working examples:
|
|
483
214
|
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
# LLM Providers
|
|
490
|
-
export ANTHROPIC_API_KEY=your-key-here
|
|
491
|
-
export OPENAI_API_KEY=your-key-here
|
|
492
|
-
export MISTRAL_API_KEY=your-key-here
|
|
493
|
-
export GOOGLE_API_KEY=your-key-here
|
|
494
|
-
```
|
|
215
|
+
- Basic agents with different providers
|
|
216
|
+
- Custom tools and agent delegation
|
|
217
|
+
- Sequential, parallel, and voting pipelines
|
|
218
|
+
- RAG applications with vector search
|
|
219
|
+
- Document ingestion and chunking
|
|
495
220
|
|
|
496
221
|
## Contributing
|
|
497
222
|
|
|
498
|
-
Contributions are welcome! Please
|
|
499
|
-
|
|
500
|
-
## License
|
|
501
|
-
|
|
502
|
-
MIT
|
|
503
|
-
|
|
504
|
-
## Roadmap
|
|
505
|
-
|
|
506
|
-
- [ ] Streaming response support
|
|
507
|
-
- [ ] Additional vector store integrations (Pinecone, Weaviate)
|
|
508
|
-
- [ ] Conditional and loop executors
|
|
509
|
-
- [ ] Graph visualization tools
|
|
510
|
-
- [ ] Enhanced retry mechanisms
|
|
511
|
-
- [ ] Middleware system for request/response processing
|
|
223
|
+
Contributions are welcome! Please open an issue or submit a pull request.
|
|
512
224
|
|
|
513
|
-
##
|
|
225
|
+
## Links
|
|
514
226
|
|
|
515
|
-
- **
|
|
516
|
-
- **
|
|
517
|
-
- **
|
|
227
|
+
- **[Documentation](https://docs.agention.ai/)**
|
|
228
|
+
- **[GitHub](https://github.com/laurentzuijdwijk/agention-lib)**
|
|
229
|
+
- **[npm](https://www.npmjs.com/package/@agentionai/agents)**
|
|
230
|
+
- **[Issues](https://github.com/laurentzuijdwijk/agention-lib/issues)**
|
package/dist/agents/Agent.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ type MistralAgentConfig = Omit<BaseAgentConfig, "vendor" | "model"> & {
|
|
|
23
23
|
};
|
|
24
24
|
type AgentConfig = ClaudeAgentConfig | OpenAIAgentConfig | GeminiAgentConfig | MistralAgentConfig;
|
|
25
25
|
export declare class Agent {
|
|
26
|
-
static create(config: AgentConfig, history?: History): ClaudeAgent | OpenAiAgent |
|
|
26
|
+
static create(config: AgentConfig, history?: History): ClaudeAgent | OpenAiAgent | GeminiAgent | MistralAgent;
|
|
27
27
|
}
|
|
28
28
|
export {};
|
|
29
29
|
//# sourceMappingURL=Agent.d.ts.map
|
package/dist/claude.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./agents/BaseAgent";
|
|
2
|
+
export * from "./agents/anthropic/ClaudeAgent";
|
|
3
|
+
export * from "./agents/model-types";
|
|
4
|
+
export { anthropicTransformer } from "./history/transformers";
|
|
5
|
+
export * from "./history/History";
|
|
6
|
+
export * from "./history/types";
|
|
7
|
+
export * from "./tools/Tool";
|
|
8
|
+
export * from "./graph/AgentGraph";
|
|
9
|
+
//# sourceMappingURL=claude.d.ts.map
|
package/dist/claude.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.anthropicTransformer = void 0;
|
|
18
|
+
// Claude Agent Entry Point
|
|
19
|
+
__exportStar(require("./agents/BaseAgent"), exports);
|
|
20
|
+
__exportStar(require("./agents/anthropic/ClaudeAgent"), exports);
|
|
21
|
+
__exportStar(require("./agents/model-types"), exports);
|
|
22
|
+
var transformers_1 = require("./history/transformers");
|
|
23
|
+
Object.defineProperty(exports, "anthropicTransformer", { enumerable: true, get: function () { return transformers_1.anthropicTransformer; } });
|
|
24
|
+
// Re-export core functionality
|
|
25
|
+
__exportStar(require("./history/History"), exports);
|
|
26
|
+
__exportStar(require("./history/types"), exports);
|
|
27
|
+
__exportStar(require("./tools/Tool"), exports);
|
|
28
|
+
__exportStar(require("./graph/AgentGraph"), exports);
|
|
29
|
+
//# sourceMappingURL=claude.js.map
|
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./agents/BaseAgent";
|
|
2
|
+
export * from "./agents/Agent";
|
|
3
|
+
export * from "./agents/model-types";
|
|
4
|
+
export * from "./agents/AgentConfig";
|
|
5
|
+
export * from "./agents/AgentEvent";
|
|
6
|
+
export * from "./agents/errors/AgentError";
|
|
7
|
+
export * from "./history/History";
|
|
8
|
+
export * from "./history/types";
|
|
9
|
+
export * from "./graph/AgentGraph";
|
|
10
|
+
export * from "./tools/Tool";
|
|
11
|
+
export * from "./viz";
|
|
12
|
+
export * from "./vectorstore";
|
|
13
|
+
export * from "./chunkers";
|
|
14
|
+
export * from "./ingestion";
|
|
15
|
+
//# sourceMappingURL=core.d.ts.map
|
package/dist/core.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Core functionality without any agent implementations
|
|
18
|
+
__exportStar(require("./agents/BaseAgent"), exports);
|
|
19
|
+
__exportStar(require("./agents/Agent"), exports);
|
|
20
|
+
__exportStar(require("./agents/model-types"), exports);
|
|
21
|
+
__exportStar(require("./agents/AgentConfig"), exports);
|
|
22
|
+
__exportStar(require("./agents/AgentEvent"), exports);
|
|
23
|
+
__exportStar(require("./agents/errors/AgentError"), exports);
|
|
24
|
+
// History
|
|
25
|
+
__exportStar(require("./history/History"), exports);
|
|
26
|
+
__exportStar(require("./history/types"), exports);
|
|
27
|
+
// Graph
|
|
28
|
+
__exportStar(require("./graph/AgentGraph"), exports);
|
|
29
|
+
// Tools
|
|
30
|
+
__exportStar(require("./tools/Tool"), exports);
|
|
31
|
+
// Visualization
|
|
32
|
+
__exportStar(require("./viz"), exports);
|
|
33
|
+
// Vector Store
|
|
34
|
+
__exportStar(require("./vectorstore"), exports);
|
|
35
|
+
// Chunkers
|
|
36
|
+
__exportStar(require("./chunkers"), exports);
|
|
37
|
+
// Ingestion
|
|
38
|
+
__exportStar(require("./ingestion"), exports);
|
|
39
|
+
//# sourceMappingURL=core.js.map
|
package/dist/gemini.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./agents/BaseAgent";
|
|
2
|
+
export { GeminiAgent } from "./agents/google/GeminiAgent";
|
|
3
|
+
export * from "./agents/model-types";
|
|
4
|
+
export { geminiTransformer } from "./history/transformers";
|
|
5
|
+
export * from "./history/History";
|
|
6
|
+
export * from "./history/types";
|
|
7
|
+
export * from "./tools/Tool";
|
|
8
|
+
export * from "./graph/AgentGraph";
|
|
9
|
+
//# sourceMappingURL=gemini.d.ts.map
|
package/dist/gemini.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.geminiTransformer = exports.GeminiAgent = void 0;
|
|
18
|
+
// Gemini Agent Entry Point
|
|
19
|
+
__exportStar(require("./agents/BaseAgent"), exports);
|
|
20
|
+
var GeminiAgent_1 = require("./agents/google/GeminiAgent");
|
|
21
|
+
Object.defineProperty(exports, "GeminiAgent", { enumerable: true, get: function () { return GeminiAgent_1.GeminiAgent; } });
|
|
22
|
+
__exportStar(require("./agents/model-types"), exports);
|
|
23
|
+
var transformers_1 = require("./history/transformers");
|
|
24
|
+
Object.defineProperty(exports, "geminiTransformer", { enumerable: true, get: function () { return transformers_1.geminiTransformer; } });
|
|
25
|
+
// Re-export core functionality
|
|
26
|
+
__exportStar(require("./history/History"), exports);
|
|
27
|
+
__exportStar(require("./history/types"), exports);
|
|
28
|
+
__exportStar(require("./tools/Tool"), exports);
|
|
29
|
+
__exportStar(require("./graph/AgentGraph"), exports);
|
|
30
|
+
//# sourceMappingURL=gemini.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Main index - exports all agents (requires all peer dependencies)
|
|
3
|
+
// For selective imports, use sub-paths:
|
|
4
|
+
// import { ClaudeAgent } from "@agentionai/agents/claude";
|
|
5
|
+
// import { OpenAiAgent } from "@agentionai/agents/openai";
|
|
6
|
+
// import { MistralAgent } from "@agentionai/agents/mistral";
|
|
7
|
+
// import { GeminiAgent } from "@agentionai/agents/gemini";
|
|
8
|
+
// Or use core-only imports:
|
|
9
|
+
// import { BaseAgent } from "@agentionai/agents/core";
|
|
2
10
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
11
|
if (k2 === undefined) k2 = k;
|
|
4
12
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./agents/BaseAgent";
|
|
2
|
+
export { MistralAgent } from "./agents/mistral/MistralAgent";
|
|
3
|
+
export * from "./agents/model-types";
|
|
4
|
+
export { mistralTransformer } from "./history/transformers";
|
|
5
|
+
export * from "./history/History";
|
|
6
|
+
export * from "./history/types";
|
|
7
|
+
export * from "./tools/Tool";
|
|
8
|
+
export * from "./graph/AgentGraph";
|
|
9
|
+
//# sourceMappingURL=mistral.d.ts.map
|
package/dist/mistral.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.mistralTransformer = exports.MistralAgent = void 0;
|
|
18
|
+
// Mistral Agent Entry Point
|
|
19
|
+
__exportStar(require("./agents/BaseAgent"), exports);
|
|
20
|
+
var MistralAgent_1 = require("./agents/mistral/MistralAgent");
|
|
21
|
+
Object.defineProperty(exports, "MistralAgent", { enumerable: true, get: function () { return MistralAgent_1.MistralAgent; } });
|
|
22
|
+
__exportStar(require("./agents/model-types"), exports);
|
|
23
|
+
var transformers_1 = require("./history/transformers");
|
|
24
|
+
Object.defineProperty(exports, "mistralTransformer", { enumerable: true, get: function () { return transformers_1.mistralTransformer; } });
|
|
25
|
+
// Re-export core functionality
|
|
26
|
+
__exportStar(require("./history/History"), exports);
|
|
27
|
+
__exportStar(require("./history/types"), exports);
|
|
28
|
+
__exportStar(require("./tools/Tool"), exports);
|
|
29
|
+
__exportStar(require("./graph/AgentGraph"), exports);
|
|
30
|
+
//# sourceMappingURL=mistral.js.map
|
package/dist/openai.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./agents/BaseAgent";
|
|
2
|
+
export { OpenAiAgent } from "./agents/openai/OpenAiAgent";
|
|
3
|
+
export * from "./agents/model-types";
|
|
4
|
+
export { openAiTransformer } from "./history/transformers";
|
|
5
|
+
export * from "./history/History";
|
|
6
|
+
export * from "./history/types";
|
|
7
|
+
export * from "./tools/Tool";
|
|
8
|
+
export * from "./graph/AgentGraph";
|
|
9
|
+
//# sourceMappingURL=openai.d.ts.map
|
package/dist/openai.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.openAiTransformer = exports.OpenAiAgent = void 0;
|
|
18
|
+
// OpenAI Agent Entry Point
|
|
19
|
+
__exportStar(require("./agents/BaseAgent"), exports);
|
|
20
|
+
var OpenAiAgent_1 = require("./agents/openai/OpenAiAgent");
|
|
21
|
+
Object.defineProperty(exports, "OpenAiAgent", { enumerable: true, get: function () { return OpenAiAgent_1.OpenAiAgent; } });
|
|
22
|
+
__exportStar(require("./agents/model-types"), exports);
|
|
23
|
+
var transformers_1 = require("./history/transformers");
|
|
24
|
+
Object.defineProperty(exports, "openAiTransformer", { enumerable: true, get: function () { return transformers_1.openAiTransformer; } });
|
|
25
|
+
// Re-export core functionality
|
|
26
|
+
__exportStar(require("./history/History"), exports);
|
|
27
|
+
__exportStar(require("./history/types"), exports);
|
|
28
|
+
__exportStar(require("./tools/Tool"), exports);
|
|
29
|
+
__exportStar(require("./graph/AgentGraph"), exports);
|
|
30
|
+
//# sourceMappingURL=openai.js.map
|
package/package.json
CHANGED
|
@@ -1,15 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentionai/agents",
|
|
3
3
|
"author": "Laurent Zuijdwijk",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "Agent Library",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./core": {
|
|
14
|
+
"types": "./dist/core.d.ts",
|
|
15
|
+
"default": "./dist/core.js"
|
|
16
|
+
},
|
|
17
|
+
"./claude": {
|
|
18
|
+
"types": "./dist/claude.d.ts",
|
|
19
|
+
"default": "./dist/claude.js"
|
|
20
|
+
},
|
|
21
|
+
"./openai": {
|
|
22
|
+
"types": "./dist/openai.d.ts",
|
|
23
|
+
"default": "./dist/openai.js"
|
|
24
|
+
},
|
|
25
|
+
"./mistral": {
|
|
26
|
+
"types": "./dist/mistral.d.ts",
|
|
27
|
+
"default": "./dist/mistral.js"
|
|
28
|
+
},
|
|
29
|
+
"./gemini": {
|
|
30
|
+
"types": "./dist/gemini.d.ts",
|
|
31
|
+
"default": "./dist/gemini.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
8
34
|
"files": [
|
|
9
35
|
"dist/**/*.js",
|
|
10
36
|
"dist/**/*.d.ts",
|
|
11
|
-
"README.md"
|
|
12
|
-
"LICENSE"
|
|
37
|
+
"README.md"
|
|
13
38
|
],
|
|
14
39
|
"repository": {
|
|
15
40
|
"type": "git",
|
|
@@ -32,7 +57,7 @@
|
|
|
32
57
|
"docs:site": "vitepress build docs",
|
|
33
58
|
"docs:dev": "vitepress dev docs",
|
|
34
59
|
"docs:preview": "vitepress preview docs",
|
|
35
|
-
"publish:npm": "npm publish --registry=https://registry.npmjs.org",
|
|
60
|
+
"publish:npm": "npm publish --registry=https://registry.npmjs.org --access public",
|
|
36
61
|
"publish:github": "npm publish --registry=https://npm.pkg.github.com",
|
|
37
62
|
"publish:all": "npm run publish:npm && npm run publish:github"
|
|
38
63
|
},
|
package/readme.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Readme for atomic agents
|