Skip to main content

🧟 frankstate

CI pypi license downloads versions

frankstate is a lightweight pattern layer for assembling LangGraph workflows with clearer structure, stronger boundaries, and less duplicated graph wiring.

It does not replace LangGraph and it does not introduce a separate runtime. The compiled result is still a native LangGraph graph built with official LangGraph primitives.

What The Package Provides

The published package focuses on reusable workflow assembly contracts:

  • WorkflowBuilder to compile a graph from a layout class.
  • GraphLayout to separate runtime dependency construction from graph declaration.
  • SimpleNode, CommandNode, ToolGraphNode, SimpleEdge, and ConditionalEdge to model graph structure.
  • StateEnhancer, StateEvaluator, and StateCommander to keep node and routing logic aligned with LangGraph concepts.
  • NodeManager and EdgeManager to normalize layout declarations into LangGraph registration calls.

Public API

The package root intentionally exports only:

from frankstate import WorkflowBuilder

All other reusable contracts should be imported from subpackages, usually from their concrete modules:

from frankstate.entity.graph_layout import GraphLayout
from frankstate.entity.node import SimpleNode, CommandNode, ToolGraphNode
from frankstate.entity.edge import SimpleEdge, ConditionalEdge
from frankstate.entity.statehandler import StateEnhancer, StateEvaluator, StateCommander
from frankstate.entity.runnable_builder import RunnableBuilder
from frankstate.managers.node_manager import NodeManager
from frankstate.managers.edge_manager import EdgeManager

Installation

With pip:

pip install frankstate

With uv:

uv pip install frankstate

Optional example dependencies:

pip install frankstate[examples]

The published wheel contains only frankstate. Repository-level reference code, service integrations, notebooks, and tests are not part of the base package.

Minimal Example

from frankstate import WorkflowBuilder
from my_project.layouts.simple_graph import SimpleGraphLayout
from my_project.state import GraphState

workflow_builder = WorkflowBuilder(
    config=SimpleGraphLayout,
    state_schema=GraphState,
)

graph = workflow_builder.compile()

LangGraph Alignment

frankstate keeps the official LangGraph execution model:

  • StateEnhancer wraps node logic that returns partial state updates.
  • StateEvaluator wraps the callable used by conditional edges.
  • StateCommander wraps nodes that return official LangGraph Command objects.

The compiled graph still relies on LangGraph's own StateGraph, add_node(), add_edge(), add_conditional_edges(), and Command.

Repository Boundaries

If you are browsing the repository instead of the published package:

  • src/frankstate is the reusable package.
  • src/core_examples is the repository reference layer.
  • src/services contains repository integrations and deployment entrypoints.

Those repository layers help demonstrate how frankstate can be consumed, but they are not the stable public API of the base wheel.

Runnable Builders

The following structure

RunnableBuilder is a recommended way to organize LangChain LCEL builders inside a layout. Optional capabilities can be added through cooperative multiple inheritance using mixins:

Mixin Adds
PromptMixin Enforces a _build_prompt(**kwargs) hook
RetrieverMixin Lazily initialized retriever from a vectordb or pre-built retriever

Mix and match to get exactly the capability each builder needs — no base class carries attributes it does not use:

ChatBuilder   → PromptMixin, RunnableBuilder                   # prompt + model
RAGBuilder    → RetrieverMixin, PromptMixin, RunnableBuilder   # retriever + prompt + model
AgentBuilder  → PromptMixin, RunnableBuilder                   # prompt + tools (tools stored in subclass)

Working examples live in src/core_examples/components/runnables/.

Metadata

Release files for frankstate 0.2.2

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

Source distribution (sdist)

Source distribution for frankstate 0.2.2
File Size Uploaded Provenance Actions
frankstate-0.2.2.tar.gz 22.3 kB With provenance Details for frankstate-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for frankstate 0.2.2
File Interpreter ABI Platform Actions
frankstate-0.2.2-py3-none-any.whl Python 3 none any Details for frankstate-0.2.2-py3-none-any.whl

Total release size: 40.8 kB

Release files / frankstate-0.2.2.tar.gz

Download URL frankstate-0.2.2.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3cfd1e141313c0d93d84d41083422e59192c710d8d2c11662b6cdcffa113ed9a
BLAKE2b-256 checksum
How to use checksums
35303dd9cee86a3e96d38345e5dacb2d0cc18ddaf8044daf3c7846096063f5a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Release files / frankstate-0.2.2-py3-none-any.whl

Download URL frankstate-0.2.2-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a2ade20628fdc5764ded26156c0045b3b8a46a9200c766557e8c3573952a839
BLAKE2b-256 checksum
How to use checksums
7b4e921eaacf71dfd19abb21b9eafee5bb9b22bed119d1a7ca7886e25ba742b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 17, 2026.

Transparency log

Security for frankstate 0.2.2

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for frankstate-0.2.2.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 Sep 17, 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