StackMap
Subscribe
Explore / OpenRath
Rath-Team

OpenRath

PyTorch-shaped multi-agent framework: Session is the tensor, Agent the layer, Workflow the module — plus a v2 durable runtime with checkpoints, leases, an effect ledger and human interrupts.

1,127 59 Python BSD-3-Clauseupdated 1 months ago
View on GitHubDispute this mapping →
Curator's take

The abstraction is the pitch. Starting from Session rather than the agent loop is what lets you branch, trace and compose many agents across many sessions without hand-rolling a state machine — and v2's effect ledger (idempotency keys, ambiguous effects parked in NEEDS_REVIEW instead of blindly replayed) is the part most 'production-ready' agent frameworks quietly skip. The cost is conceptual weight plus Postgres, Redis and S3 for anything durable. For one agent with five tools this is far more machinery than the job needs, and the Agent Server HTTP surface is still Beta.

Mapped by ShipWithAI editors · links verified
README.md

OpenRath

OpenRath logo

PyPI Python License Docs arXiv

English | 简体中文


OpenRath is a PyTorch-like multi-agent & multi-session framework.

It turns agent runtime state into explicit, composable Python objects:

  • Session carries conversation state and inter-agent collaboration lineage.
  • Sandbox decides where tools actually run.
  • Memory persists agent memory state across runs.
  • Tool is the operator-like callable surface exposed to the model.
  • Agent is a reusable, composable session transformation layer.
  • Workflow composes multiple agents and workflows into larger systems.
  • Selector routes between self-describing workflows at runtime, so if / while control flow stays plain Python.

OpenRath in the PyTorch Lens

OpenRath in the PyTorch Lens

PyTorch idea OpenRath idea What it means
Tensor Session The flowing runtime value: ordered chunks, placement, lineage, and usage.
Device Sandbox / Backend The execution environment where tools run: local process, OpenSandbox, or another backend.
Parameter Memory Persistent state bound to an agent or store, recalled and committed across runs.
Function Tool A callable operation with model-visible schema and runtime behavior.
nn.Linear Agent A reusable layer that maps one session to another using a prompt, provider, tools, and memory.
nn.Module Workflow A composable container for agents, tools, session transforms, and nested workflows.
control flow Selector An LLM-backed router that picks the next workflow at runtime, enabling dynamic if / while over agents.

Most agent frameworks begin with an agent loop. OpenRath begins with Session. That difference matters when one application needs multiple agents, multiple branches, durable memory, sandboxed execution, and traceable lineage at the same time.

OpenRath is designed for this: many agents collaborating across many branchable sessions, while still tracing every role, workspace, memory write, and final output.

OpenRath v2.0.0: Built for Production

The defining change in OpenRath v2.0.0 is that OpenRath moves beyond a composable Python framework and becomes a durable runtime designed for production deployment. The existing Session-first Python API remains intact; the release adds a production execution and operations layer around it.

OpenRath v2.0.0 durable runtime overview

The diagram summarizes this production path: Python definitions compile into immutable plans, durable Runs are governed by checkpoints, leases, effects, and interrupts, and PostgreSQL, Redis, and S3-compatible storage provide the operational data plane.

Production concern What OpenRath provides
Durable execution Explicit @step / @router boundaries compile into immutable execution plans. Runs, Events, and Checkpoints survive process and worker restarts.
Resili

Continue your stack

What teams reach for next — and why each earns a place beside OpenRath. Ranked by curator confidence.