orkajs 3.6.4 → 3.6.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.
- package/LICENSE +21 -0
- package/README.md +31 -21
- package/package.json +10 -8
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Orka Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
<a href="https://www.npmjs.com/package/orkajs"><img src="https://img.shields.io/npm/dm/orkajs.svg" alt="npm downloads"></a>
|
|
14
14
|
<a href="https://github.com/orkajs/orkajs/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/orkajs.svg" alt="license"></a>
|
|
15
15
|
<a href="https://orkajs.com"><img src="https://img.shields.io/badge/docs-orkajs.com-blue.svg" alt="documentation"></a>
|
|
16
|
-
<a href="https://discord.
|
|
16
|
+
<a href="https://discord.com/invite/DScfpuPysP"><img src="https://img.shields.io/badge/discord-join%20chat-7289da.svg" alt="discord"></a>
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
21
|
## Installation
|
|
22
22
|
|
|
23
|
-
**Full package
|
|
23
|
+
**Full package :**
|
|
24
24
|
```bash
|
|
25
25
|
npm install orkajs
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
**Or install only what you need:**
|
|
28
|
+
**Or install only what you need (recommended):**
|
|
29
29
|
```bash
|
|
30
30
|
npm install @orka-js/core @orka-js/tools @orka-js/memory
|
|
31
31
|
```
|
|
@@ -56,32 +56,40 @@ npm install @orka-js/core @orka-js/tools @orka-js/memory
|
|
|
56
56
|
| `@orka-js/observability` | Tracer, hooks |
|
|
57
57
|
| `@orka-js/prompts` | Prompt versioning |
|
|
58
58
|
| `@orka-js/memory-store` | Conversation memory |
|
|
59
|
+
| `@orka-js/ocr` | OCR & document extraction |
|
|
59
60
|
|
|
60
61
|
</details>
|
|
61
62
|
|
|
62
63
|
## Quick Start
|
|
63
64
|
|
|
64
65
|
```typescript
|
|
65
|
-
import {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
import { ReActAgent } from '@orka-js/agent';
|
|
67
|
+
import { OpenAIAdapter } from '@orka-js/openai';
|
|
68
|
+
|
|
69
|
+
const agent = new ReActAgent({
|
|
70
|
+
llm: new OpenAIAdapter({ apiKey: process.env.OPENAI_API_KEY }),
|
|
71
|
+
goal: 'Manage customer support tickets',
|
|
72
|
+
tools: [
|
|
73
|
+
{
|
|
74
|
+
name: 'search_tickets',
|
|
75
|
+
description: 'Search support tickets by status or keyword',
|
|
76
|
+
execute: async ({ query }) => searchDatabase(query)
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'send_email',
|
|
80
|
+
description: 'Send email to customer',
|
|
81
|
+
execute: async ({ to, subject, body }) => sendEmail(to, subject, body)
|
|
82
|
+
}
|
|
83
|
+
]
|
|
76
84
|
});
|
|
77
85
|
|
|
78
|
-
//
|
|
79
|
-
const result = await
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
});
|
|
86
|
+
// Agent plans, executes tools, and responds autonomously
|
|
87
|
+
const result = await agent.run(
|
|
88
|
+
'Find all urgent tickets from last week and send follow-up emails'
|
|
89
|
+
);
|
|
83
90
|
|
|
84
|
-
console.log(result.
|
|
91
|
+
console.log(result.output); // "Sent 12 follow-up emails"
|
|
92
|
+
console.log(result.steps); // See the agent's reasoning
|
|
85
93
|
```
|
|
86
94
|
|
|
87
95
|
## Features
|
|
@@ -98,6 +106,8 @@ console.log(result.answer);
|
|
|
98
106
|
| **Evaluation** | Built-in metrics: relevance, faithfulness, hallucination |
|
|
99
107
|
| **Resilience** | Retry, fallback, timeouts, circuit breaker patterns |
|
|
100
108
|
| **Caching** | Memory & Redis cache for LLM and embeddings |
|
|
109
|
+
| **OCR** | Extract text from images, PDFs, scanned documents (Tesseract, OpenAI Vision) |
|
|
110
|
+
| **PII Guard** | Detect and redact sensitive data before LLM calls (RGPD compliant) |
|
|
101
111
|
|
|
102
112
|
## Providers
|
|
103
113
|
|
|
@@ -107,7 +117,7 @@ console.log(result.answer);
|
|
|
107
117
|
## Documentation
|
|
108
118
|
|
|
109
119
|
**📚 [orkajs.com](https://orkajs.com)**
|
|
110
|
-
**💬 [Discord](https://discord.
|
|
120
|
+
**💬 [Discord](https://discord.com/invite/DScfpuPysP)**
|
|
111
121
|
|
|
112
122
|
- [Getting Started](https://orkajs.com/en/getting-started/introduction)
|
|
113
123
|
- [RAG & Knowledge](https://orkajs.com/en/core/knowledge)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orkajs",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.6",
|
|
4
4
|
"description": "OrkaJS - TypeScript framework for building production-ready LLM systems",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -14,14 +14,11 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
|
-
"dist"
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
18
20
|
],
|
|
19
21
|
"sideEffects": false,
|
|
20
|
-
"scripts": {
|
|
21
|
-
"build": "tsup",
|
|
22
|
-
"dev": "tsup --watch",
|
|
23
|
-
"typecheck": "tsc --noEmit"
|
|
24
|
-
},
|
|
25
22
|
"keywords": [
|
|
26
23
|
"orkajs",
|
|
27
24
|
"llm",
|
|
@@ -85,5 +82,10 @@
|
|
|
85
82
|
"devDependencies": {
|
|
86
83
|
"tsup": "^8.0.1",
|
|
87
84
|
"typescript": "^5.3.3"
|
|
85
|
+
},
|
|
86
|
+
"scripts": {
|
|
87
|
+
"build": "tsup",
|
|
88
|
+
"dev": "tsup --watch",
|
|
89
|
+
"typecheck": "tsc --noEmit"
|
|
88
90
|
}
|
|
89
|
-
}
|
|
91
|
+
}
|