<img src="https://github.com/InfinitiBit/graphbit/raw/Graphbit_Python_v0.6.8/assets/GraphBit_Final_GB_Github_GIF.gif" style="max-width: 600px; height: auto;" alt="Logo" />
<img alt="GraphBit - Developer-first, enterprise-grade LLM framework. | Product Hunt" loading="lazy" width="250" height="54" decoding="async" data-nimg="1" class="w-auto h-[54px] max-w-[250px]" style="color:transparent" src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1004951&theme=light&t=1757340621693"> <img alt="GraphBit - Developer-first, enterprise-grade LLM framework. | Product Hunt" loading="lazy" width="250" height="54" decoding="async" data-nimg="1" class="w-auto h-[54px] max-w-[250px]" style="color:transparent" src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=1004951&theme=light&period=daily&t=1757933101511">
<a href="https://graphbit.ai/">Website</a> |
<a href="https://docs.graphbit.ai/">Docs</a> |
<a href="https://discord.com/invite/FMhgB3paMD">Discord</a>
<a href="https://trendshift.io/repositories/14884" target="_blank"><img src="https://trendshift.io/api/badge/repositories/14884" alt="InfinitiBit%2Fgraphbit | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
<a href="https://pepy.tech/projects/graphbit"><img src="https://static.pepy.tech/personalized-badge/graphbit?period=total&units=INTERNATIONAL_SYSTEM&left_color=GREY&right_color=GREEN&left_text=Downloads" alt="PyPI Downloads"/></a>
<a href="https://pypi.org/project/graphbit/"><img src="https://img.shields.io/pypi/v/graphbit?color=blue&label=PyPI" alt="PyPI"></a>
<a href="https://github.com/InfinitiBit/graphbit/actions/workflows/update-docs.yml"><img src="https://img.shields.io/github/actions/workflow/status/InfinitiBit/graphbit/update-docs.yml?branch=main&label=Build" alt="Build Status"></a>
<a href="https://github.com/InfinitiBit/graphbit/blob/main/CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
<a href="https://www.rust-lang.org"><img src="https://img.shields.io/badge/rust-1.70+-orange.svg?logo=rust" alt="Rust Version"></a>
<a href="https://www.python.org"><img src="https://img.shields.io/badge/python-3.9--3.13-blue.svg?logo=python&logoColor=white" alt="Python Version"></a>
<a href="https://github.com/InfinitiBit/graphbit/blob/main/LICENSE.md"><img src="https://img.shields.io/badge/license-Custom-lightgrey.svg" alt="License"></a>
<a href="https://www.youtube.com/@graphbitAI"><img src="https://img.shields.io/badge/YouTube-FF0000?logo=youtube&logoColor=white" alt="YouTube"></a>
<a href="https://x.com/graphbit_ai"><img src="https://img.shields.io/badge/X-000000?logo=x&logoColor=white" alt="X"></a>
<a href="https://discord.com/invite/FMhgB3paMD"><img src="https://img.shields.io/badge/Discord-7289da?logo=discord&logoColor=white" alt="Discord"></a>
<a href="https://www.linkedin.com/showcase/graphbitai/"><img src="https://img.shields.io/badge/LinkedIn-0077B5?logo=linkedin&logoColor=white" alt="LinkedIn"></a>
Type-Safe AI Agent Workflows with Rust Performance
Read this in other languages: 🇨🇳 简体中文 | 🇨🇳 繁體中文 | 🇪🇸 Español | 🇫🇷 Français | 🇩🇪 Deutsch | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇮🇳 हिन्दी | 🇸🇦 العربية | 🇮🇹 Italiano | 🇧🇷 Português | 🇷🇺 Русский | 🇧🇩 বাংলা
GraphBit is an open-source agentic AI framework for deterministic, concurrent, low-overhead execution.
Efficiency decides who scales. GraphBit is built for developers who need deterministic, concurrent, and ultra-efficient AI execution without the overhead.
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.
Grant Thornton Germany adopted GraphBit to move AI from "permanent pilot" to production without regulatory risk as a core component of their tech stack.
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.
Watch the GraphBit Benchmark Demo
Choose GraphBit if you need:
If you're scaling beyond prototypes or care about runtime determinism, GraphBit is for you.
Recommended to use virtual environment.
pip install graphbit
Watch the Install GraphBit via PyPI | Full Example & Run Guide tutorial
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.
import os
from graphbit import LlmConfig, Executor, Workflow, Node, tool, GuardRailPolicyConfig
# 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)
# Run (optionally with a guardrail policy for PII masking/mapping)
result = executor.execute(workflow)
# Or with policy: result = executor.execute(workflow, policy=GuardRailPolicyConfig.from_json('{"guardrail_policy": {"pii_rules": [...]}}'))
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 the Making Agent Workflow by GraphBit tutorial
GraphBit Tracer captures and monitors LLM calls and AI workflows with minimal configuration. It wraps GraphBit LLM clients and workflow executors to trace prompts, responses, token usage, latency, and errors without changing your code.
Watch the GraphBit Observability & Tracing tutorial
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
GraphBit provides a rich Python API for building and integrating agentic workflows:
For the complete list of classes, methods, and usage examples, see the Python API Reference.
GraphBit's modular architecture supports external integrations:
| Category | Examples |
|---|---|
| LLM Providers | OpenAI, Anthropic, Azure OpenAI, DeepSeek, Together, Ollama, OpenRouter, Fireworks, Mistral AI, Replicate, Perplexity, HuggingFace, AI21, Bytedance, xAI, and more |
| Vector Stores | Pinecone, Qdrant, Chroma, Milvus, Weaviate, FAISS, Elasticsearch, AstraDB, Redis, and more |
| Dat |
$ claude mcp add graphbit \
-- python -m otcore.mcp_server <graph>