by Rath-Team
An open-source, PyTorch-like runtime for dynamic multi-agent and multi-session workflows.
# Add to your Claude Code skills
git clone https://github.com/Rath-Team/OpenRathOpenRath is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by Rath-Team. An open-source, PyTorch-like runtime for dynamic multi-agent and multi-session workflows. It has 955 GitHub stars.
OpenRath's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/Rath-Team/OpenRath" and add it to your Claude Code skills directory (see the Installation section above).
OpenRath is primarily written in Python. It is open-source under Rath-Team on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh OpenRath against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
English | 简体中文
OpenRath is a PyTorch-like multi-agent & multi-session framework.
It turns agent runtime state into explicit, composable Python objects:
if / while control flow stays plain Python.| 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.
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. |
| Resilient workers | Leases, fencing, retries, cancellation, deadlines, and resumable queues prevent stale workers from silently committing new state. |
| Controlled side effects | An Effect Ledger records outcomes and idempotency keys. Ambiguous non-idempotent effects stop in NEEDS_REVIEW instead of being replayed blindly. |
| Human decisions | Durable Interrupts pause a Run for approval or input and resume it without rebuilding hidden loop state. |
| Security and tenancy | Agent Server tokens carry explicit action grants; tenant/project scope, policy checks, secret references, trust labels, and audit remain separate boundaries. |
| Production operations | PostgreSQL is the durable source of truth, Redis can accelerate signaling, S3-compatible storage holds artifacts, and health, migration, telemetry, container, and Kubernetes references are included. |
Embedded mode remains useful inside a trusted process. Agent Server mode is the strict production profile:
runtime = LocalRuntime(
store,
effect_ledger=ledger,
production_mode=True,
)
server = AgentServer(store, runtime, auth=auth, audit_sink=audit)
Install the production profile and run schema migration as a separate operation:
pip install "openrath[server,postgres]"
openrath-migrate
openrath-migrate --check
Runtime identities do not need DDL privileges. Tokens need explicit action grants, object access is tenant/project scoped, and synchronous steps cannot declare a preemptive timeout; use an async step or isolated executor when a deadline must be enforced.
OpenRath v2.0.0 is designed for production deployment while keeping interface
maturity explicit: the Agent Server HTTP surface remains Beta, and v1 JSONL
imports are historical records rather than resumable active Runs. Deployment,
migration, security, and operations guidance lives in
deploy/, including
operations-v2.md,
migration-v2.md, and the generated
openapi-v2.json.
| Paradigm | Typical shape | Example |
|---|---|---|
| Single agent, single session | One model over one conversation | ChatGPT-style chat |
| Multi-agent, single session | Several roles read and write one shared state | Sub-agent-style multi-agent collaboration |
| Single agent, multi-session | One agent manages many session branches | OpenClaw-style session fanout |
| Multi-agent, multi-session | Many agents share many sessions and collaborate or evolve through Session | OpenRath |
An agent is a transformation layer on Session, so what really needs to be forked, merged, reused, and traced is the Session dataflow—not a separate message history maintained by each agent.
OpenRath's design addresses the problems that appear when agent systems move from one assistant to large clusters:
The result is a runtime where state, execution, memory, and orchestration stay decoupled enough to scale, yet remain connected through one flowing value: Session.
from collections.abc import Mapping
from typing import Any
from pydantic import BaseModel, Field
from rath import flow
from rath.flow.tool import FlowToolCall
from rath.session import Session
class WordCountInput(BaseModel):
text: str = Field(description="Text to count.")
# OpenRath Tool
class WordCountTool(FlowToolCall):
@property
def name(self) -> str:
return "word_count"
@property
def description(self) -> str:
return "Count words in a short text."
@property
def parameters(self) -> Mapping[str, Any]:
return WordCountInput.model_json_schema()
def __call__(