Skip to content
Python JavaScript

Home

# GraphBit - High Performance Agentic Framework

GraphBit Logo

Website | Docs | Discord

InfinitiBit%2Fgraphbit | Trendshift
PyPI Total Downloads

PyPI Build Status PRs Welcome
Rust Version Python Version License

YouTube X Discord LinkedIn

**Type-Safe AI Agent Workflows with Rust Performance**

Installation

pip install graphbit

Quick Start

import os
from graphbit import init, LlmClient, LlmConfig

# Initialize GraphBit
init()

# Configure LLM provider
config = LlmConfig.openai(
    os.getenv("OPENAI_API_KEY"),
    "gpt-4o-mini"
)

# Create client and generate completion
client = LlmClient(config)
response = client.complete("What is AI?", 100)
print(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 Type Hints support
  • High Performance - Native Rust implementation via PyO3

Core APIs

LLM Client

client = LlmClient(config)
client.complete(prompt, max_tokens)
client.complete_batch(prompts, max_tokens, temperature, concurrency)

Workflows

workflow = Workflow("My Workflow")
    .description("Description")
    .build()

executor = Executor(llm_config)
result = executor.execute(workflow)

Embeddings

emb_client = EmbeddingClient(emb_config)
# Embedding logic...

Document Processing

loader = DocumentLoader()
doc = loader.load_file("./document.pdf", "pdf")

splitter = TextSplitter.recursive(500, 50)
chunks = splitter.split(doc.content)

Tool Calling (with Async Support)

from graphbit import ToolRegistry

registry = ToolRegistry()
# Sync/Async tool registration...

Documentation

Requirements

  • Python ≥ 3.10
  • Supported platforms: Windows, macOS, Linux (x64, ARM64)

License

Apache License, Version 2.0.

Quick Navigation

🚀 Getting Started

📚 User Guide

🔧 API Reference

🔗 Connectors & Integrations

🛠️ Development

📋 Examples & Use Cases

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 Python 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:

GraphBit Architecture

Community & Support


Ready to build your first AI workflow? Start with GraphBit's Quick Start Tutorial!