llm_query(). Every reasoning step, REPL code execution, and sub-agent output streams in real time.
RLM Research Paper
Read arXiv:2512.24601 on the formal REPL-based Recursive Language Model architecture.
DSPy Integration
Configure Neosantara models with DSPy declarative modules and pipelines.
Architecture Comparison
Implementation Workflow
1
Install Sandbox Runtime
DSPy RLM executes generated Python code inside an isolated Deno runtime.
2
Configure Dual-Model Routing
Split responsibilities across two specialized models to balance capability and throughput:
- Orchestrator (
dspy.configure(lm=...)): A high-reasoning model (neosantara/deepseek-v4.1-flash) that plans investigation trajectories, generates Python code, and compiles final outputs. - Sub-Worker (
sub_lm=...): A high-speed, cost-effective model (neosantara/gemini-3.8-flash) called inside the sandbox to process semantic text segments viallm_query().
3
Run Multi-Tenant Audit Scenario
The following production scenario aggregates transaction amounts, detects security anomalies, verifies compliance redactions, and streams the reasoning trajectory.
Code & Execution Streaming
REPL Sandbox Primitives
The orchestrator model has access to the following built-in primitives inside the execution sandbox:The isolated Deno/WASM sandbox prevents arbitrary filesystem access and unauthorized outbound connections outside of the Neosantara LLM interface.