Graph execution engine for agentic AI workflows.
Project description
Graphon
Graphon is a Python graph execution engine for agentic AI workflows.
The repository is still evolving, but it already contains a working execution engine, built-in workflow nodes, model runtime abstractions, integration protocols, and a runnable end-to-end example.
Highlights
- Queue-based
GraphEngineorchestration with event-driven execution - Graph parsing, validation, and fluent graph building
- Shared runtime state, variable pool, and workflow execution domain models
- Built-in node implementations for common workflow patterns
- DSL import support with Slim-backed LLM nodes
- HTTP, file, tool, and human-input integration protocols
- Extensible engine layers and external command channels
Repository modules currently cover node types such as start, end, answer,
llm, if-else, code, template-transform, question-classifier,
http-request, tool, variable-aggregator, variable-assigner, loop,
iteration, parameter-extractor, document-extractor, list-operator, and
human-input.
Quick Start
Graphon is currently easiest to evaluate from a source checkout.
Requirements
- Python 3.12 or 3.13
uvmake
Python 3.14 is currently unsupported because unstructured, which backs part
of the document extraction stack, currently declares Requires-Python: <3.14.
Set up the repository
make dev
source .venv/bin/activate
make test
make dev installs the project, syncs development dependencies, and sets up
prek Git hooks. make test is the progressive
local validation entrypoint: it formats, applies lint fixes, runs ty check,
and then runs pytest.
Run the Example Workflows
The repository includes minimal runnable Slim LLM examples at
examples/slim_llm.
Both versions execute this workflow:
start -> llm -> answer
To run it:
make dev
source .venv/bin/activate
cd examples/slim_llm
cp credentials.example.json credentials.json
python3 dsl.py "Reply with only the word Graphon."
python3 code.py "Reply with only the word Graphon."
Before running the example, fill in the required values in credentials.json.
The example currently expects:
- OpenAI-compatible model credentials in
model_credentials slim.modeset to eitherlocalorremotedify-plugin-daemon-sliminPATH,SLIM_BINARY_PATH, or a localslimbinary in the example directory- for remote mode,
daemon_addranddaemon_key
For the exact credential shape and runtime notes, see examples/slim_llm/README.md.
How Graphon Fits Together
At a high level, direct Graphon usage looks like this:
- Build or load a graph and instantiate nodes into a
Graph. - Prepare
GraphRuntimeStateand seed theVariablePool. - Configure model, file, HTTP, tool, or human-input adapters as needed.
- Run
GraphEngineand consume emitted graph events. - Read final outputs from runtime state.
For Dify DSL documents, use graphon.dsl.loads() to build the engine from the
workflow YAML and credentials. The resulting engine uses the DSL Slim adapter
for LLM nodes:
engine = loads(
dsl,
credentials=credentials,
workflow_id="example-dsl-openai-slim",
start_inputs={"query": query},
)
events = list(engine.run())
See examples/slim_llm/dsl.py for the DSL import version and examples/slim_llm/code.py for the Python graph construction version.
For direct Python graph construction, use graphon.dsl.slim.SlimLLM as the
standard Slim-backed LLM runtime. Integrations that need to replace model
execution, routing, credential injection, or token counting can implement
graphon.protocols.LLMProtocol. A higher-level model factory/resolver layer is
planned as a separate follow-up.
Project Layout
src/graphon/graph: graph structures, parsing, validation, and builderssrc/graphon/graph_engine: orchestration, workers, command channels, and layerssrc/graphon/runtime: runtime state, read-only wrappers, and variable poolsrc/graphon/nodes: built-in workflow node implementationssrc/graphon/model_runtime: provider/model abstractions and shared model entitiessrc/graphon/dsl: DSL import support, including Slim-backed runtime adapterssrc/graphon/graph_events: event models emitted during executionsrc/graphon/http: HTTP client abstractions and default implementationsrc/graphon/file: workflow file models and file runtime helperssrc/graphon/protocols: public protocol re-exports for integrationsexamples/: runnable examplestests/: unit and integration-style coverage
Internal Docs
- CONTRIBUTING.md: contributor workflow, CI, commit/PR rules
- examples/slim_llm/README.md: runnable Slim LLM example setup
- src/graphon/model_runtime/README.md: model runtime overview
- src/graphon/graph_engine/layers/README.md: engine layer extension points
- src/graphon/graph_engine/command_channels/README.md: local and distributed command channels
Development
Contributor setup, tooling details, CLA notes, and commit/PR conventions live in CONTRIBUTING.md.
CI currently validates pull request titles, runs make check including
uv.lock freshness validation, and runs uv run pytest on Python 3.12 and
3.13. Python 3.14 is currently excluded because unstructured does not yet
support it.
License
Apache-2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphon-0.4.0.tar.gz.
File metadata
- Download URL: graphon-0.4.0.tar.gz
- Upload date:
- Size: 261.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afb0c7a58f89e09cfa585296429b4d08cd0df80b9ac54d550f88e7d76ec48ee0
|
|
| MD5 |
9bfdb165528fcfa479f1a9e7ed8a7d93
|
|
| BLAKE2b-256 |
7624eb1e7983404dcac84816b76ea450e1bb97023e55e00c699d609340bc361e
|
Provenance
The following attestation bundles were made for graphon-0.4.0.tar.gz:
Publisher:
release.yml on langgenius/graphon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
graphon-0.4.0.tar.gz -
Subject digest:
afb0c7a58f89e09cfa585296429b4d08cd0df80b9ac54d550f88e7d76ec48ee0 - Sigstore transparency entry: 1523964561
- Sigstore integration time:
-
Permalink:
langgenius/graphon@a1c8f4b1c8d71787c35c4f1d3f02425881f2320d -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/langgenius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
release.yml@a1c8f4b1c8d71787c35c4f1d3f02425881f2320d -
Trigger Event:
push
-
Statement type:
File details
Details for the file graphon-0.4.0-py3-none-any.whl.
File metadata
- Download URL: graphon-0.4.0-py3-none-any.whl
- Upload date:
- Size: 372.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b33f95886da823d5b1b53d663a4f5f8fa383c37740f3bd19297b8d140fcb804c
|
|
| MD5 |
c34f9d067861d612c042620e624794c7
|
|
| BLAKE2b-256 |
b7debad6b3fd1e4b4defc16e6ea106e55c44725a159f1d191a99877bce1c9931
|
Provenance
The following attestation bundles were made for graphon-0.4.0-py3-none-any.whl:
Publisher:
release.yml on langgenius/graphon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
graphon-0.4.0-py3-none-any.whl -
Subject digest:
b33f95886da823d5b1b53d663a4f5f8fa383c37740f3bd19297b8d140fcb804c - Sigstore transparency entry: 1523964581
- Sigstore integration time:
-
Permalink:
langgenius/graphon@a1c8f4b1c8d71787c35c4f1d3f02425881f2320d -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/langgenius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
release.yml@a1c8f4b1c8d71787c35c4f1d3f02425881f2320d -
Trigger Event:
push
-
Statement type: