🧟 frankstate
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:
WorkflowBuilderto compile a graph from a layout class, andto_mermaid()to render it.GraphLayoutto separate runtime dependency construction from graph declaration.SimpleNode,CommandNode,ToolGraphNode,SimpleEdge, andConditionalEdgeto model graph structure.StateEnhancer,StateEvaluator, andStateCommanderto keep node and routing logic aligned with LangGraph concepts.RunnableBuilderwithPromptMixinandRetrieverMixinto assemble LCEL chains inside a layout.NodeManagerandEdgeManagerto 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, PromptMixin, RetrieverMixin
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()
print(workflow_builder.to_mermaid()) # the topology as a Mermaid diagram
graph is a native LangGraph CompiledStateGraph.
LangGraph Alignment
frankstate keeps the official LangGraph execution model:
StateEnhancerwraps node logic that returns partial state updates.StateEvaluatorwraps the callable used by conditional edges.StateCommanderwraps nodes that return official LangGraphCommandobjects.
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/frankstateis the reusable package.src/core_ai_examplesis the repository reference layer.src/servicescontains 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
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 the repository under src/core_ai_examples/components/runnables/.
Metadata
Release files for frankstate 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| frankstate-0.2.3.tar.gz | 19.6 kB | With provenance | Details for frankstate-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| frankstate-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for frankstate-0.2.3-py3-none-any.whl |
Total release size: 38.2 kB
Release files / frankstate-0.2.3.tar.gz
| Download URL | frankstate-0.2.3.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dba2c92068d3c8afc0f2e17f224ebabc9f40cc4ff8df387495c52f5416932cc1
|
|
BLAKE2b-256 checksum How to use checksums |
bc6f53fef85b0eed700061be336856d5a17dd8fad925fe8e02c1b4c608854e91
|
| 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 logRelease files / frankstate-0.2.3-py3-none-any.whl
| Download URL | frankstate-0.2.3-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d825824f29ca99a33f5c07d874881fff68e5a81695ce52007bdbf5a4fad2bca8
|
|
BLAKE2b-256 checksum How to use checksums |
0a4c60b54cf08072178f4c5dd116873a144fd96d65b8236b2dd90e699f0e6654
|
| 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 logSecurity for frankstate 0.2.3
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.
Attestation for frankstate-0.2.3.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 logA 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.