Skip to content

Remove the Rhai REPL and RLM runtimes as host-side concerns - #107

Merged
senamakel merged 20 commits into
mainfrom
drop-repl-rlm
Aug 13, 2026
Merged

Remove the Rhai REPL and RLM runtimes as host-side concerns#107
senamakel merged 20 commits into
mainfrom
drop-repl-rlm

Conversation

@senamakel

Copy link
Copy Markdown
Member

Summary

Removes the Rhai-backed .ragsh REPL runtime and the RLM (recursive-language-model) runtime from the crate. Both are surfaces a host can implement on top of what TinyAgents already provides — the capability registry, the harness, sub-agent recursion accounting, and the event journal — so shipping them here only forced an embedded interpreter into every dependent's dependency graph.

72 files changed, +164 / −11,746.

What was removed

  • src/rlm/ and src/repl/ in full, plus their lib.rs module declarations and re-exports (RlmRunner, RlmSession, RlmConfig, ReplSession, ReplResult, …).
  • The rhai dependency and the repl / rlm Cargo features. rhai no longer appears in Cargo.lock at all, and tokio/process + tokio/io-util are no longer pulled in.
  • AgentEvent::ReplCall and ReplCallPhase from harness::events — the only place the harness reached into repl.
  • examples/rlm_rhai.rs, examples/rlm_python.rs and their [[example]] entries.
  • 11 test files (feature_rlm_*, feature_repl_*, e2e_rlm, live_rlm, repl_session, e2e_repl_blueprint), the repl slice of e2e_misc_public_helpers.rs, and the permanently-ignored graph -> REPL -> graph placeholder in e2e_complex_graph.rs.
  • docs/modules/repl-language/ and docs/modules/rlm/.

What was kept, deliberately

  • The .rag repl_agent node kind and ComponentKind::Script. These are name-only bindings: the compiler validates that a script "x" reference resolves in the registry and never executes anything. They are now the seam a host uses to bind its own scripted node implementation, so removing them would have taken away the hook rather than the implementation. Docs reworded to say the node implementation is host-supplied.
  • SessionId / CellId in harness::ids — still used by the session store. Doc comments generalized off .ragsh.

Docs

The crate's framing was built around RLM, so the prose needed real work, not a find-and-replace:

  • Package description and lib.rs header: "a recursive language-model (RLM) harness for Rust" → "a durable agent + graph harness for Rust". The recursion story (sub-agents, graphs running graphs, self-authoring .rag) is intact — only the embedded-interpreter half is gone.
  • docs/spec/README.md drops from five surfaces to four and gains a Host-side surfaces section naming exactly what a host must implement and what this crate hands it.
  • README, AGENTS.md/CLAUDE.md, and the graph / registry / expressive-language module docs updated to match.

The wiki/ submodule still has RLM and .ragsh pages. Left untouched here — the repo convention is that wiki pointer updates land in their own commit.

Breaking changes

Anything depending on tinyagents::repl, tinyagents::rlm, AgentEvent::ReplCall, or the repl / rlm features must move to a host-side implementation. Everything else — harness, graph, registry, .rag — is unchanged.

Commands run locally

  • cargo fmt --check — clean
  • cargo clippy --all-targets --all-features -- -D warnings — clean
  • cargo build --all-targets — clean
  • cargo test and cargo test --all-features — pass (101 test binaries green)
  • cargo doc --no-deps --all-features — warning count unchanged from main; none reference the removed modules

