@infinitibit_gmbh/graphbit
v0.5.4
Published
JavaScript/Node.js bindings for GraphBit agentic workflow automation framework
Readme
GraphBit
JavaScript/TypeScript bindings for the GraphBit agentic workflow automation framework.
Installation
npm install @infinitibit_gmbh/graphbitQuick Start
import { init, LlmClient, LlmConfig } from '@infinitibit_gmbh/graphbit';
// Initialize GraphBit
init();
// Configure LLM provider
const config = LlmConfig.openai({
apiKey: process.env.OPENAI_API_KEY,
model: 'gpt-4o-mini'
});
// Create client and generate completion
const client = new LlmClient(config);
const response = await client.complete('What is AI?', 100);
console.log(response);Features
- 🤖 Multi-LLM Support - OpenAI, Anthropic, Ollama
- 🔄 Workflow Automation - Build complex agentic workflows
- 🛠️ Tool Integration - Function calling and tool execution
- 📄 Document Processing - PDF, DOCX, text splitting
- 🎯 Type-Safe - Full TypeScript support
- ⚡ High Performance - Native Rust implementation via NAPI
Core APIs
LLM Client
const client = new LlmClient(config);
await client.complete(prompt, maxTokens);
await client.completeBatch(prompts, maxTokens, temperature, concurrency);Workflows
const workflow = new WorkflowBuilder('My Workflow')
.description('Description')
.build();
const executor = new Executor(llmConfig);
const result = await executor.execute(workflow);Embeddings
const embClient = new EmbeddingClient(embConfig);
const response = await embClient.embed(['text 1', 'text 2']);
const similarity = EmbeddingClient.similarity(emb1, emb2);Document Processing
const loader = new DocumentLoader();
const doc = await loader.loadFile('./document.pdf');
const splitter = TextSplitter.recursive(500, 50);
const chunks = await splitter.split(doc.content);Documentation
Requirements
- Node.js ≥ 16.0.0
- Supported platforms: Windows, macOS, Linux (x64, ARM64)
License
See LICENSE.md for details.
