Skip to main content

GraphBit - Advanced workflow automation and AI agent orchestration library

Project description

GraphBit - High Performance Agentic Framework

GraphBit Logo

Website | Docs | Discord

InfinitiBit%2Fgraphbit | Trendshift
PyPI Downloads

PyPI Build Status PRs Welcome
Rust Version Python Version License

YouTube X Discord LinkedIn

Type-Safe AI Agent Workflows with Rust Performance


Read this in other languages: 🇨🇳 简体中文 | 🇨🇳 繁體中文 | 🇪🇸 Español | 🇫🇷 Français | 🇩🇪 Deutsch | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇮🇳 हिन्दी | 🇸🇦 العربية | 🇮🇹 Italiano | 🇧🇷 Português | 🇷🇺 Русский | 🇧🇩 বাংলা


What is GraphBit?

GraphBit is a source-available agentic AI framework for developers who need deterministic, concurrent, and low-overhead execution.

Built with a Rust core and a minimal Python layer, GraphBit delivers up to 68× lower CPU usage and 140× lower memory footprint than other frameworks, while maintaining equal or greater throughput.

It powers multi-agent workflows that run in parallel, persist memory across steps, self-recover from failures, and ensure 100% task reliability. GraphBit is built for production workloads, from enterprise AI systems to low-resource edge deployments.


Why GraphBit?

Efficiency decides who scales. GraphBit is built for developers who need deterministic, concurrent, and ultra-efficient AI execution without the overhead.

  • Rust-Powered Performance - Maximum speed and memory safety at the core
  • Production-Ready - Circuit breakers, retry policies, and fault recovery built-in
  • Resource Efficient - Run on enterprise servers or low-resource edge devices
  • Multi-Agent Ready - Parallel execution with shared memory across workflow steps
  • Observable - Built-in tracing, structured logs, and performance metrics

Benchmark

GraphBit was built for efficiency at scale—not theoretical claims, but measured results.

Our internal benchmark suite compared GraphBit to leading Python-based agent frameworks across identical workloads.

Metric GraphBit Other Frameworks Gain
CPU Usage 1.0× baseline 68.3× higher ~68× CPU
Memory Footprint 1.0× baseline 140× higher ~140× Memory
Execution Speed ≈ equal / faster Consistent throughput
Determinism 100% success Variable Guaranteed reliability

GraphBit consistently delivers production-grade efficiency across LLM calls, tool invocations, and multi-agent chains.

View Full Benchmark Report for detailed methodology, test scenarios, and complete results.

Watch Benchmark Demo Video to see GraphBit's performance in action.


When to Use GraphBit

Choose GraphBit if you need:

  • Production-grade multi-agent systems that won't collapse under load
  • Type-safe execution and reproducible outputs
  • Real-time orchestration for hybrid or streaming AI applications
  • Rust-level efficiency with Python-level ergonomics

If you're scaling beyond prototypes or care about runtime determinism, GraphBit is for you.


Key Features

  • Tool Selection - LLMs intelligently choose tools based on descriptions
  • Type Safety - Strong typing through every execution layer
  • Reliability - Circuit breakers, retry policies, error handling and fault recovery
  • Multi-LLM Support - OpenAI, Azure OpenAI, Anthropic, OpenRouter, DeepSeek, Replicate, Ollama, TogetherAI and more
  • Resource Management - Concurrency controls and memory optimization
  • Observability - Built-in tracing, structured logs, and performance metrics

Quick Start

Installation

Recommended to use virtual environment.

pip install graphbit

Environment Setup

Set up API keys you want to use in your project:

# OpenAI (optional – required if using OpenAI models)
export OPENAI_API_KEY=your_openai_api_key_here

# Anthropic (optional – required if using Anthropic models)
export ANTHROPIC_API_KEY=your_anthropic_api_key_here

Security Note: Never commit API keys to version control. Always use environment variables or secure secret management.

Basic Usage

import os

from graphbit import LlmConfig, Executor, Workflow, Node, tool

# Initialize and configure
config = LlmConfig.openai(os.getenv("OPENAI_API_KEY"), "gpt-4o-mini")

# Create executor
executor = Executor(config)

# Create tools with clear descriptions for LLM selection
@tool(_description="Get current weather information for any city")
def get_weather(location: str) -> dict:
    return {"location": location, "temperature": 22, "condition": "sunny"}

@tool(_description="Perform mathematical calculations and return results")
def calculate(expression: str) -> str:
    return f"Result: {eval(expression)}"

# Build workflow
workflow = Workflow("Analysis Pipeline")

# Create agent nodes
smart_agent = Node.agent(
    name="Smart Agent",
    prompt="What's the weather in Paris and calculate 15 + 27?",
    system_prompt="You are an assistant skilled in weather lookup and math calculations. Use tools to answer queries accurately.",
    tools=[get_weather, calculate]
)

processor = Node.agent(
    name="Data Processor",
    prompt="Process the results obtained from Smart Agent.",
    system_prompt="""You process and organize results from other agents.

    - Summarize and clarify key points
    - Structure your output for easy reading
    - Focus on actionable insights
    """
)

# Connect and execute
id1 = workflow.add_node(smart_agent)
id2 = workflow.add_node(processor)
workflow.connect(id1, id2)

result = executor.execute(workflow)
print(f"Workflow completed: {result.is_success()}")
print("\nSmart Agent Output: \n", result.get_node_output("Smart Agent"))
print("\nData Processor Output: \n", result.get_node_output("Data Processor"))

Watch Quick Start Video Tutorial - Complete walkthrough: Install GraphBit via PyPI, setup, and run your first workflow

Watch: Building Your First Agent Workflow - Advanced tutorial on creating multi-agent workflows with GraphBit


