Rath-Team/OpenRath
An open-source, PyTorch-like runtime for dynamic multi-agent and multi-session workflows.
What it solves
OpenRath addresses the complexity of managing large-scale agent clusters where multiple agents must collaborate across multiple, branchable conversation states. It moves away from simple agent loops to a dataflow-centric model, preventing "prompt spaghetti" and reducing token consumption by treating conversation context as structured, reusable chunks rather than repeated strings.
How it works
Inspired by PyTorch's modular design, OpenRath treats the agent runtime state as a flowing value called a Session.
- Session: The core data object containing conversation history, lineage, and sandbox placement. It can be forked, merged, or detached to create complex execution graphs.
- Agent: A reusable transformation layer (similar to a neural network layer) that takes a Session and returns a modified Session using a prompt and provider.
- Workflow: A composable container that chains agents, tools, and other workflows together.
- Sandbox: An execution environment (local or containerized via OpenSandbox) where tools are actually run.
- Memory: A persistent state layer that allows agents to recall and commit facts across different runs.
- Selector: An LLM-backed router that dynamically chooses the next workflow to execute based on the current session state.
Who it’s for
Developers building complex multi-agent systems that require durable memory, traceable execution lineage, and the ability to manage many collaborating agents without losing track of the conversation state.
Highlights
- Session-Centric Dataflow: Context is handled as structured chunks, allowing for efficient forking and merging of conversation branches.
- Traceable Lineage: Maintains a graph-shaped provenance layer to track which role or tool produced specific outputs.
- Modular Composition: Workflows can be nested and reused, making the management of hundreds of agents tractable.
- Decoupled Backends: Supports flexible plug-ins for both execution (Sandboxes) and persistence (Memory backends like OpenViking).
- Dynamic Routing: Uses a
Selectorto implement LLM-driven control flow (if/while) using plain Python.