Skip to main content

Pure Graph of Thoughts

This is the official implementation of Pure Graph of Thoughts, a new implementation of the Graph of Thoughts concepts.

Graph of Thoughts was originally introduced in the paper Graph of Thoughts: Solving Elaborate Problems with Large Language Models. The official implementation of the paper's proposed API can be found here: https://github.com/spcl/graph-of-thoughts.

The pure_graph_of_thoughts package does not conform the API proposed by the original paper nor is it a fork of it. It aims for a more automation-friendly implementation of the general concept of Graph of Thoughts, where both construction and traversal of a graph can be handled iteratively.

Some key differences and restrictions:

  • Operations and thoughts are represented independently of their graph structure.
  • As a user-facing API, operations can be defined in a declarative way over a typed and validated data structure (DSL).
  • There is a strict distinction between a prompt operation executed by a language model and a code execution operation.
  • To simplify parsing logic and to ensure consistent results, the JSON format is used for communication with the language model.
  • The scoring is now part of an operation involving a prompt, rather than being a standalone operation that can be added arbitrarily. While this simplifies the automation process, it restricts the user's possibility of adding a validation operation.

Setup Guide

To run this code, Python 3.11 or newer is required. The latest version of the package can be installed from PyPI:

pip install pure-graph-of-thoughts

Alternatively, the package can be installed from source.

Optional Dependencies

The project comes with optional dependencies which are required for some features.

Language Models

The package language_models contains implementation of the language model API. the optional languagemodel dependencies are required.

pip install pure-graph-of-thoughts[languagemodel]

Graph Visualization

To visualize the graphs by using pure_graph_of_thoughts.visualization, the optional visualization dependencies are required.

pip install pure-graph-of-thoughts[visualization]

For a cleaner, hierarchical visualization, add dot-visualization.

pip install pure-graph-of-thoughts[visualization,dot-visualization]

Be aware that dot-visualization requires the GraphViz library to be installed.

pygraphviz on Windows

The Python package pygraphviz (included in dot-visualization) may cause installation problems on Windows. Installing it separately with the following options (including the GraphViz headers) resolves the problem:

pip install --config-settings="--global-option=build_ext" --config-settings="--global-option=-IC:\Program Files\Graphviz\include" --config-settings="--global-option=-LC:\Program Files\Graphviz\lib" pygraphviz

Examples

An example task definition is provided together with a notebook that shows the graph construction and execution. To run the notebook, the optional notebooks dependencies are required.

pip install pure-graph-of-thoughts[notebooks]

Be aware that the examples are not part of the distributed package on PyPI.

Metadata

Release files for pure-graph-of-thoughts 1.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pure-graph-of-thoughts 1.6.0
File Size Uploaded Provenance
pure_graph_of_thoughts-1.6.0.tar.gz 3.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pure-graph-of-thoughts 1.6.0
File Interpreter ABI Platform
pure_graph_of_thoughts-1.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.7 kB

Release files / pure_graph_of_thoughts-1.6.0.tar.gz

Download URL pure_graph_of_thoughts-1.6.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
05260b873100d1a4b02a97820ad1d3218a7b2d201dc21a9b1c71dd582c56ed07
BLAKE2b-256 checksum
How to use checksums
7d7327ea279e8c39c9f12f5791291de12e246687ad576ea942363e6509d4b69c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 11, 2026.

Transparency log

Release files / pure_graph_of_thoughts-1.6.0-py3-none-any.whl

Download URL pure_graph_of_thoughts-1.6.0-py3-none-any.whl
Size 45.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8253351b2222767673d28c33e37ede4ecba0f46d845c0d1f72ebde3182b37a5
BLAKE2b-256 checksum
How to use checksums
ac568bda755610341e4aba023ffbf7ab79e00656516a2553f82f7c6f980795fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 11, 2026.

Transparency log

Security for pure-graph-of-thoughts 1.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pure_graph_of_thoughts-1.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page