High-Level Architecture

GraphBit Architecture

Three-tier design for reliability and performance:

  • Rust Core - Workflow engine, agents, and LLM providers
  • Orchestration Layer - Project management and execution
  • Python API - PyO3 bindings with async support

Python API Integrations

GraphBit provides a rich Python API for building and integrating agentic workflows:

  • LLM Clients - Multi-provider integrations (OpenAI, Anthropic, Azure, and more)
  • Workflows - Define and manage multi-agent workflow graphs with state management
  • Nodes - Agent nodes, tool nodes, and custom workflow components
  • Executors - Workflow execution engine with configuration management
  • Tool System - Function decorators, registry, and execution framework
  • Embeddings - Vector embeddings for semantic search and retrieval
  • Document Loaders - Load and parse documents (PDF, DOCX, TXT, JSON, CSV, XML, HTML)
  • Text Splitters - Split documents into chunks (character, token, sentence, recursive)

For the complete list of classes, methods, and usage examples, see the Python API Reference.

Watch: GraphBit Observability & Tracing - Learn how to monitor and trace your AI workflows


Contributing to GraphBit

We welcome contributions. To get started, please see the Contributing file for development setup and guidelines.

GraphBit is built by a wonderful community of researchers and engineers.


Security

GraphBit is committed to maintaining security standards for our agentic framework. We recommend:

  • Using environment variables for API keys
  • Keeping GraphBit updated to the latest version
  • Using proper secret management for production environments

If you discover a security vulnerability, please report it responsibly through GitHub Security or via email rather than creating a public issue.

For detailed reporting procedures and response timelines, see our Security Policy.


License

GraphBit is licensed under the Apache License, Version 2.0.

For complete terms and conditions, see the Full License.


Copyright © 2023–2026 InfinitiBit GmbH. All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphbit-0.6.7.tar.gz (328.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

graphbit-0.6.7-cp39-abi3-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.9+Windows x86-64

graphbit-0.6.7-cp39-abi3-musllinux_1_2_x86_64.whl (7.6 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ x86-64

graphbit-0.6.7-cp39-abi3-musllinux_1_2_aarch64.whl (7.1 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

graphbit-0.6.7-cp39-abi3-manylinux_2_34_x86_64.whl (7.6 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.34+ x86-64

graphbit-0.6.7-cp39-abi3-manylinux_2_34_aarch64.whl (7.1 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.34+ ARM64

graphbit-0.6.7-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (13.0 MB view details)

Uploaded CPython 3.9+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file graphbit-0.6.7.tar.gz.

File metadata

  • Download URL: graphbit-0.6.7.tar.gz
  • Upload date:
  • Size: 328.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for graphbit-0.6.7.tar.gz
Algorithm Hash digest
SHA256 b2573b1583a25b7ad994bec29cab9455a2ecbacdb8934fd53541e905ee38507c
MD5 4d9c032609a3a4cd972c7977c5556a65
BLAKE2b-256 f96d95fb29cb63e724290171f561129f704151112854e419c6ba40e3fb39ccb9

See more details on using hashes here.

File details

Details for the file graphbit-0.6.7-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: graphbit-0.6.7-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 6.0 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for graphbit-0.6.7-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c0acdb92f5e1c40b9976f43aadc3cc238b855b552d8fa4d285ed1bf562b0bddb
MD5 183ebe564e51286c5941f627e23c29fd
BLAKE2b-256 ca6f5fb8617dfa36ed9cf15c214fe575fe387fdb8bec54c451b29a725a4e70a2

See more details on using hashes here.

File details

Details for the file graphbit-0.6.7-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for graphbit-0.6.7-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8df427b3218f2239f82a7f2a07c6265d1d6f3de4706cb5194f318eb2e0c980ec
MD5 41ba57c9c394eea057d307ecda0feae6
BLAKE2b-256 9601915e23a47ff2c4673257260f0a54b1e9ee60055353d795a843b5986beefe

See more details on using hashes here.

File details

Details for the file graphbit-0.6.7-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for graphbit-0.6.7-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 6bd931406416fc58d5961f3be8c9cf7a4287a5bb8351f289dcde30bbc8c89029
MD5 0da494d19d062a4f01a5dd360dd22d83
BLAKE2b-256 ec28fceb8683932439e5a730b7401f6dd069d66b1c2cff1fa755ff249ba03237

See more details on using hashes here.

File details

Details for the file graphbit-0.6.7-cp39-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for graphbit-0.6.7-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 86d48c2b9bb370bd7b1bca297b1201220290e9a173e92fe7eca20179bac74057
MD5 876243501074588ade617df328db011d
BLAKE2b-256 7201019f0af3fffa2fe24740cf1e05f208f0d4c16cbba6b9c930e83d194c6678

See more details on using hashes here.

File details

Details for the file graphbit-0.6.7-cp39-abi3-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for graphbit-0.6.7-cp39-abi3-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 7294c545e4e679a469830344be46841bbe0b08e81371d1e773c4c6ab37c47bfe
MD5 d61e3fd33ff1f3b2d9c1ae26b26f98f1
BLAKE2b-256 e3cf2f8ae2b48c5a8846532b4678eabfcba3b348f8c57fbf393118b8dd7f0da0

See more details on using hashes here.

File details

Details for the file graphbit-0.6.7-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for graphbit-0.6.7-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 dc54d9c364afbd44211d6ebaa4aba87a63fd1086fc26229d228f1bc592e6140a
MD5 84261963d8bd2cfe1ef5309ed232ac2b
BLAKE2b-256 b01ee4e26fb3670b79b82425000194a2a445f748ac364fe41e80e5bcd9a3112f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page