What is GraphAI?
GraphAI is a lightweight library built around the concept of a computational graph. It provides:- A graph-based architecture for connecting various components in a workflow
- An async-first design to handle API calls efficiently
- Minimal abstractions to avoid boxing developers into a specific AI implementation
- Flexible callback mechanisms for streaming and communication between components
Why GraphAI?
Many existing AI frameworks impose their view of what AI applications should look like, creating a “local minimum” that constrains innovation. GraphAI takes a different approach:- Bring your own components: Use any LLM provider, agent methodology, or telemetry system
- Create your perfect workflow: Build exactly the AI application architecture you need
- Escape the box: Don’t be limited by someone else’s conception of AI
- Focus on flow, not frameworks: Think about how data and processing should flow through your application
Key Features
Async-First
AI applications frequently rely on API calls that involve significant waiting time. GraphAI is built from the ground up to be async-first, allowing your Python code to efficiently handle these operations rather than wasting compute cycles while waiting for responses.Graph-Based Architecture
At its core, GraphAI provides a graph of connected nodes where:- Nodes are processing units that perform specific tasks
- Edges connect nodes to define the flow of data
- Routers (special nodes) make decisions about the next execution path
Minimalist Design
GraphAI provides just what you need, nothing more:- A
Graph
class for orchestrating execution Node
andRouter
decorators for defining processing unitsCallback
for streaming and communicationState
management for maintaining context
When to Use GraphAI
Consider GraphAI when:- You need complete control over your AI application architecture
- Existing frameworks feel too restrictive or opinionated
- You want to combine components from different AI ecosystems
- You prefer explicit, understandable code over magic abstractions
- You’re building something truly innovative that doesn’t fit existing patterns