Frank brings order and helps you build complex LLM workflows using scalable, testable, and reusable components.
Project description
🧟 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.GraphLayoutto separate runtime dependency construction from graph declaration.SimpleNode,CommandNode,SimpleEdge, andConditionalEdgeto model graph structure.StateEnhancer,StateEvaluator, andStateCommanderto keep node and routing logic aligned with LangGraph concepts.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
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:
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_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
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/.
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 frankstate-0.2.0.tar.gz.
File metadata
- Download URL: frankstate-0.2.0.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71450d2f7eea84ba7180a0dedbcb0e69c039147e2e54f9005d984c557d2770b3
|
|
| MD5 |
00040d1d0c5006bfc7412b117eef9315
|
|
| BLAKE2b-256 |
94ea6d1b195a76cdb421f0c353a7d982a254ca806e05f8c91b86129635330b49
|
Provenance
The following attestation bundles were made for frankstate-0.2.0.tar.gz:
Publisher:
release.yml on aamaragones/frankenst-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
frankstate-0.2.0.tar.gz -
Subject digest:
71450d2f7eea84ba7180a0dedbcb0e69c039147e2e54f9005d984c557d2770b3 - Sigstore transparency entry: 2014008439
- Sigstore integration time:
-
Permalink:
aamaragones/frankenst-ai@a9db825d072a0d64548342d3f08cf238f2b139b4 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/aamaragones
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a9db825d072a0d64548342d3f08cf238f2b139b4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file frankstate-0.2.0-py3-none-any.whl.
File metadata
- Download URL: frankstate-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6211e6dedf503d2808e086f9e156f0c78fdc1b4914f76fc3f7113475673eb963
|
|
| MD5 |
119fb4714917bc9313c545bd725e0137
|
|
| BLAKE2b-256 |
66271c321cb8d427480436d98ba9c2a54f06526a5e79541a06db1909834b5362
|
Provenance
The following attestation bundles were made for frankstate-0.2.0-py3-none-any.whl:
Publisher:
release.yml on aamaragones/frankenst-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
frankstate-0.2.0-py3-none-any.whl -
Subject digest:
6211e6dedf503d2808e086f9e156f0c78fdc1b4914f76fc3f7113475673eb963 - Sigstore transparency entry: 2014008546
- Sigstore integration time:
-
Permalink:
aamaragones/frankenst-ai@a9db825d072a0d64548342d3f08cf238f2b139b4 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/aamaragones
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a9db825d072a0d64548342d3f08cf238f2b139b4 -
Trigger Event:
push
-
Statement type: