Python FrameworkOpen Source

No Hidden Magic. Just Agent Control

A high-reliability, lightweight agent state machine runtime. Build deterministic, sandboxed pipelines for LLMs with strict safety policies and pause-and-resume workflows.

solidstate-runtime
from solidstate import AgentRuntime, RuntimeState
from solidstate.models.openai_model import OpenAIModelAdapter
from solidstate.persistence import FileCheckpointer

# Initialize runtime with model, checkpointer, and policies
runtime = AgentRuntime(
    model=OpenAIModelAdapter("gpt-4o"),
    tool_registry=registry,
    policy_evaluator=policy,
    checkpointer=FileCheckpointer("checkpoints/"),
    tracer=JsonlTracer("audit.jsonl")
)

# Run turn-based execution loop
state = RuntimeState.new("Analyze account risk and transfer funds")
final_state = await runtime.run(state)

print(f"Final execution status: {final_state.status}")
from solidstate.graph import StateGraph
from solidstate import RuntimeState

# Construct multi-agent orchestration graph
workflow = StateGraph()
workflow.add_node("researcher", researcher_agent.run)
workflow.add_node("writer", writer_agent.run)

workflow.set_entry_point("researcher")
workflow.add_edge("researcher", "writer")

# Alternatively, build workflow using symbolic syntax sugar:
# pipeline = researcher >> writer
pipeline = researcher >> writer
final_state = await pipeline.run(state)
TERMINAL● RUNNING
$ python agent.py
[solidstate] Initializing OpenAIModelAdapter (gpt-4o)... (0.015s)
[solidstate] Loaded 3 tools (calculate_risk, query_db, transfer_funds)
[solidstate] Evaluating high-risk tool call 'transfer_funds'...
[solidstate] Safety Policy triggered INTERRUPT. Execution paused.
[solidstate] Saving runtime checkpoint state...
[solidstate] Checkpoint written: checkpoints/run_8f2d90a.json
Run state: paused | Action required: Human approval for transfer_funds.

The Five Pillars of SolidState

Exposing the raw mechanics required to transition agents from simple loops to production applications.

01

State Management

Every conversation turn, model decision, and tool input is logged and versioned in a structured state context.

02

Tool Governance

Every generated action is parsed and verified by a deterministic schema and security policy before running.

03

Human-in-the-Loop

Seamlessly pause execution on high-risk operations, request human approval, and resume from checkpoints.

04

Checkpoint Persistence

Save and recover agent states automatically. Supports local filesystem, Redis caching, or Amazon DynamoDB tables.

05

Multi-Agent Graphs

Orchestrate specialized agent handoffs and conditional routing using StateGraphs and symbolic chaining (`>>`).

Framework Modules

A modular design enabling custom storage, model adapters, and visual debug dashboards.

productionFeatured

solidstate-core

The lightweight state machine runtime loop in Python. Handles context trimming, introspects Pydantic classes for schemas, supports concurrent tool calls, and handles error recovery.

PythonPydanticAsyncioModel Adapters
coming-soon

solidstate-studio

A visual IDE dashboard (coming soon). Will enable developers to visually inspect active agent graphs, trace conversation histories, view generated Mermaid diagrams, and inject state checkpoints.

FastAPIReactMermaid.jsState Inspector
stable

stategraph-engine

Orchestrator for complex pipelines. Connect nodes, define conditional edges, map routing decisions, and pipe specialized agents together with expressive symbolic operators.

GraphsDAGSymbolic SyntaxRouting

Active Research & Case Studies

Evaluating production constraints, context budgets, and distributed state layouts.

OptimizationSmart Caching

Mitigating Latency with Response Caching

Running agentic loops repeatedly often generates identical tool-invocation patterns. By hashing state layouts and matching cached responses, lookup times drop to sub-millisecond rates (<1ms) instead of standard LLM call delays.

Smart CacheHashed LayoutsToken Savings
SecurityTool Safety

Human-in-the-Loop Interrupts

High-risk actions require validation. We demonstrate an execution flow that pauses code execution inside serverless Lambdas, serializes the agent state to DynamoDB, and wakes up immediately upon user HTTP approval.

AWS LambdaDynamoDB CheckpointsSafety Interrupts

Orchestrate Agents Safely

SolidState is open source and designed to fit cloud infrastructure. Run fully locally with Ollama, or deploy distributed agent loops using Redis and AWS CloudWatch logging.