OpenRath  by Rath-Team

Dynamic multi-agent and multi-session framework

Created 1 month ago
410 stars

Top 70.8% on SourcePulse

GitHubView on GitHub
Project Summary

OpenRath is a PyTorch-like framework designed for building dynamic, multi-agent, and multi-session workflows. It addresses the complexity of large-scale agent systems by treating Session as the core dataflow, enabling explicit state management, composability, and traceable lineage. This framework benefits engineers and researchers developing sophisticated agent clusters requiring durable memory, sandboxed execution, and intricate collaboration patterns.

How It Works

OpenRath re-imagines agent frameworks by centering on Session as the primary runtime value, analogous to PyTorch's Tensor. A Session encapsulates conversation state, execution placement (Sandbox), lineage, and token usage, allowing for branching, merging, and direct context reuse. Agents act as reusable transformation layers on Session, similar to nn.Linear modules, incorporating prompts, LLM providers, tools, and memory. Workflows compose these agents and other components like nn.Modules, while Selectors use LLMs to dynamically route execution between workflows, enabling if/while control flow. This multi-agent, multi-session paradigm decouples state, execution, and memory, offering a scalable and traceable architecture.

Quick Start & Requirements

Installation is straightforward via pip: pip install openrath. Optional integrations for sandboxing and memory backends are available: pip install "openrath[opensandbox]" and pip install "openrath[openviking]". Development setup involves cloning the repository and syncing dependencies (uv sync --group dev --group docs). Most LLM-dependent features require OpenAI-compatible environment variables (e.g., OPENAI_API_KEY, OPENAI_BASE_URL) or configuration in ~/.openrath/config.json. Comprehensive examples are provided in the example/ directory, serving as a learning ladder. Official documentation is available at https://docs.openrath.com.

Highlighted Details

  • Session as Dataflow Core: Explicitly models multi-agent, multi-session interactions where Session dataflow, not just message history, is forkable, mergeable, and traceable.
  • Session Graph: Provides a runtime provenance layer for massive agent clusters, tracing roles, branches, tool calls, and workspaces for explainability.
  • Modular Workflow Composition: Enables management of hundreds or thousands of agents through nested, reusable Workflow modules, simplifying complex system design.
  • Decoupled Runtime Architecture: State (Session), execution (Sandbox), and memory (Memory) are decoupled, allowing flexible backend integration (local, OpenSandbox, OpenViking) and scalability.
  • Dynamic Runtime Routing: LLM-backed Selectors enable dynamic routing between self-describing workflows, facilitating complex conditional logic.
  • Learning Ladder Examples: The example/ directory offers a structured, numbered series of scripts introducing core concepts sequentially.

Maintenance & Community

The provided README does not detail specific maintenance contributors, sponsorships, or community channels (e.g., Discord, Slack).

Licensing & Compatibility

OpenRath is distributed under a BSD-style license. This license generally permits commercial use and integration with closed-source projects without significant restrictions.

Limitations & Caveats

The README focuses on the core architecture and usage patterns, offering limited details on specific limitations, known bugs, or performance benchmarks. Many advanced features, such as dynamic routing and agent execution, necessitate LLM API keys and associated costs. The opensandbox and openviking integrations require separate installation.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
10
Issues (30d)
1
Star History
328 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.