senamakel and others added 20 commits August 14, 2026 02:23
The rlm runtime and its repl-language companion were removed from the codebase, along with their documentation, examples, and tests. This change deletes the entire module tree and all associated files, reducing the project's surface area by over 11,000 lines.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The recursive-language-model runtime and its embedded Rhai scripting engine have been removed from the crate, along with the associated `repl` and `rlm` features and their examples. The project description now reflects the focus on durable agent and graph harness functionality.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The `.ragsh` REPL language and the recursive-language-model runtime are removed from this crate, along with their corresponding `repl` and `rlm` Cargo features. These imperative orchestration surfaces are now considered host concerns and are deliberately excluded, leaving the crate focused on the declarative `.rag` language and the core graph/harness runtime.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The ReplCall event and its associated ReplCallPhase enum have been removed from the AgentEvent type. This event was gated behind the `repl` feature and streamed host capability calls from REPL cells, but is no longer needed as the functionality it supported has been superseded.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Remove several event type variants that are no longer referenced anywhere in the codebase, cleaning up the type definition and reducing maintenance overhead.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The doc comments on `SessionId` and `CellId` no longer refer to a `.ragsh` REPL session, instead describing a host-driven orchestration session. References to the REPL module are replaced with the broader "session" terminology to match the code's current design.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The e2e test for public helpers no longer exercises the repl module's
CapabilityPolicy, ReplCommand, ReplOutcome, ReplSession, and parse_command
contracts, removing the associated assertions and imports. The test now
focuses solely on tool schemas, limits, and ID generation.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Remove the rhai scripting engine and its transitive dependencies from the lockfile, as the feature is no longer used by the project. This also cleans up several related crates that were only pulled in to support rhai, including ahash, const-random, and signal-hook-registry.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…PL language

The README now describes TinyAgents as a durable agent and graph harness rather than an RLM harness, and removes all references to the `.ragsh` REPL language and the embedded interpreter. The recursion concept is reframed around re-entrant runtime decomposition instead of the RLM paper, and the architecture diagram and feature list are updated to match the current scope.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the README's wiki links to reflect the current terminology, renaming the "Recursion and the RLM model" link to "Recursion and sub-agents" and removing the outdated REPL language entry.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The specification now describes four modules instead of five, with the scripted CodeAct/REPL orchestration loop explicitly moved to a host-side concern rather than a shipped surface. This clarifies that the crate provides primitives like the registry, sub-agents, and typed session IDs, while interpreters and driver loops remain the responsibility of hosts building on top of these modules.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The AGENTS.md documentation now reflects that the REPL/CodeAct orchestration layer is a host concern and not implemented in this library crate. The Cargo feature gate for the Rhai engine is replaced with the `tools` feature for the builtin generic tool family, and references to the REPL language in tests and module docs are removed accordingly.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update documentation to distinguish between the host orchestration session and the REPL language module, clarifying that script execution is a host-provided capability rather than an interpreter shipped with this crate.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update documentation and code comments across the error type, graph builder, language compiler and resolver, and registry modules to reference only the `.rag` file extension, removing all mentions of the deprecated `.ragsh` extension.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The documentation comments across the graph, harness providers, and registry modules were updated to remove references to the RLM architecture and the `.ragsh` REPL, replacing them with more general descriptions of the recursive architecture and host orchestration sessions. This clarifies the documentation for users who may not be familiar with the RLM terminology or the `.ragsh` tool.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The crate-level documentation now describes TinyAgents as a durable agent and graph harness rather than an RLM-specific implementation, removing the direct citation of the Recursive Language Models paper. The recursive execution model is still presented as the core through-line, but the scripted interpreter form is now explicitly framed as a host concern built on the harness surfaces rather than something the crate ships. Module-level doc comments in the embeddings, middleware, and language modules were updated to match this simplified framing.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Clarify the documentation by replacing the "recursive-language-model (RLM)" acronym with the plain term "recursive runtime" and "harness" in the agent loop and model layer module docs, and remove a trailing blank line in the e2e test file.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The ignored test for graph-to-REPL composition was removed since the REPL engine it depends on is not planned for the current work, eliminating dead code that would never run. The script descriptor test now uses the correct ".script" extension instead of the outdated ".ragsh" suffix, aligning the test with the actual file naming convention.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The READMEs for the graph runtime, agent loop, and middleware now describe the recursive architecture without the "RLM-style" qualifier, and the graph README replaces the reference to the `.ragsh` REPL with a generic host orchestrator. This clarifies the documentation by removing outdated terminology and broadening the description of how workflows are driven.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Rejoined a line break in the graph module's README so the description of the recursive architecture reads as a single continuous sentence, and removed a trailing blank line from the end of the e2e complex graph test file.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@senamakel, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 218e10c4-81a8-487d-8bc5-d0a1d014522a

📥 Commits

