orkajs
v3.6.10
Published
OrkaJS - TypeScript framework for building production-ready LLM systems
Maintainers
Readme
Installation
Full package :
npm install orkajsOr install only what you need (recommended):
npm install @orka-js/core @orka-js/tools @orka-js/memory| Package | Description |
|---------|-------------|
| orkajs | Full package with all features |
| @orka-js/core | Types, errors, utils, Knowledge |
| @orka-js/openai | OpenAI adapter |
| @orka-js/anthropic | Anthropic adapter |
| @orka-js/mistral | Mistral adapter |
| @orka-js/ollama | Ollama adapter |
| @orka-js/memory | In-memory vector store |
| @orka-js/pinecone | Pinecone adapter |
| @orka-js/qdrant | Qdrant adapter |
| @orka-js/chroma | ChromaDB adapter |
| @orka-js/agent | Agents (ReAct, HITL, Toolkits) |
| @orka-js/tools | Loaders, splitters, parsers, chains |
| @orka-js/cache | Memory/Redis cache |
| @orka-js/resilience | Retry, fallback |
| @orka-js/orchestration | Router, Consensus, Race, LoadBalancer |
| @orka-js/workflow | Multi-step workflows |
| @orka-js/graph | Graph workflows |
| @orka-js/evaluation | Metrics, test runner |
| @orka-js/observability | Tracer, hooks |
| @orka-js/prompts | Prompt versioning |
| @orka-js/memory-store | Conversation memory |
| @orka-js/ocr | OCR & document extraction |
Quick Start
import { ReActAgent } from '@orka-js/agent';
import { OpenAIAdapter } from '@orka-js/openai';
const agent = new ReActAgent({
llm: new OpenAIAdapter({ apiKey: process.env.OPENAI_API_KEY }),
goal: 'Manage customer support tickets',
tools: [
{
name: 'search_tickets',
description: 'Search support tickets by status or keyword',
execute: async ({ query }) => searchDatabase(query)
},
{
name: 'send_email',
description: 'Send email to customer',
execute: async ({ to, subject, body }) => sendEmail(to, subject, body)
}
]
});
// Agent plans, executes tools, and responds autonomously
const result = await agent.run(
'Find all urgent tickets from last week and send follow-up emails'
);
console.log(result.output); // "Sent 12 follow-up emails"
console.log(result.steps); // See the agent's reasoningFeatures
| Feature | Description | |---------|-------------| | RAG | Semantic search & retrieval-augmented generation | | Agents | Structured agents with tools, policies, ReAct, Plan&Execute | | Workflows | Multi-step pipelines with plan, retrieve, generate, verify | | Adapters | Pluggable adapters for LLMs and vector databases | | Graph Workflows | Conditional branching with Mermaid export | | Multi-Model | Router, Consensus, Race, LoadBalancer orchestration | | Memory | Conversation memory with sliding window, buffer, summary | | Evaluation | Built-in metrics: relevance, faithfulness, hallucination | | Resilience | Retry, fallback, timeouts, circuit breaker patterns | | Caching | Memory & Redis cache for LLM and embeddings | | OCR | Extract text from images, PDFs, scanned documents (Tesseract, OpenAI Vision) | | PII Guard | Detect and redact sensitive data before LLM calls (RGPD compliant) |
Providers
LLM: OpenAI, Anthropic, Mistral, Ollama
Vector DB: Pinecone, Qdrant, Chroma, In-Memory
Documentation
📚 orkajs.com 💬 Discord
License
MIT © Orka Team
