Python JavaScript
Home
# GraphBit - High Performance Agentic Framework
Installation¶
Quick 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', 'pdf');
const splitter = TextSplitter.recursive(500, 50);
const chunks = await splitter.split(doc.content);
Tool Calling (with Async Support)¶
const { ToolRegistry, registerAsync } = require('@infinitibit_gmbh/graphbit');
const registry = new ToolRegistry();
// Register async tools with proper timing tracking
registerAsync(registry, 'fetchData', 'Fetches external data', {}, async (args) => {
const response = await fetch(args.url);
return await response.json();
});
const result = await registry.execute('fetchData', { url: 'https://api.example.com' });
console.log(result.executionTimeMs); // Includes full async wait time
Documentation¶
Requirements¶
- Node.js ≥ 16.0.0
- Supported platforms: Windows, macOS, Linux (x64, ARM64)
License¶
Apache License, Version 2.0.
Links¶
Quick Navigation¶
🚀 Getting Started¶
- Installation Guide (JS/TS) - Install GraphBit for Node.js
- Dependency Installation - Install dependencies for different scenarios
- Quick Start (JS/TS) - Build your first agent in 5 minutes
- Basic Examples - Simple examples to get you started
📚 User Guide¶
- Core Concepts - Understand workflows, agents, and nodes
- Workflow Builder - Creating and connecting workflow nodes
- Agent Configuration (JS/TS) - Agent configuration for JavaScript/TypeScript
- Document Loader (JS/TS) - Document loading for JavaScript/TypeScript
- Text Splitters (JS/TS) - Text splitting for JavaScript/TypeScript
- LLM Providers (JS/TS) - LLM configuration for JavaScript/TypeScript
- Embeddings (JS/TS) - Embeddings for JavaScript/TypeScript
- Data Validation (JS/TS) - JSON validation for JavaScript/TypeScript
- Dynamic Graph Generation - Auto-generating workflow structures
- Performance Optimization - Tuning for speed and efficiency
- Monitoring & Observability - Metrics collection and debugging
- Reliability & Fault Tolerance - Circuit breakers, retries, and error handling
🔧 API Reference¶
- Configuration Options - All configuration parameters
- Node Types - Agent nodes
🔗 Connectors & Integrations¶
- AWS Boto3 - Amazon Web Services integration
- Azure - Microsoft Azure services integration
- Google Cloud Platform - Google Cloud services integration
- Vector Databases - Pinecone, Qdrant, ChromaDB, and more
🛠️ Development¶
- Architecture Overview - System design and components
- Contributing Guide - How to contribute to GraphBit
- JavaScript Bindings Architecture - Node.js-Rust integration details
- Debugging - Troubleshooting and debugging workflows
📋 Examples & Use Cases¶
- Content Generation Pipeline - Multi-agent content creation
- Data Processing Workflow - ETL pipelines with AI agents
- LLM Integration - Working with different language models
- Semantic Search - Building intelligent search systems
- Comprehensive Pipeline - End-to-end workflow examples
What is GraphBit?¶
GraphBit is a declarative framework for building reliable AI agent workflows with strong type safety, comprehensive error handling, and predictable performance. It features:
- 🔒 Type Safety - Strong typing throughout the execution pipeline
- 🛡️ Reliability - Circuit breakers, retry policies, and error handling
- 🤖 Multi-LLM Support - OpenAI, Anthropic, Ollama
- ⚡ Performance - Rust core with Node.js bindings for optimal speed
- 📊 Observability - Built-in metrics and execution tracing
- 🔧 Resource Management - Concurrency controls and memory optimization
Architecture¶
GraphBit uses a three-tier architecture:
Community & Support¶
- GitHub: github.com/InfinitiBit/graphbit
- Issues: Report bugs and request features
- Discussions: Ask Questions and Share ideas
- Contributing: See Our contributing guide
Ready to build your first AI workflow? Start with GraphBit's Quick Start Tutorial!