Reviewing files that changed from the base of the PR and between dcd5c6d and 2364cf3.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (71)
  • AGENTS.md
  • Cargo.toml
  • README.md
  • docs/modules/expressive-language/README.md
  • docs/modules/expressive-language/implementation-status.md
  • docs/modules/expressive-language/reference.md
  • docs/modules/graph/README.md
  • docs/modules/registry/README.md
  • docs/modules/repl-language/README.md
  • docs/modules/repl-language/design.md
  • docs/modules/repl-language/operations.md
  • docs/modules/rlm/README.md
  • docs/spec/README.md
  • docs/spec/expressive-language-spec.md
  • examples/rlm_python.rs
  • examples/rlm_rhai.rs
  • src/error.rs
  • src/graph/README.md
  • src/graph/builder/mod.rs
  • src/graph/mod.rs
  • src/harness/agent_loop/README.md
  • src/harness/agent_loop/mod.rs
  • src/harness/embeddings/mod.rs
  • src/harness/events/types.rs
  • src/harness/ids/types.rs
  • src/harness/middleware/README.md
  • src/harness/middleware/mod.rs
  • src/harness/model/mod.rs
  • src/harness/providers/mod.rs
  • src/language/compiler.rs
  • src/language/mod.rs
  • src/language/resolver.rs
  • src/lib.rs
  • src/registry/capability/mod.rs
  • src/registry/capability/types.rs
  • src/registry/component/mod.rs
  • src/registry/mod.rs
  • src/repl/mod.rs
  • src/repl/session/builtins/authoring.rs
  • src/repl/session/builtins/batched.rs
  • src/repl/session/builtins/capabilities.rs
  • src/repl/session/builtins/mod.rs
  • src/repl/session/mod.rs
  • src/repl/session/test.rs
  • src/repl/session/types.rs
  • src/repl/test.rs
  • src/repl/types.rs
  • src/rlm/host.rs
  • src/rlm/interpreter/external.rs
  • src/rlm/interpreter/mod.rs
  • src/rlm/interpreter/rhai_cell.rs
  • src/rlm/mod.rs
  • src/rlm/runner.rs
  • src/rlm/session.rs
  • src/rlm/templates.rs
  • src/rlm/test.rs
  • src/rlm/types.rs
  • tests/e2e_complex_graph.rs
  • tests/e2e_misc_public_helpers.rs
  • tests/e2e_repl_blueprint.rs
  • tests/e2e_rlm.rs
  • tests/feature_registry_diagnostics.rs
  • tests/feature_repl_graph_authoring.rs
  • tests/feature_repl_session.rs
  • tests/feature_rlm_config.rs
  • tests/feature_rlm_host.rs
  • tests/feature_rlm_runner.rs
  • tests/feature_rlm_session.rs
  • tests/feature_rlm_templates.rs
  • tests/live_rlm.rs
  • tests/repl_session.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@senamakel
senamakel merged commit 18a66c5 into main Aug 13, 2026
3 checks passed
@tinysweeper

tinysweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown

How this change flows

0 changed behaviours across 6 relationships. 6 surrounding behaviours are shown (60 graph nodes walked). 48 further behaviours left out to keep the diagram readable.

flowchart LR
  n0["complex_graph"]:::impacted
  n1["Send"]:::impacted
  n2["Result"]:::impacted
  n3["add_node"]:::impacted
  n4["add_edge"]:::impacted
  n5["alias"]:::impacted
  n0 -->|calls| n3
  n0 -->|tests| n3
  n0 -->|calls| n4
  n0 -->|tests| n4
  n3 -->|uses| n1
  n5 -->|uses| n2
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading

Green: changed behaviour. Grey: surrounding behaviour. Arrows name the call, use, implementation, or test relationship. Orange: has findings. Red: has a finding that blocks the merge.

tinysweeper 0.1.0

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.4697 · 923,684 in / 108,430 out · 56,192 cached (6%) · deepseek/deepseek-v4-pro-0813, openrouter/openai/text-embedding-3-small · 779 embedded
critique:    $0.2144 · 374,766 in / 76,158 out  · 34,432 cached (9%) · deepseek/deepseek-v4-pro-0813
security:    $0.1044 · 241,208 in / 8,999 out   · 19,456 cached (8%) · deepseek/deepseek-v4-pro-0813
tests:       $0.0707 · 156,085 in / 3,256 out   · 0 cached (0%)      · deepseek/deepseek-v4-pro-0813
description: $0.0776 · 148,097 in / 15,092 out  · 0 cached (0%)      · deepseek/deepseek-v4-pro-0813

@tinysweeper tinysweeper Bot added the priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later. label Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant