orkajs 3.6.5 → 3.6.7

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 +31 -21
  2. package/package.json +4 -2
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.gg/zUbDmJVr"><img src="https://img.shields.io/badge/discord-join%20chat-7289da.svg" alt="discord"></a>
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 (recommended):**
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 { createOrka, AnthropicAdapter, MemoryVectorAdapter } from 'orkajs';
66
-
67
- const orka = createOrka({
68
- llm: new AnthropicAdapter({ apiKey: process.env.ANTHROPIC_API_KEY! }),
69
- vectorDB: new MemoryVectorAdapter(),
70
- });
71
-
72
- // Create knowledge base
73
- await orka.knowledge.create({
74
- name: 'docs',
75
- source: ['OrkaJS is a TypeScript framework for LLM systems.'],
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
- // Ask with RAG
79
- const result = await orka.ask({
80
- knowledge: 'docs',
81
- question: 'What is OrkaJS?',
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.answer);
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.gg/KAZCesekvg)**
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.5",
3
+ "version": "3.6.7",
4
4
  "description": "OrkaJS - TypeScript framework for building production-ready LLM systems",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -14,7 +14,9 @@
14
14
  }
15
15
  },
16
16
  "files": [
17
- "dist"
17
+ "dist",
18
+ "README.md",
19
+ "LICENSE"
18
20
  ],
19
21
  "sideEffects": false,
20
22
  "keywords": [