OpenRath
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/whilecontrol flow stays plain Python.
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.
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 |