Metadata-Version: 2.5
Name: openstategraph
Version: 0.4.0
Summary: A compiler from a vendor-neutral workflow.json to a LangGraph StateGraph.
Project-URL: Homepage, https://github.com/zulfeekar/openstategraph
Project-URL: Repository, https://github.com/zulfeekar/openstategraph
Project-URL: Source, https://github.com/zulfeekar/openstategraph
Project-URL: Changelog, https://github.com/zulfeekar/openstategraph/blob/main/CHANGELOG.md
Project-URL: Documentation, https://github.com/zulfeekar/openstategraph/blob/main/docs/adoption.md
Author: Zulfeekar Cheriyam Purath
License-Expression: MIT
License-File: LICENSE
Keywords: agents,compiler,langchain,langgraph,state-machine,workflow
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Compilers
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: langchain-core<2,>=1.0
Requires-Dist: langchain<2,>=1.0
Requires-Dist: langgraph<2,>=1.2
Requires-Dist: pydantic<3,>=2.9
Provides-Extra: all
Requires-Dist: databricks-sql-connector<5,>=3.4; extra == 'all'
Requires-Dist: deepagents<1,>=0.7; extra == 'all'
Requires-Dist: fastapi<0.142,>=0.115; extra == 'all'
Requires-Dist: langchain-anthropic<2,>=1.0; extra == 'all'
Requires-Dist: langchain-mcp-adapters<0.4,>=0.3.0; extra == 'all'
Requires-Dist: langchain-ollama<2,>=1.0; extra == 'all'
Requires-Dist: langchain-openai<2,>=1.0; extra == 'all'
Requires-Dist: langgraph-checkpoint-postgres<4,>=3.1; extra == 'all'
Requires-Dist: langgraph-checkpoint-sqlite>=3.1; extra == 'all'
Requires-Dist: mcp<2,>=1.25; extra == 'all'
Requires-Dist: msal<2,>=1.28; extra == 'all'
Requires-Dist: psycopg-pool>=3.2; extra == 'all'
Requires-Dist: psycopg[binary]>=3.2; extra == 'all'
Requires-Dist: pyodbc<6,>=5.0; extra == 'all'
Requires-Dist: python-multipart>=0.0.9; extra == 'all'
Requires-Dist: uvicorn>=0.30; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: langchain-anthropic<2,>=1.0; extra == 'anthropic'
Provides-Extra: bastion
Requires-Dist: bastion-prompt-protection<2,>=1.3; extra == 'bastion'
Provides-Extra: databricks
Requires-Dist: databricks-sql-connector<5,>=3.4; extra == 'databricks'
Provides-Extra: deep
Requires-Dist: deepagents<1,>=0.7; extra == 'deep'
Provides-Extra: dev
Requires-Dist: fastapi==0.141.1; extra == 'dev'
Requires-Dist: mypy==1.19.1; extra == 'dev'
Requires-Dist: pytest-asyncio<2,>=1.4; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff==0.14.10; extra == 'dev'
Requires-Dist: types-pyyaml; extra == 'dev'
Provides-Extra: mcp
Requires-Dist: langchain-mcp-adapters<0.4,>=0.3.0; extra == 'mcp'
Requires-Dist: mcp<2,>=1.25; extra == 'mcp'
Provides-Extra: mssql
Requires-Dist: msal<2,>=1.28; extra == 'mssql'
Requires-Dist: pyodbc<6,>=5.0; extra == 'mssql'
Provides-Extra: ollama
Requires-Dist: langchain-ollama<2,>=1.0; extra == 'ollama'
Provides-Extra: openai
Requires-Dist: langchain-openai<2,>=1.0; extra == 'openai'
Provides-Extra: postgres
Requires-Dist: langgraph-checkpoint-postgres<4,>=3.1; extra == 'postgres'
Requires-Dist: psycopg-pool>=3.2; extra == 'postgres'
Requires-Dist: psycopg[binary]>=3.2; extra == 'postgres'
Provides-Extra: server
Requires-Dist: fastapi<0.142,>=0.115; extra == 'server'
Requires-Dist: langchain-mcp-adapters<0.4,>=0.3.0; extra == 'server'
Requires-Dist: langgraph-checkpoint-sqlite>=3.1; extra == 'server'
Requires-Dist: mcp<2,>=1.25; extra == 'server'
Requires-Dist: python-multipart>=0.0.9; extra == 'server'
Requires-Dist: uvicorn>=0.30; extra == 'server'
Provides-Extra: sqlite
Requires-Dist: langgraph-checkpoint-sqlite>=3.1; extra == 'sqlite'
Description-Content-Type: text/markdown

