Overview

RModel is a workflow programming framework designed for constructing agentic applications with LLMs. It implements by the scheduling of computational units (Neuron), that may include loops, by constructing a Brain (a directed graph that can have cycles) or support the loop-less DAGs. A Brain consists of multiple Neurons connected by Links. Inspiration was drawn from LangGraph. The Memory of a Brain leverages ristretto for its implementation.

  • Developers can build a Brain with any process flow:
    • Sequential: Execute Neurons in order.
    • Parallel and Wait: Concurrent execution of Neurons with support for downstream Neurons to wait until all the specified upstream ones have completed before starting.
    • Branch: Execution flow only propagates to certain downstream branches.
    • Looping: Loops are essential for agent-like behaviors, where you would call an LLM in a loop to inquire about the next action to take.
    • With-End: Stops running under specific conditions, such as after obtaining the desired result.
    • Open-Ended: Continuously runs, for instance, in the scenario of a voice call, constantly listening to the user.
  • Each Neuron is a concrete computational unit, and developers can customize Neuron to implement any processing procedure (Processor), including LLM calls, other multimodal model invocations, and control mechanisms like timeouts and retries.
  • Developers can retrieve the results at any time, typically after the Brain has stopped running or when a certain Memory has reached an expected value.