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.6.tar.gz (295.6 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.6-cp39-abi3-win_amd64.whl (5.8 MB view details)

Uploaded CPython 3.9+Windows x86-64

graphbit-0.6.6-cp39-abi3-musllinux_1_2_x86_64.whl (7.4 MB view details)

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

graphbit-0.6.6-cp39-abi3-musllinux_1_2_aarch64.whl (7.0 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

graphbit-0.6.6-cp39-abi3-manylinux_2_34_x86_64.whl (7.4 MB view details)

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

graphbit-0.6.6-cp39-abi3-manylinux_2_34_aarch64.whl (7.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.34+ ARM64

graphbit-0.6.6-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (12.8 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.6.tar.gz.

File metadata

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

File hashes

Hashes for graphbit-0.6.6.tar.gz
Algorithm Hash digest
SHA256 1dd39fecffe4ba28c38a4ce10f4f197394057369fcab8ad91796f8c8a1d28ff8
MD5 9db6da303e69438a39d8f7a85b3a90e5
BLAKE2b-256 a73124903a4a8a848d0a4350d7515f7dcce2de4f8181d3d7b8b5bc4d6d39cafc

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for graphbit-0.6.6-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 67e880f21b85f2ef0a42aac19dd0eaa69a3a8bb0ac109628827dc03a07351b52
MD5 70c95d684c2d2e20a873669d79a56dc4
BLAKE2b-256 6a362234499e3c91759e8c146e03d53ee76c868942888c55cb2be177b8febb6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graphbit-0.6.6-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d1a47e4456047fb451bc074666c913cbccdf59df95326b6056b9c242807a46f4
MD5 27321a0dd7c60a54cd5081a52ebcc674
BLAKE2b-256 d43747a4da7e1e297ecda11ea3df5274ed9420ed2021bb5aef0508d7c31dc116

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graphbit-0.6.6-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 617c123bd7ecf2781e8dd82c08fa59f74f35c21d4ed3d945ba33d4c02d6a9610
MD5 44c825043c8e50cfe77e0ef852a5bbba
BLAKE2b-256 ccbf07c547145b98cb4d96495c2a5ef2cc56e017c7e48484c24dbf29b324793e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graphbit-0.6.6-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6d77ea3b01b919e5eed2300fdbd60590270116eeec6acbe4d5c85a17ac02c504
MD5 b5fcc4ef7d9ee38a525e0dc3e0273bd2
BLAKE2b-256 42858ee7eba378586c9267056da8e9250d839e30b58229ebf3905c0c990731a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graphbit-0.6.6-cp39-abi3-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 27ce22f3eda6fe6ff7d9bb87f00a5eefacbeed2000cbe5fa697392e2a5c0a7d9
MD5 97e0dbd977984e489e3943f7eb3e1e50
BLAKE2b-256 a7c3cd0d9dc6bd5dc19ad948e8179ab64ed87f0421068892678b9da6b38ed36d

See more details on using hashes here.

File details

Details for the file graphbit-0.6.6-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.6-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 128380a9b568f2a780d17d06e1867a819256d7485a3625c00626bc2db5f1b41e
MD5 21b48c73d9e6722924b008a816f90887
BLAKE2b-256 7207f85ced773aa5c3ca32d9050c6494d38dab4504a19c08de97d523a0e58943

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