@agentionai/agents 0.3.0-beta β†’ 0.3.1

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 (3) hide show
  1. package/README.md +125 -425
  2. package/package.json +3 -4
  3. package/readme.md +0 -1
package/README.md CHANGED
@@ -1,517 +1,217 @@
1
1
  # Agention
2
2
 
3
- > A TypeScript library for building AI-powered agents, tools, and complex workflows
3
+ > AI Agents Without the Magic
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@agentionai/agents.svg)](https://www.npmjs.com/package/@agentionai/agents)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
6
 
8
- Agention provides a clean, modular architecture for working with LLMs from multiple providers. Build single-purpose agents or orchestrate complex multi-agent workflows with built-in tools, vector search, and document processing capabilities.
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
- ## Features
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
9
+ **[Documentation](https://docs.agention.ai/)** β€’ **[Examples](https://docs.agention.ai/guide/examples)** β€’ **[GitHub](https://github.com/laurentzuijdwijk/agention-lib)**
19
10
 
20
- ## Installation
11
+ ## Quick Start
21
12
 
22
13
  ```bash
23
14
  npm install @agentionai/agents
24
15
  ```
25
16
 
26
- Install the SDK for your chosen LLM provider:
17
+ Install provider SDKs as needed:
27
18
 
28
19
  ```bash
29
- # For Claude
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
20
+ npm install @anthropic-ai/sdk # For Claude
21
+ npm install openai # For OpenAI/GPT
22
+ npm install @google/generative-ai # For Gemini
23
+ npm install @mistralai/mistralai # For Mistral
37
24
  ```
38
25
 
39
- ## Quick Start
40
-
41
- ### Basic Agent
26
+ ### Simple Agent
42
27
 
43
28
  ```typescript
44
29
  import { ClaudeAgent } from '@agentionai/agents';
45
30
 
46
31
  const agent = new ClaudeAgent({
47
- model: 'claude-sonnet-4-20250514',
48
- systemPrompt: 'You are a helpful assistant.',
32
+ model: 'claude-sonnet-4-5',
33
+ name: 'Assistant',
34
+ description: 'You are a helpful assistant.',
49
35
  });
50
36
 
51
- const response = await agent.execute('What is the capital of France?');
37
+ const response = await agent.execute('What can you help me with?');
52
38
  console.log(response);
53
39
  ```
54
40
 
41
+
42
+ ## Features
43
+
44
+ - **Multi-Provider, No Lock-in** - Claude, OpenAI, Gemini, Mistralβ€”same interface. Switch models with one line.
45
+ - **Composable, Not Magical** - Agents are objects. Pipelines are arrays. No hidden state, no surprises.
46
+ - **Full Observability** - Per-call token counts, execution timing, pipeline structure visualization.
47
+ - **TypeScript-Native** - Strict typing, interfaces, and generics from the ground up.
48
+ - **RAG Ready** - LanceDB vector store, token-aware chunking, ingestion pipeline out of the box.
49
+
50
+
55
51
  ### Agent with Tools
56
52
 
57
53
  ```typescript
58
- import { ClaudeAgent, Tool } from '@agentionai/agents';
54
+ import { GeminiAgent, Tool } from '@agentionai/agents';
59
55
 
60
- const calculator = new Tool({
61
- name: 'calculate',
62
- description: 'Perform mathematical calculations',
56
+ const weatherTool = new Tool({
57
+ name: 'get_weather',
58
+ description: 'Get the current weather for a location',
63
59
  input_schema: {
64
60
  type: 'object',
65
61
  properties: {
66
- expression: { type: 'string', description: 'Math expression to evaluate' },
62
+ location: { type: 'string', description: 'City name' },
67
63
  },
68
- required: ['expression'],
64
+ required: ['location'],
69
65
  },
70
- handler: async ({ expression }) => {
71
- return String(eval(expression));
66
+ handler: async ({ location }) => {
67
+ // In production, call a weather API
68
+ return JSON.stringify({
69
+ location,
70
+ temperature: 22,
71
+ conditions: 'Sunny',
72
+ });
72
73
  },
73
74
  });
74
75
 
75
- const agent = new ClaudeAgent({
76
- model: 'claude-sonnet-4-20250514',
77
- systemPrompt: 'You are a helpful math assistant.',
78
- tools: [calculator],
76
+ const agent = new GeminiAgent({
77
+ model: 'gemini-flash-lite-latest',
78
+ name: 'Weather Agent',
79
+ description: 'You are a weather assistant.',
80
+ tools: [weatherTool],
79
81
  });
80
82
 
81
- const response = await agent.execute('What is 15% of 230?');
82
- // Agent automatically uses the calculator tool
83
+ const response = await agent.execute("What's the weather in Paris?");
83
84
  ```
84
85
 
85
86
  ### Multi-Agent Pipeline
86
87
 
88
+ Chain agents together with different providers and models:
89
+
87
90
  ```typescript
88
- import { Pipeline, ClaudeAgent, OpenAiAgent } from '@agentionai/agents';
91
+ import { ClaudeAgent, OpenAiAgent, Pipeline } from '@agentionai/agents';
89
92
 
90
- // Research agent with search capabilities
91
93
  const researcher = new OpenAiAgent({
92
- name: 'researcher',
94
+ id: 'researcher',
95
+ name: 'Researcher',
96
+ description: 'Research the given topic and provide key facts.',
93
97
  model: 'gpt-4o',
94
- systemPrompt: 'Research the topic thoroughly.',
95
- tools: [webSearchTool],
98
+ tools: [searchTool],
96
99
  });
97
100
 
98
- // Writing agent
99
101
  const writer = new ClaudeAgent({
100
- name: 'writer',
101
- model: 'claude-sonnet-4-20250514',
102
- systemPrompt: 'Write a compelling blog post from the research.',
102
+ id: 'writer',
103
+ name: 'Writer',
104
+ description: 'Write a blog post based on the research provided.',
105
+ model: 'claude-sonnet-4-5',
103
106
  });
104
107
 
105
- // Chain them together
106
108
  const pipeline = new Pipeline([researcher, writer]);
107
- const result = await pipeline.execute('AI in Healthcare');
108
- // researcher output β†’ writer input β†’ final blog post
109
- ```
110
-
111
- ### RAG with Vector Search
112
-
113
- ```typescript
114
- import { ClaudeAgent, LanceDBVectorStore, OpenAIEmbeddings } from '@agentionai/agents';
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?');
145
- ```
146
-
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
-
158
- ```typescript
159
- import { ClaudeAgent, OpenAiAgent, MistralAgent, GeminiAgent } from '@agentionai/agents';
160
-
161
- // Same interface, different providers
162
- const claude = new ClaudeAgent({ model: 'claude-sonnet-4-20250514' });
163
- const openai = new OpenAiAgent({ model: 'gpt-4o' });
164
- const mistral = new MistralAgent({ model: 'mistral-large-latest' });
165
- const gemini = new GeminiAgent({ model: 'gemini-2.0-flash' });
109
+ const result = await pipeline.execute('Renewable energy trends in 2024');
166
110
  ```
167
111
 
168
- ### Tools
169
-
170
- Tools give agents abilities beyond text generation. Define them with JSON Schema:
171
-
172
- ```typescript
173
- const weatherTool = new Tool({
174
- name: 'get_weather',
175
- description: 'Get current weather for a city',
176
- input_schema: {
177
- type: 'object',
178
- properties: {
179
- city: { type: 'string' },
180
- units: { type: 'string', enum: ['celsius', 'fahrenheit'] },
181
- },
182
- required: ['city'],
183
- },
184
- handler: async ({ city, units }) => {
185
- const weather = await fetchWeather(city, units);
186
- return JSON.stringify(weather);
187
- },
188
- });
189
- ```
190
-
191
- **Advanced: Agents as Tools**
112
+ ### Agent Delegation
192
113
 
193
114
  Use agents as tools for hierarchical workflows:
194
115
 
195
116
  ```typescript
196
- // Specialized sub-agent
117
+ import { ClaudeAgent, OpenAiAgent, Tool } from '@agentionai/agents';
118
+
119
+ // Research assistant (cheaper model for data gathering)
197
120
  const researchAssistant = new OpenAiAgent({
198
- name: 'research-assistant',
199
- description: 'Expert at finding research papers',
200
- tools: [pubmedSearchTool],
121
+ id: 'research-assistant',
122
+ name: 'Research Assistant',
123
+ description: 'Search and summarize information on topics.',
201
124
  model: 'gpt-4o-mini',
125
+ tools: [searchTool],
202
126
  });
203
127
 
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',
209
- });
210
- ```
211
-
212
- ### Graph Pipelines
213
-
214
- Build complex workflows by combining agents and executors:
215
-
216
- #### Sequential Processing
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
226
- ```
227
-
228
- #### Parallel Execution
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
- ```
239
-
240
- #### Map Operations
241
-
242
- ```typescript
243
- import { MapExecutor } from '@agentionai/agents';
244
-
245
- const mapper = new MapExecutor({
246
- name: 'batch-process',
247
- processor: summarizer,
248
- });
249
-
250
- await mapper.execute(['doc1', 'doc2', 'doc3']);
251
- // Applies summarizer to each document
252
- ```
253
-
254
- #### Voting Systems
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,
128
+ // Lead researcher delegates to assistant, synthesizes findings
129
+ const researcher = new ClaudeAgent({
130
+ id: 'researcher',
131
+ name: 'Lead Researcher',
132
+ description: 'Research topics thoroughly using your assistant.',
133
+ model: 'claude-sonnet-4-5',
134
+ agents: [researchAssistant], // Assistant available as a tool
263
135
  });
264
- // Multiple solutions proposed, judge picks best
265
- ```
266
-
267
- #### Router Patterns
268
136
 
269
- ```typescript
270
- import { RouterExecutor } from '@agentionai/agents';
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
137
+ const result = await researcher.execute('Latest developments in quantum computing');
281
138
  ```
282
139
 
283
- ### Document Processing
284
-
285
- #### Chunking Strategies
286
-
287
- Split documents intelligently for RAG applications:
288
-
289
- ```typescript
290
- import { RecursiveChunker, TokenChunker, TextChunker } from '@agentionai/agents';
291
-
292
- // Semantic chunking (best for structured docs)
293
- const recursiveChunker = new RecursiveChunker({
294
- chunkSize: 1000,
295
- chunkOverlap: 100,
296
- separators: ['\n\n', '\n', '. ', ' '],
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,
303
- });
304
-
305
- // Simple character-based chunking
306
- const textChunker = new TextChunker({
307
- chunkSize: 1000,
308
- chunkOverlap: 200,
309
- });
310
-
311
- const chunks = await recursiveChunker.chunk(documentText, {
312
- sourceId: 'doc-123',
313
- metadata: { author: 'Alice' },
314
- });
315
- ```
140
+ ## Core Concepts
316
141
 
317
- #### Ingestion Pipeline
142
+ ### Agents
143
+ Unified interface across Claude, OpenAI, Gemini, and Mistral. Tools, history, and token tracking built-in.
318
144
 
319
- Orchestrate chunking, embedding, and storage:
145
+ [Learn more β†’](https://docs.agention.ai/guide/agents)
320
146
 
321
- ```typescript
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
- });
147
+ ### Tools
148
+ JSON Schema + handler pattern. Unique capability: wrap any agent as a tool for delegation hierarchies.
332
149
 
