OpenRath#
A PyTorch-like multi-agent and multi-session runtime.
OpenRath turns agent runtime state into explicit Python objects: Session carries collaboration state, Sandbox decides where tools run, Memory persists knowledge across runs, and Workflow composes agents into reusable systems.
import os
from rath import flow
from rath.session import Session
agent = flow.Agent(
"Use tools when helpful.",
model=os.environ.get("OPENAI_DEFAULT_MODEL") or "gpt-5.5",
memory="local",
)
user = Session.from_user_message(
"Create a file, then read it back."
).to("local", spec="./")
out = agent(user)
Tutorials use deterministic steps where reproducibility matters. Production
agent workflows use the same Session, FlowToolCall, Workflow, Memory,
and Backend abstractions with OpenAI-compatible or Anthropic configuration.
Where To Start#
Path |
Use it for |
Entry |
|---|---|---|
Installation |
Install OpenRath, configure model credentials, and connect a sandbox backend when needed. |
|
Project Status |
Understand v1.2.0 maturity, new runtime layers, and remaining productization work. |
|
Tutorials |
Learn from the v1.2 numbered example ladder and focused runtime tutorials. |
|
Blog |
Read project updates, release announcements, and engineering notes. |
|
Developer Notes |
Understand runtime components, call boundaries, memory, and async behavior. |
|
API Reference |
Look up public modules, function signatures, and integration points. |
Core Model#
Concept |
Role |
|---|---|
|
Carries ordered chunk rows, sandbox placement, and lineage metadata through a run. |
|
Opens the local or OpenSandbox execution environment attached to a session. |
|
Persists recalled and committed agent knowledge through local or optional OpenViking stores. |
|
Exposes JSON schemas to the model and Python callables to the runtime. |
|
Composes agents and session transformations as ordinary Python modules. |
|
Stores the agent system session plus LLM routing options. |
|
Stores LLM routing, request parameters, retry/budget policy, and optional config lookup. |
OpenRath borrows PyTorch’s compositional vocabulary for agent runtime state: Session as the flowing value, Backend as placement, Memory as persistent state, Tool as callable operation, and Workflow as composition.#
The runtime separates agent composition, session state, backend placement, and memory into explicit surfaces.#
Runnable Example Ladder#
Example |
Demonstrates |
|---|---|
The smallest |
|
Fork, detach, session graph, and JSONL export. |
|
Key-free local memory remember / recall / commit. |
|
Swapping OpenAI-compatible and Anthropic providers. |
PyTorch Mental Model#
PyTorch mental model |
OpenRath counterpart |
|---|---|
Tensor carries data |
|
Module composes computation |
|
device controls placement |
|
Parameter persists state |
|
callable module exposes a reusable interface |
|