This page documents the current, maintained Python interfaces for building on fleet-rlm.
Primary sandbox execution runtime.
Typical usage:
from fleet_rlm import ModalInterpreter
with ModalInterpreter(timeout=600, secret_name="LITELLM", volume_name="rlm-volume-dspy") as interp:
result = interp.execute("print('hello')")Key capabilities:
- lifecycle control (
start,shutdown, context managers) - sync/async execution (
execute,aexecute) - execution profile support used by server and delegate workflows
Interactive ReAct orchestration module used by CLI and server chat surfaces.
Key behaviors:
- document loading and active-alias management
- command dispatch execution
- sync/async chat turn helpers
- streaming event generation for WebSocket clients
Current maintained runner surface:
build_react_chat_agent(...)run_react_chat_once(...)arun_react_chat_once(...)run_long_context(...)check_secret_presence(...)check_secret_key(...)
Constructs an RLMReActChatAgent with runtime controls such as:
- ReAct/RLM iteration budgets
- recursion depth
- Modal timeout/secret/volume
- guardrail settings
- delegate LM settings
Single-turn wrappers around the interactive ReAct agent.
Common output shape includes:
assistant_response- optional trajectory metadata (when enabled)
- turn/session metadata and warnings
Long-document analysis/summarization helper backed by DSPy RLM signatures.
Modes:
analyze→AnalyzeLongDocumentsummarize→SummarizeLongDocument
check_secret_presence(secret_name="LITELLM")check_secret_key(secret_name="LITELLM", key="DSPY_LLM_API_KEY")
These execute Modal-side checks for required environment keys.
Current maintained signatures include:
AnalyzeLongDocumentSummarizeLongDocumentExtractFromLogsGroundedAnswerWithCitationsIncidentTriageFromLogsCodeChangePlanCoreMemoryUpdateProposalVolumeFileTreeSignatureMemoryActionIntentSignatureMemoryStructureAuditSignatureMemoryStructureMigrationPlanSignatureClarificationQuestionSignature
from fleet_rlm.runners import run_long_context
result = run_long_context(
docs_path="README.md",
query="Summarize the architecture",
mode="analyze",
)
print(result["answer"])uv run python -c "from fleet_rlm.runners import run_long_context, run_react_chat_once"
uv run python -c "from fleet_rlm.core.agent.signatures import AnalyzeLongDocument"