# OpenStateGraph

> **Who this page is for:** you are adding OpenStateGraph to a project you already have,
> from a package index. This is the distribution's own page; there is no
> checkout in it.

**A compiler from a vendor-neutral `workflow.json` to a LangGraph
`StateGraph`.** Not an execution engine — the thing it produces is a plain
compiled LangGraph object that runs, streams, checkpoints and deploys
anywhere Python runs, with or without this package's editor.

```bash
pip install "openstategraph[ollama]"
```

That is the line that works today, and it names no index because it needs
none: **this is on PyPI**. The `--index-url` / `--extra-index-url` pair this
block carried until `0.3.0rc18` was the cost of a TestPyPI-only distribution,
and that is over.

Nothing to pin — `0.3.0` is the first final release, so an unpinned install
resolves it. [`../docs/releasing.md`](../docs/releasing.md) is the page that
says how a version gets here.

Either way you can install the identical artifact from a checkout —
`pip install -e "backend[ollama]"` from the repository root, or build the
wheel with `python3 -m build backend` — which is what CI's `clean-install`
job does, into an empty virtualenv outside the repository.

```python
from openstategraph import load_workflow

workflow = load_workflow("path/to/my-workflow")
print(workflow.ask("How many invoices are there?"))
```

`load_workflow` takes the one thing an adopter actually has — the package
folder holding `workflow.json` — and wires the package's own `tools/`,
`functions/`, `middlewares/`, `skills/` and `knowledge/` before compiling.
Anything it could not resolve lands on `.warnings` and logs a WARNING, because
the alternative failure mode is a workflow that answers confidently without
the tools it was drawn with.

`workflow.graph` is the escape hatch: the compiled LangGraph object, with
nothing of ours in the way.

## Install footprint

The core is four dependencies — `langgraph`, `langchain`, `langchain-core`,
`pydantic`. Never "four packages": **package** is a settled word here for
`workflows/<slug>/` (CLAUDE.md's lexicon), and `backend/pyproject.toml` names
this line as the place the other sense kept being copied to. Everything else is an extra, because a consumer of `load_workflow`
should not install a web server or three provider SDKs to run a graph in
their own process.

| Extra | Install it for |
| --- | --- |
| `[anthropic]` / `[openai]` / `[ollama]` | a `model` string starting `anthropic:` / `openai:` / `ollama:` |
| `[deep]` | a document containing an `agent.deep` node |
| `[sqlite]` | `settings.checkpointer: "sqlite"`, or `OPENSTATEGRAPH_MEMORY_PATH` |
| `[server]` | the editor's HTTP API (`openstategraph.api.main`) — the **web layer only**, so pair it with a provider extra (`[server,ollama]`) or the editor opens onto workflows it cannot run. Includes `[mcp]`, so `openstategraph mcp` works after this extra alone |
| `[mcp]` | the MCP transport (`openstategraph.mcp_server`) on its own, with no web server |
| `[all]` | everything above — what a checkout of this repo wants |
| `[dev]` | contributors (pytest, ruff) |

Each of those is imported lazily at its one call site, and a missing one
raises an `ImportError` naming the exact `pip install` line rather than
degrading quietly.

## Public surface and stability

`openstategraph.__all__` and `openstategraph.abc.__all__` are the semver-public
surface, plus `openstategraph.errors` and the `workflow.json` schema itself.
Everything under `openstategraph.api.*` and `openstategraph.mcp_server` is
internal and carries no stability guarantee. See
[`docs/stability.md`](../docs/stability.md) for the deprecation policy — the
short version is that pre-1.0, a breaking change bumps the **minor**, never the
patch.

MIT licensed. Full documentation lives in the repository's `docs/`.
