Lightweight, modular, graph-based AI.
GraphAI is a lightweight, modular framework for building graph-based AI agents and workflows. Unlike monolithic AI frameworks, it provides a clean foundation without abstractions for LLMs, embeddings, or vector databases — giving you the flexibility to build ultrafast, use-case-specific AI applications.
from graphai import Graph, node @node(start=True) async def start(input: dict): return {} @node async def web_search(input: dict): return {"web": await search(input["q"])} @node async def sql_query(input: dict): return {"sql": await db.fetch(input["q"])} @node(end=True) async def answer(input: dict): return {} g = Graph() g.add_parallel(start, [web_search, sql_query]) g.add_join([web_search, sql_query], answer) result = await g.execute(input={"q": q})
GraphAI provides a clean foundation without abstractions for LLMs, embeddings, or vector databases, giving you complete control over your AI stack.
Unlike monolithic AI frameworks, GraphAI is designed to be minimal and fast, letting you build use-case-specific solutions without unnecessary overhead.
Build complex AI workflows as interconnected graphs, enabling sophisticated agent behaviors and decision-making processes — each node a specific operation or decision point.
from graphai import Graph, node @node(start=True) async def node_start(input: dict): """Entry point for our graph.""" return {"input": input} @node async def summarise(input: dict): text = input["input"]["text"] return {"summary": await llm.asummarise(text)} @node(end=True) async def node_end(input: dict): """Exit point for our graph.""" return {"output": input["summary"]} graph = Graph() graph.add_node(node_start).add_node(summarise).add_node(node_end) graph.add_edge(node_start, summarise) graph.add_edge(summarise, node_end) result = await graph.execute(input={"text": doc})
Orchestrate the whole mesh.
Router decides, chunkers ingest, graphai runs it. Three libraries, one semantic mesh — from empty file to running graph.
Transparency in code, creativity in collaboration. GraphAI uses an MIT license so you can use it however and wherever you want. Interested in contributing? Find us at github.com/aurelio-labs/graphai.