333
- const pipeline = new IngestionPipeline(chunker, embeddings, store);
150
+ [Learn more β†’](https://docs.agention.ai/guide/tools)
334
151
 
335
- const result = await pipeline.ingest(documentText, {
336
- sourceId: 'doc-001',
337
- batchSize: 50,
338
- onProgress: ({ phase, processed, total }) => {
339
- console.log(`${phase}: ${processed}/${total}`);
340
- },
341
- });
342
- ```
152
+ ### History
153
+ Provider-agnostic, persistent (Redis, file, custom), shareable across agents of different providers.
343
154
 
344
- ### Metrics & Observability
155
+ [Learn more β†’](https://docs.agention.ai/guide/history)
345
156
 
346
- Track performance across your pipelines:
157
+ ### Graph Pipelines
158
+ Compose sequential, parallel, voting, routing, and nested graphs. Mix models and providers freely.
347
159
 
348
- ```typescript
349
- import { MetricsCollector } from '@agentionai/agents';
160
+ [Learn more β†’](https://docs.agention.ai/guide/graph-pipelines)
350
161
 
351
- const metrics = new MetricsCollector();
352
- const result = await pipeline.execute('Input', { metrics });
162
+ ### RAG & Vector Stores
163
+ LanceDB vector store, token-aware chunking, ingestion pipeline, and retrieval tools out of the box.
353
164
 
354
- const stats = metrics.getMetrics();
355
- console.log({
356
- totalDuration: stats.totalDuration,
357
- totalTokens: stats.totalInputTokens + stats.totalOutputTokens,
358
- nodeCount: stats.nodes.length,
359
- });
165
+ [Learn more β†’](https://docs.agention.ai/guide/vector-stores)
360
166
 
361
- // Per-node metrics
362
- stats.nodes.forEach(node => {
363
- console.log(`${node.name}: ${node.duration}ms, ${node.tokens?.total} tokens`);
364
- });
365
- ```
167
+ ### Observability
168
+ Per-call and per-node token counts, duration metrics, full execution visibility.
366
169
 
367
- ## Architecture
368
-
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
- ```
170
+ [Learn more β†’](https://docs.agention.ai/guide/graph-pipelines#metrics--observability)
406
171
 
407
172
  ## Documentation
408
173
 
409
- - **[Getting Started](docs/guide/getting-started.md)** - Installation and first steps
410
- - **[Agents](docs/guide/agents.md)** - Agent configuration and providers
411
- - **[Tools](docs/guide/tools.md)** - Creating and using tools
412
- - **[Graph Pipelines](docs/guide/graph-pipelines.md)** - Building multi-agent workflows
413
- - **[Vector Stores](docs/guide/vector-stores.md)** - Semantic search and RAG
414
- - **[Chunking & Ingestion](docs/guide/chunking-and-ingestion.md)** - Document processing
415
- - **[Examples](docs/guide/examples.md)** - Complete example applications
416
- - **[API Reference](docs/api)** - Full API documentation
174
+ - **[Getting Started](https://docs.agention.ai/guide/getting-started)** - Installation and first agent
175
+ - **[Quick Start](https://docs.agention.ai/guide/quickstart)** - Build a weather assistant in 5 minutes
176
+ - **[Agents](https://docs.agention.ai/guide/agents)** - Agent configuration and providers
177
+ - **[Tools](https://docs.agention.ai/guide/tools)** - Adding capabilities and agent delegation
178
+ - **[Graph Pipelines](https://docs.agention.ai/guide/graph-pipelines)** - Multi-agent workflows
179
+ - **[Vector Stores](https://docs.agention.ai/guide/vector-stores)** - RAG and semantic search
180
+ - **[Examples](https://docs.agention.ai/guide/examples)** - Real-world implementations
181
+ - **[API Reference](https://docs.agention.ai/api)** - Full API documentation
182
+
183
+ ## Why Agention?
184
+
185
+ | | Raw SDKs | Heavy Frameworks | Agention |
186
+ |---|---|---|---|
187
+ | **Control** | Full | Limited | Full |
188
+ | **Boilerplate** | High | Low | Low |
189
+ | **Transparency** | Full | Limited | Full |
190
+ | **Multi-provider** | Manual | Varies | Built-in |
191
+ | **TypeScript** | Varies | Often partial | Native |
192
+
193
+ - **Ship faster** β€” Stop rebuilding agent infrastructure for every project
194
+ - **Stay flexible** β€” Swap providers, mix models, customize everything
195
+ - **Keep control** β€” See exactly what's happening at every step
196
+ - **Scale confidently** β€” Built-in metrics, token tracking, and observability
417
197
 
418
198
  ## Examples
419
199
 
420
- See the [examples](examples) directory for complete working examples:
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
- ```
200
+ Check out the [examples](https://github.com/laurentzuijdwijk/agention-lib/tree/master/examples) directory for complete working examples:
483
201
 
484
- ## Environment Variables
485
-
486
- Set API keys as environment variables:
487
-
488
- ```bash
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
- ```
202
+ - Basic agents with different providers
203
+ - Custom tools and agent delegation
204
+ - Sequential, parallel, and voting pipelines
205
+ - RAG applications with vector search
206
+ - Document ingestion and chunking
495
207
 
496
208
  ## Contributing
497
209
 
498
- Contributions are welcome! Please see our development guidelines in [CLAUDE.md](CLAUDE.md).
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
210
+ Contributions are welcome! Please open an issue or submit a pull request.
512
211
 
513
- ## Support
212
+ ## Links
514
213
 
515
- - **Issues**: [GitHub Issues](https://github.com/laurentzuijdwijk/agention-lib/issues)
516
- - **Documentation**: [docs](docs/guide/getting-started.md)
517
- - **Examples**: [examples](examples)
214
+ - **[Documentation](https://docs.agention.ai/)**
215
+ - **[GitHub](https://github.com/laurentzuijdwijk/agention-lib)**
216
+ - **[npm](https://www.npmjs.com/package/@agentionai/agents)**
217
+ - **[Issues](https://github.com/laurentzuijdwijk/agention-lib/issues)**
package/package.json CHANGED
@@ -1,15 +1,14 @@
1
1
  {
2
2
  "name": "@agentionai/agents",
3
3
  "author": "Laurent Zuijdwijk",
4
- "version": "0.3.0-beta",
4
+ "version": "0.3.1",
5
5
  "description": "Agent Library",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "files": [
9
9
  "dist/**/*.js",
10
10
  "dist/**/*.d.ts",
11
- "README.md",
12
- "LICENSE"
11
+ "README.md"
13
12
  ],
14
13
  "repository": {
15
14
  "type": "git",
@@ -32,7 +31,7 @@
32
31
  "docs:site": "vitepress build docs",
33
32
  "docs:dev": "vitepress dev docs",
34
33
  "docs:preview": "vitepress preview docs",
35
- "publish:npm": "npm publish --registry=https://registry.npmjs.org",
34
+ "publish:npm": "npm publish --registry=https://registry.npmjs.org --access public",
36
35
  "publish:github": "npm publish --registry=https://npm.pkg.github.com",
37
36
  "publish:all": "npm run publish:npm && npm run publish:github"
38
37
  },
package/readme.md DELETED
@@ -1 +0,0 @@
1
- Readme for atomic agents